Syntax
Gateways
Split and merge paths with exclusive, parallel, inclusive and event-based 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 four 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. |
Rules
- Every split and merge gets its own gateway. Two arrows straight into a task, or two arrows straight out of one, are flagged by the checks.
- 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?", and label its flows as the answers.
- Join parallel paths with
and, neverxor. The checks warn when an exclusive gateway merges parallel paths, and 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.