Exclusive Gateway
A decision point where exactly one of several outgoing paths is taken, based on a condition.
An exclusive gateway (drawn as a diamond with an X, or a plain diamond) routes a token down exactly one outgoing sequence flow — the first one whose condition evaluates true, or a default flow if none match.
This is the BPMN equivalent of an if/else statement. Conditions are FEEL expressions evaluated against the process's variables, e.g. `= approved` or `= amount > 1000`.
Example
Bpmn.createProcess("loan")
.startEvent("start")
.exclusiveGateway("gw", { name: "Approved?" })
.branch("yes", (b) => b.condition("= approved").endEvent("end-ok"))
.branch("no", (b) => b.defaultFlow().endEvent("end-rejected"))
.withAutoLayout()
.build();
Try it hands-on: Decisions with gateways →