In orchestration and particularly in business process automation there are complex scenarios that require controlling the flow of execution. This control of flow is done by BPMN gateways. Gateways in process automation control how the process execution flows.
BPMN defines many types of gateways, many of them are more to describe how a process works, and not all of them are executable by an engine. There are 4 common types of gateways: Exclusive, Inclusive, Parallel, and Event-based gateways.
They act as decision points that decide which outgoing transition of the step will be activated and execution follows that path.
An exclusive gateway divides the execution into multiple paths. Once execution reaches an exclusive gateway, it evaluates outgoing transitions one-by-one to find out which condition can match. The first transition that matches the condition will be activated and execution follows that transition. As the name suggests only one of the paths can be taken.
When no transition is activated, then an exception is thrown if there is no default transition i.e. transition without any condition.
An inclusive gateway is also a division point, however, unlike an exclusive gateway, it may activate multiple transitions and the execution follows all the activated transitions until they merge to another gateway.
All outgoing transitions are evaluated, and execution follows all the activated transitions. For example, in this process, both “Airline” and “Port” will be contacted.
A parallel gateway is used to model the concurrent activation of outgoing transitions. Like inclusive gateways, it forks the execution to multiple branches. Unlike inclusive and exclusive gateways, it does not evaluate any conditions and activates all the outgoing transitions.
If you query this process on available tasks, you can see both “Receive Payment” and “Ship Order” are available simultaneously.
Joining the parallel gateways is like exclusive gateways, but they don’t need to be balanced.
An event-based gateway allows making decisions based on events. Similar to exclusive gateway only one transition will be activated.
The outgoing transitions of an event-based gateway can be only messages i.e. receive a message, timeout message, or tasks i.e. Human Task, Receive Task and etc.
Published September 9th, 2021 at 01:43 pm