A gateway is used to control the flow of execution (or as the BPMN 2.0 describes, the tokens of execution). A gateway is capable of consuming or generating tokens.
Gateways can define all the types of business process Sequence Flow behavior: Decisions/branching (exclusive, inclusive, and complex), merging, forking, and joining. A gateway is graphically visualized as a diamond shape, with an icon inside. BPMN, however, extends the behavior of the diamonds to reflect any type of Sequence Flow control. Each type of Gateway will have an internal indicator or marker to show the type of Gateway that is being used.
The following table summarizes the most common gateways used in a business process:
|Exclusive Gateway||Used to model a decision in the process. Only one sequence flow is selected when using the exclusive gateway. In case multiple sequence flow have a condition that evaluates to true, the first one defined in the XML is selected for continuing the process.
|Parallel Gateway||Allows to fork into multiple paths of execution or join multiple incoming paths of execution. When used to fork the sequence flow, all outgoing branches are activated simultaneously. When joining parallel branches it waits for all incoming branches to complete before moving to the outgoing flow|
|Inclusive Gateway|| Inclusive gateway is also a division point of the business process. Unlike the exclusive gateway, inclusive gateway may trigger more than 1 out-going paths. Thus, all out-going conditions will be evaluated no matter has fulfilled out-going flow or not.
A sequence flow is the connector between two elements of a process. After an element is visited during process execution, all outgoing sequence flow will be followed. A sequence flow is visualized as an arrow going from the source element towards the target element. The arrow always points towards the target.
A Sequence Flow MAY have a conditional expression attribute, depending on its source object. This means that the condition expression must be evaluated before a Token can be generated and then leave the source object to traverse the Flow. The conditions are usually associated with Decision Gateways, but can also be used with activities.
All BPMN 2.0 tasks and gateways can have a default sequence flow. This sequence flow is only selected as the outgoing sequence flow for that activity if and only if none of the other sequence flow could be selected. Conditions on a default sequence flow are always ignored.
A default sequence flow is visualized as a regular sequence flow, with a 'slash' marker at the beginning.
- << Prev