Syntax

Flows and labels

How lines connect, and how to write a flow with a label, a condition or a default.

Connect steps line by line

Lines that follow each other with no blank line between them form a block. Inside a block, each node connects to the node on the line above it. Three things end that chain:

  • A blank line. The next node starts a new path with nothing leading into it, so an arrow from somewhere else has to point to it (unless it's a start event).
  • An end event. It never connects to the next line.
  • A node with its own -> lines. Its arrows say where it goes, so it doesn't also connect to the next line.

Here Write release notes connects to nothing, because the line above it is an end event. The modeling checks will list it as not connected yet.

start Ticket opened
user Triage ticket
end Ticket triaged
user Write release notes

Add labels, conditions and a default

Write a flow as an indented line under the node it leaves:

Flowmark
process Order approval

start Order submitted
xor Order value?
  over 10,000 [amount > 10000] -> Get director approval
  up to 10,000 (default) -> Approve order

user Get director approval
end Sent for approval

service Approve order
end Order approved

Each part is optional, but they have to come in this order:

  1. Label, the text shown on the flow (over 10,000). Name the flows out of a decision as answers to its question.
  2. Condition in square brackets ([amount > 10000]). It goes into the BPMN XML as the flow's condition expression.
  3. (default), which marks the flow taken when no other condition holds.
  4. -> and the target, the name of the node it goes to, or its #id.

Names in targets ignore capitalization, so -> approve order finds Approve order. The target can be declared anywhere in the text, above or below the arrow. A line with only -> Target is an unlabeled flow.

Indent for the reader

Indenting arrow, message, on:, doc: and note: lines is for you, not the app. They always belong to the node declared last, however you indent them. Indent them anyway, so the text reads like the diagram.

Don't put an arrow on a node line. Any line with -> in it is read as an arrow, so user Review claim -> Pay claim doesn't declare a task. See Troubleshooting.

On this page