Types of Gateway in BPMN

Categories:

Recommended

Types of Gateway in BPMN

7-9 minutes

Gateways determine what path is taken through a process that controls the flow of both diverging and converging Sequence Flows. That is, a single Gateway could have multiple inputs and multiple output flows. The term “gateway” implies that there is a gating mechanism that either allows or disallows passage through the Gateway–that is, as tokens arrive at a Gateway, they can be merged on input and/or split apart on output as the Gateway mechanisms are invoked. If the flow does not need to be controlled, then a Gateway is not needed.

Gateways, like Activities, are capable of consuming or generating additional control tokens, effectively controlling the execution semantics of a given Process. The main difference is that Gateways do not represent ‘work’ being done and they are considered to have zero effect on the operational measures of the Process being executed (cost, time, etc.).

Type of gateways

All Gateways are represented with a diamond shape, with different icons within to distinguish the type of Gateway. In BPMN we can divide Gateways element into the following categories:

Exclusive Gateway

A diverging Exclusive Gateway (or XOR Gateway) is used to create alternative paths within a Process flow. For a given instance of the Process, only one of the paths can betaken.

When the execution of a workflow arrives at this gateway, all outgoing sequence flows are evaluated in the order in which they are defined. The sequence flow whose condition evaluates to true is selected for propagating the token flow.

Note that the semantics of an outgoing sequence flow:

  • In general, in BPMN 2.0, all sequence flows whose conditions evaluate to true are selected to continue in a parallel way. When using an exclusive gateway, only one sequence flow is selected .
  • When multiple sequence flows have conditions that evaluate to true, only the first one defined is selected to continue the process.
  • If no sequence flow can be selected, an exception will be thrown. To ensure a sequence flow will always be selected, have no condition on one of your flows.

Exclusive Gateway Example

The following diagram shows an exclusive gateway that will choose one sequence flow based on the value of a property, in this example, the invoice amount. Only two flow shave conditions on them going to CFO Approval and Finance Director Approval. The last sequence flow has no condition and will be selected by default if the other conditional flows evaluate to false.

Event-Based Gateway

The event-based gateway also can be used to instantiate a process. When this is the case the Event-Based Exclusive Gateway icon has only a single circle within the diamond. When used to start a process, the Event-Based Exclusive Gateway allows the process to start in several ways based on the event that triggers it.

Event-Based Gateway Example

Parallel Gateway

Parallel gateways are used to represent two tasks in a business flow. A parallel gateway is used to visualize the concurrent execution of activities. A parallel gateway models a fork into multiple paths of execution, or a join of multiple incoming paths of execution.

  • Fork – all outgoing sequence flows are followed in parallel, creating one concurrent execution for each sequence flow.
  • Join – all concurrent executions arriving at the parallel gateway wait at the gateway until execution has completed for each of the incoming sequence flows. The process then continues.

A parallel gateway can have both fork and join behavior if there are multiple incoming and outgoing sequence flows for the same parallel gateway. In this case, the gateway will first join all the incoming sequence flows, before splitting into multiple concurrent paths of execution.

Category:

VP Flipbook Maker

Created a flipbook like this. This flipbook is made with Visual Paradigm Online. Try this free flipbook maker and create you own flipbook now!