Syntax
Gateways
Split and merge paths with exclusive, parallel, inclusive, event-based and complex gateways.
A gateway splits the path into branches, or merges branches back into one. Write its outgoing flows as -> lines under it.
process Leave request
start Leave requested
user Review request
xor Leave approved?
yes -> Book leave
no (default) -> Tell employee
service Book leave
end Leave booked
send Tell employee
end Leave refusedThe five gateways
| Kind | Takes | Use it for |
|---|---|---|
xor | Exactly one path | A decision. See Decision and merge. |
and | Every path at once | Parallel work. See Parallel work. |
or | Every path whose condition holds | One or more paths. See Parallel work. |
eventgw | The path of whichever event happens first | Waiting for a reply or a deadline. See Waiting for a reply. |
complex | Whatever its own rule says | A rule the others can't say, such as going on once two of three reviews are in. See Complex gateways. |
Rules
- Every split and merge gets its own gateway. The checks flag two arrows straight into a task, or two arrows straight out of one.
- A merge gateway usually has no name. Give it an
#id, such asxor #merge, and point to it with-> #merge. - Name a decision as a question, such as "Amount over 5,000?". Label its flows as the answers.
- Join parallel paths with
and, neverxor. The checks warn when an exclusive gateway merges parallel paths. They report a deadlock when a parallel gateway joins the paths of an exclusive decision. - Merge a decision inside parallel work before the join. Its branches go to an
xormerge, and that one flow goes to theandjoin. See Parallel work. - An
eventgwleads only to catch events or receive tasks.
Complex gateways
A complex gateway follows a rule the other gateways can't say. The app draws it with an asterisk. Most often it's a join that goes on before every branch is in:
process Paper review
start Paper submitted
and #assign
-> Review by expert one
-> Review by expert two
-> Review by expert three
user Review by expert one
complex Two of three reviews in?
user Decide on paper
end Decision sent
user Review by expert two
-> Two of three reviews in?
user Review by expert three
-> Two of three reviews in?Name it with its rule, since nothing else on the diagram says it. The checks add a style note when it has no name.
Reach for xor, and or or first. Readers know them, and a complex gateway's rule is only as clear as its name. In the BPMN XML it's a complexGateway.