BPMN diagram syntax
Flow objects
Flow objects are the most basic building blocks in a BPMN diagram.
Flow object definitions consist of a name followed by a set of properties including the. type
property which determines whether it is an **activity**
, **event**
, or **gateway**
. If omitted, it defaults to activity
.
Place order[type: activity]
Shipped[type: event]
Approved?[type: gateway]

Flow object names are required to be unique.
Flow objects support type
, icon
, color
, and label
properties. More on properties below.
Pools and Lanes
A pool is the top-level container which usually maps to organizations or departments. A pool can contain flow objects as well as lanes.
A lane is a sub container inside a pool which usually maps to roles or sub-organizations.
Pool and lane definitions consist of a name followed by { }
. The outermost brackets are assumed to be pools and any inner nested brackets are assumed to be lanes. For example, Online store
is the name of the pool, which contains a Warehouse
lane, which in turn contains the Place order
, Shipped
, and Approved?
flow objects.
Online store {
Warehouse {
Place order[type: activity]
Shipped[type: event]
Approved?[type: gateway]
}
}

Pools and lanes support icon
, color
, and label
properties.
Properties
Properties are key-value pairs enclosed in [ ]
brackets that can be appended to definitions of flow objects, pools, and lanes. Properties are optional.
Here are the properties that are allowed:
Property | Description | Value | Default Value |
---|---|---|---|
type | Flow object type | activity , event , gateway | activity |
icon | Icon | Icon names (e.g. user ). See Icons page for full list. | |
color | Stroke and fill color | Color name (e.g. blue ) or hex code (e.g. "#000000" - note: must be wrapped in quotes) | |
label | Text label | Any string. Enclose in double quotes (e.g. "Acme Corp" ) if containing a space. Allows multiple flow objects, pools, and lanes to have the label . | Name of flow object, pool, lane |
colorMode | Fill color lightness | pastel , bold , outline | pastel |
styleMode | Embellishments | shadow , plain , watercolor | shadow |
typeface | Text typeface | rough , clean , mono | rough |
Here are the lists of icon names:
The label
property is useful if you want multiple flow objects, pools, or lanes, to have the same label since names are required to be unique. By default, the label
is set as the name.
// Names need to be distinct, but labels can overlap
Employee_A [label: employee]
Employee_B [label: employee]
Refer to Styling for more details and examples on the colorMode
, styleMode
, and typeface
properties.
It is possible to set multiple properties by separating them using ,
like shown below:
Place order [type: activity, icon: flag]
Connections
Connections represent show how work progresses, messages travel, or data links between elements in the process.
Here is an example of a connection between two activities:
Open website > Place order

Here are the types of connectors:
Connector | Syntax | Description |
---|---|---|
> |
Left-to-right arrow | |
< |
Right-to-left arrow | |
<> |
Bi-directional arrow | |
- |
Line | |
-- |
Dotted line | |
--> |
Dotted arrow |
Connection label
It is possible to add a label to a connection. Here is an example:
Open website > Place order: Browse

Connection properties
Here are the properties that are allowed on connections (lines):
Property | Description | Example |
---|---|---|
color | Line color | Open website > Place order: Browse[color: blue]\ Open website > Place order: [color: blue] |
Icons
Here's a list of all the icons you can use with diagram-as-code.
Escape string
Certain characters are not allowed in names because they are reserved. To use these characters, you can wrap the entire flow object, pool, or lane name in quotes " "
.
Customer {
Open website [type: activity]
"Place / cancel order" [type: activity]
}
Styling
Styles can be applied at the diagram level. Below is an overview of the options and syntax. Refer to Styling for more details and examples.
Property | Values | Default value | Syntax example |
---|---|---|---|
colorMode | pastel , bold , outline | pastel | colorMode bold |
styleMode | shadow , plain , watercolor | shadow | styleMode shadow |
typeface | rough , clean , mono | rough | typeface clean |
Updated 2 days ago