Parallel gateway
A parallel gateway (aka AND-gateway) allows to split the flow into concurrent paths.
When a parallel gateway with multiple outgoing sequence flows is entered then all flows are taken. The paths are executed concurrently and independently.
The concurrent paths can be joined using a parallel gateway with multiple incoming sequence flows. The workflow instance waits at the parallel gateway until each incoming sequence is taken.
Note the outgoing paths of the parallel gateway are executed concurrently - and not parallel in the sense of parallel threads. All records of a workflow instance are written to the same partition (single stream processor).
Additional Resources​
XML representation
A parallel gateway with two outgoing sequence flows:
<bpmn:parallelGateway id="split" />
<bpmn:sequenceFlow id="to-ship-parcel" sourceRef="split"
targetRef="shipParcel" />
<bpmn:sequenceFlow id="to-process-payment" sourceRef="split"
targetRef="processPayment" />
Using the BPMN modeler
Adding a parallel gateway with two outgoing sequence flows:
Workflow lifecycle
Workflow instance records of a parallel gateway:
Intent | Element Id | Element Type |
---|---|---|
ELEMENT_ACTIVATING | split | PARALLEL_GATEWAY |
ELEMENT_ACTIVATED | split | PARALLEL_GATEWAY |
ELEMENT_COMPLETING | split | PARALLEL_GATEWAY |
ELEMENT_COMPLETED | split | PARALLEL_GATEWAY |
SEQUENCE_FLOW_TAKEN | to-ship-parcel | SEQUENCE_FLOW |
SEQUENCE_FLOW_TAKEN | to-process-payment | SEQUENCE_FLOW |
... | ... | ... |
SEQUENCE_FLOW_TAKEN | to-join-1 | SEQUENCE_FLOW |
... | ... | ... |
SEQUENCE_FLOW_TAKEN | to-join-2 | SEQUENCE_FLOW |
ELEMENT_ACTIVATING | join | PARALLEL_GATEWAY |
ELEMENT_ACTIVATED | join | PARALLEL_GATEWAY |
ELEMENT_COMPLETING | join | PARALLEL_GATEWAY |
ELEMENT_COMPLETED | join | PARALLEL_GATEWAY |