An exclusive gateway (aka XOR-gateway) allows to make a decision based on data (i.e. on process instance variables).
If an exclusive gateway has multiple outgoing sequence flows then all sequence flows, except one, must have a
conditionExpression to define when the flow is taken. The gateway can have one sequence flow without
conditionExpression which must be defined as the default flow.
When an exclusive gateway is entered then the
conditionExpressions are evaluated. The process instance takes the first sequence flow that condition is fulfilled.
If no condition is fulfilled then it takes the default flow of the gateway. In case the gateway has no default flow, an incident is created.
An exclusive gateway can also be used to join multiple incoming flows to one, in order to improve the readability of the BPMN. A joining gateway has a pass-through semantic. It doesn't merge the incoming concurrent flows like a parallel gateway.
conditionExpression defines when a flow is taken. It is a boolean expression that can access the process instance variables and compare them with literals or other variables. The condition is fulfilled when the expression returns
Multiple boolean values or comparisons can be combined as disjunction (
and) or conjunction (
An exclusive gateway with two outgoing sequence flows: