Common patterns
Decision and merge
Take one of two paths, then bring them back together with a merge gateway.
An exclusive gateway (xor) takes exactly one path. When the paths should meet again, merge them with a second xor that has no name, only an #id.
Here small orders skip the director, and both paths meet again at xor #approved:
process Purchase order
start Need identified
user Create purchase request
xor Amount over 5,000?
yes [amount > 5000] -> Get director approval
no (default) -> #approved
user Get director approval
xor #approved
service Place order
end Order placedWhat to notice
- Get director approval leads into the merge because it's the line above it. The
noarrow reaches it by its id. - The decision is named as a question, and its flows are the answers.
(default)marks the path taken when the condition doesn't hold.- Without the merge gateway, Place order would have two arrows coming in, and the checks would flag an implicit merge.
If the paths never meet again, end each one with its own end event instead. See Several outcomes.