Documentation · Process
BPMN 2.0
Declare a pool, its lanes, then the elements inside each lane. Wire them afterwards, across lanes if you need to.
When to use it
Show a business process with responsibility split across pools and lanes, plus events, tasks and gateways.
Declare elements inside the lane that owns them, then write the connections. BPMN reads across its lanes rather than using the generic direction switch.
Working example
Copy this complete example into the Source tab, then press Generate. Change its labels or values to make your first version.
bpmn "Vacation Request" {
pool P1 "Request" {
lane L1 "Employee" {
start S1 "Submit request"
task A1 "Fill vacation form"
send-task A2 "Send to manager"
}
lane L2 "Manager" {
gw-ex G1 "Approved?"
end E1 "Done"
}
lane L3 "HR" {
send-task A3 "Record leave"
data D1 "Request log"
end E2 "Archived"
}
}
S1 -> A1 -> A2 -> G1
G1 [Yes] -> A3 -> E2
G1 [No] -> E1
A3 -.-> D1
}Syntax reference
The same reference used by the editor and AI briefing. Syntax is notation-specific; use the keywords listed here.
Diagram
| Syntax | Meaning |
|---|---|
bpmn "Title" { | open a BPMN 2.0 diagram |
pool ID "Label" { | participant, holds lanes |
lane ID "Label" { | role inside a pool |
Events
| Syntax | Meaning |
|---|---|
start ID "Label" | start event (thin circle) |
msg-start ID "Label" | message start (open envelope) |
timer ID "Label" | timer event (clock) |
end ID "Label" | end event (thick circle) |
msg-end ID "Label" | message end (filled envelope) |
Activities
| Syntax | Meaning |
|---|---|
task ID "Label" | task (rounded rectangle) |
send-task ID "Label" | send task |
recv-task ID "Label" | receive task |
script-task ID "Label" | script task |
user-task ID "Label" | user task |
Gateways and data
| Syntax | Meaning |
|---|---|
gw-ex ID "Label" | exclusive gateway (X) |
gw-para ID "Label" | parallel gateway (+) |
gw-inc ID "Label" | inclusive gateway (O) |
data ID "Label" | data object (document) |
Flows
| Syntax | Meaning |
|---|---|
A -> B | sequence flow |
A [Yes] -> B | conditional flow |
A -.-> D | data association (dotted) |
Language rules
- The file is one bpmn "Title" { ... } block.
- Participants are pool ID "Label" { ... }; inside a pool, roles are lane ID "Label" { ... }; elements are declared inside a lane.
- An element is <keyword> <ID> "Label", one per line, and its ID must be unique across the whole diagram.
- Flows are declared after the pool block, at the top level, and may cross lanes.
- A data object is joined with a dotted association A -.-> D1, never with a sequence flow.
Edit on the canvas
- Use the pool controls to add lanes or pools. Removing a lane also removes its contents and affected connectors.
- Use the BPMN panel for notation-specific elements; choose sequence, message or association connectors as appropriate.
Generate replaces the drawing from source. Save before generating again if you want to preserve manual finishing touches.
Read Saving & exportingWrite it with an assistant
Tingraph AI already knows this notation. For another assistant, copy the tutorial below, describe your diagram under MY DIAGRAM, then paste the returned source into the editor. This prompt includes every syntax row, rule and working example above.
Read the complete prompt
You are writing Tingraph source. Tingraph is a small text language that draws a BPMN 2.0 diagram. Answer with Tingraph source only.
SYNTAX
Diagram
bpmn "Title" { open a BPMN 2.0 diagram
pool ID "Label" { participant, holds lanes
lane ID "Label" { role inside a pool
Events
start ID "Label" start event (thin circle)
msg-start ID "Label" message start (open envelope)
timer ID "Label" timer event (clock)
end ID "Label" end event (thick circle)
msg-end ID "Label" message end (filled envelope)
Activities
task ID "Label" task (rounded rectangle)
send-task ID "Label" send task
recv-task ID "Label" receive task
script-task ID "Label" script task
user-task ID "Label" user task
Gateways and data
gw-ex ID "Label" exclusive gateway (X)
gw-para ID "Label" parallel gateway (+)
gw-inc ID "Label" inclusive gateway (O)
data ID "Label" data object (document)
Flows
A -> B sequence flow
A [Yes] -> B conditional flow
A -.-> D data association (dotted)
RULES
- The file is one `bpmn "Title" { ... }` block.
- Participants are `pool ID "Label" { ... }`; inside a pool, roles are `lane ID "Label" { ... }`; elements are declared inside a lane.
- An element is `<keyword> <ID> "Label"`, one per line, and its ID must be unique across the whole diagram.
- Flows are declared after the pool block, at the top level, and may cross lanes.
- A data object is joined with a dotted association `A -.-> D1`, never with a sequence flow.
WORKED EXAMPLE
bpmn "Vacation Request" {
pool P1 "Request" {
lane L1 "Employee" {
start S1 "Submit request"
task A1 "Fill vacation form"
send-task A2 "Send to manager"
}
lane L2 "Manager" {
gw-ex G1 "Approved?"
end E1 "Done"
}
lane L3 "HR" {
send-task A3 "Record leave"
data D1 "Request log"
end E2 "Archived"
}
}
S1 -> A1 -> A2 -> G1
G1 [Yes] -> A3 -> E2
G1 [No] -> E1
A3 -.-> D1
}
OUTPUT
- Reply with one fenced code block and nothing else.
- The block starts with `bpmn "…" {` and ends with `}`.
- Do not invent keywords: use only the ones listed above.
- Keep labels short enough to read inside a box, and keep every ID unique.
MY DIAGRAM
Describe what you want here, then send this message.Something unclear? Contact support or read the Privacy Policy.