Version: 0.25

Parallel Gateway

A parallel gateway (aka AND-gateway) allows to split the flow into concurrent paths.

workflow

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:

parallel-gateway

Workflow Lifecycle

Workflow instance records of a parallel gateway:

IntentElement IdElement Type
ELEMENT_ACTIVATINGsplitPARALLEL_GATEWAY
ELEMENT_ACTIVATEDsplitPARALLEL_GATEWAY
ELEMENT_COMPLETINGsplitPARALLEL_GATEWAY
ELEMENT_COMPLETEDsplitPARALLEL_GATEWAY
SEQUENCE_FLOW_TAKENto-ship-parcelSEQUENCE_FLOW
SEQUENCE_FLOW_TAKENto-process-paymentSEQUENCE_FLOW
.........
SEQUENCE_FLOW_TAKENto-join-1SEQUENCE_FLOW
.........
SEQUENCE_FLOW_TAKENto-join-2SEQUENCE_FLOW
ELEMENT_ACTIVATINGjoinPARALLEL_GATEWAY
ELEMENT_ACTIVATEDjoinPARALLEL_GATEWAY
ELEMENT_COMPLETINGjoinPARALLEL_GATEWAY
ELEMENT_COMPLETEDjoinPARALLEL_GATEWAY