Parallel work
Run steps at the same time with a parallel split and join, or take only the paths that apply.
Run steps in parallel
A parallel gateway (and) starts every path at once, and a second one waits for all of them. Its arrows need no labels.
Write each branch as its own block. One branch declares the join and carries on from it. The others point to it.
process New hire onboarding
lanes HR | IT
lane HR
start Offer accepted
user Prepare contract
and #split
-> Set up laptop
-> Create accounts
-> Plan first week
lane IT
manual Set up laptop
and #ready
lane HR
user Welcome new hire
end New hire started
lane IT
service Create accounts
-> #ready
lane HR
user Plan first week
-> #readyJoin parallel paths with and, never xor. The checks warn when an exclusive gateway merges parallel paths. They also warn when the branches of a parallel split never meet again.
The checks report a deadlock when a parallel gateway joins the paths of an exclusive decision. That join would wait for paths that were never taken.
A decision inside parallel work
A decision on one parallel path, such as a fraud screening beside the vehicle inspection, merges its own branches with an xor first. Only that one flow goes to the and join.
The join waits for every flow into it, and only one of the decision's branches is ever taken. So the decision's branches can't go to the join directly.
process Motor claim
lanes Claims handler | Adjuster
lane Claims handler
start Claim received
and #fork
-> Inspect vehicle
-> Screen for fraud
lane Adjuster
manual Inspect vehicle
and #join
lane Claims handler
user Decide on claim
end Claim decided
lane Claims handler
service Screen for fraud
xor Fraud suspected?
yes -> Investigate claim
no (default) -> #screened
user Investigate claim
xor #screened
-> #joinSometimes a branch has to stop all the work, such as a claim closed as fraudulent while the inspection still runs. End that branch with end:terminate instead of leading it to the join.
Take one or more paths
An inclusive gateway (or) takes every path whose condition holds. Give each flow a condition, and add a (default) for when none hold. Join the paths with another or:
process Insurance claim
start Claim received
user Assess claim
or Which checks are needed?
fraud risk [fraudScore > 70] -> Run fraud check
vehicle damage [type == "vehicle"] -> Inspect vehicle
standard (default) -> Verify policy
service Run fraud check
or #checked
user Decide on claim
end Claim decided
manual Inspect vehicle
-> #checked
service Verify policy
-> #checkedWhat to notice
- The split and the join use the same kind of gateway:
andwithand,orwithor. - The join has only an id, and every branch but one points to it.
- A decision inside a branch is merged before the join, so each branch brings exactly one flow to it.
- A rework loop that starts after the join comes back to a merge after the join. Looping back into one branch would leave the join waiting for the others.
- Each branch is its own block, separated by a blank line.