Gateways
A gateway controls how the process flow diverges and converges: it models decisions, forks, and joins by routing tokens along one or more sequence flows. A gateway performs no work of its own — a token passes through it immediately, and only the converging (joining) gateways ever make a token wait.
Gateways are rendered as a diamond; the marker inside indicates the type. Each type answers the routing question differently:
- Diverging (one incoming, several outgoing flows) — which outgoing paths receive a token: exactly one (Exclusive), every path whose condition is true (Inclusive), all of them (Parallel), or the path of the first event to occur (Event-based).
- Converging (several incoming, one outgoing flow) — whether to synchronize: pass each token through (Exclusive), wait for all incoming branches (Parallel), or wait for exactly the branches that are still active (Inclusive).
Types
Green icons are supported and link to their documentation.
| Gateway | Icon | Description |
|---|---|---|
| Exclusive | Routes the token down exactly one outgoing path — the first whose condition is true. | |
| Inclusive | Activates every outgoing path whose condition is true; as a join, waits for all branches that are still active. | |
| Parallel | Activates all outgoing paths unconditionally; as a join, waits for a token on every incoming flow. | |
| Event-based | Routes the token along the path of whichever event occurs first, instead of evaluating data conditions. |
Complex gateway
Usage in BPMN
The routing decision is not configured on the gateway itself but on its outgoing sequence flows:
| Markup | Where | Description |
|---|---|---|
bpmn:conditionExpression | outgoing bpmn:sequenceFlow | A FEEL expression prefixed with = that must evaluate to a boolean, e.g. = amount > 10000. Evaluated against the process instance variables. |
default attribute | the gateway element | References the fallback flow taken when no condition evaluates to true. The default flow itself carries no condition. See Default flow. |
Rules shared by the condition-evaluating gateways (Exclusive and Inclusive):
- When a token arrives, the conditions of the outgoing flows are evaluated against the current process variables. Conditions must be written as
=-prefixed FEEL expressions returningtrueorfalse. - A flow without a condition expression is only followed when it is the gateway's single outgoing flow — with several outgoing flows, leave only the default flow unconditioned.
- If no condition matches and a
defaultflow is defined, the default flow is taken. - If no condition matches and there is no default flow, the token fails and an incident is recorded.
The Parallel gateway ignores conditions entirely, and the Event-based gateway replaces conditions with competing catch events.
Related documentation
- Sequence flow — sequence flow basics and the default flow markup.
- Events overview — the catch events an Event-based gateway races.
XML example
The shared markup on a condition-evaluating gateway: two conditional flows evaluated in order and a default flow referenced by the gateway's default attribute:
<bpmn:exclusiveGateway id="Gateway_Amount" name="Amount?" default="Flow_Default">
<bpmn:incoming>Flow_In</bpmn:incoming>
<bpmn:outgoing>Flow_High</bpmn:outgoing>
<bpmn:outgoing>Flow_Medium</bpmn:outgoing>
<bpmn:outgoing>Flow_Default</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:sequenceFlow id="Flow_High" sourceRef="Gateway_Amount" targetRef="Task_ManualReview">
<bpmn:conditionExpression>= amount > 10000</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:sequenceFlow id="Flow_Medium" sourceRef="Gateway_Amount" targetRef="Task_StandardReview">
<bpmn:conditionExpression>= amount > 1000</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:sequenceFlow id="Flow_Default" sourceRef="Gateway_Amount" targetRef="Task_AutoApprove" />