Syntax

Flows and labels

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

Most flows need no writing at all, because lines connect on their own. This page covers how that works, and how to write a flow when you need one.

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. Unless it's a start event, an arrow from somewhere else has to point to it.
  • 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 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. The app draws it with a slash where it leaves.
  4. -> and the target, the name of the node it goes to, or its #id.

A flow with a condition can also leave a task, as in [stock > 0] -> Ship order. BPMN draws a small open diamond where such a flow leaves the task. It shows the flow is taken only when its condition holds. Flows leaving a gateway don't get one, since the gateway already decides.

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

Arrow, message, on: and doc: lines belong to the node declared last, however you indent them. Indent them anyway, so the text reads like the diagram.

Indenting does matter in two places:

  • A note: or color: line indented further than the arrow or message above it belongs to that arrow or message. At the same indent or less, it belongs to the node. See A note on an arrow.
  • Steps indented under a sub or pool line go inside that sub-process or pool. See Sub-processes and A pool's own steps.

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

On this page