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.

Flowmark
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 refused

The five gateways

KindTakesUse it for
xorExactly one pathA decision. See Decision and merge.
andEvery path at onceParallel work. See Parallel work.
orEvery path whose condition holdsOne or more paths. See Parallel work.
eventgwThe path of whichever event happens firstWaiting for a reply or a deadline. See Waiting for a reply.
complexWhatever its own rule saysA 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 as xor #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, never xor. 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 xor merge, and that one flow goes to the and join. See Parallel work.
  • An eventgw leads 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:

Flowmark
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.

On this page