Swimlane diagrams in Confluence
A swimlane diagram is a process split into lanes, one lane for each person or system that does the work.
Last updated
When to use it
Use a swimlane diagram when the handovers matter as much as the steps: a dispute that crosses customer, shop and bank, or a release that crosses three teams. Every step sits in the lane of its owner, so each arrow that crosses a lane is a handover.
Example
This is the code of the Chargeback dispute template: a dispute across cardholder, shop, payment gateway and card network.
swimlane-beta
subgraph cardholder [Cardholder]
dispute([Open dispute])
outcome([Receive decision])
end
subgraph shop [Online shop]
collect[Collect evidence]
submit[Send evidence]
refund[Issue refund]
end
subgraph gateway [Payment gateway]
notify[Notify merchant]
forward[Forward evidence]
end
subgraph network [Card network]
request[Request evidence]
decide{Cardholder wins?}
close[Close dispute]
end
dispute --> request
request --> notify
notify --> collect
collect --> submit
submit --> forward
forward --> decide
decide -->|Yes| refund
decide -->|No| close
refund --> outcome
close --> outcome
Vellnar Diagrams draws it like this:
Change a line and the diagram changes with it. Nobody needs the original drawing file, because there is none: the code is the diagram.
Add it to a Confluence page
- Edit a Confluence page and type
/mermaidwhere the diagram should go. - Select Mermaid diagram. The editor opens with the template list.
- Pick a template, or choose Start blank and paste the code above. The preview follows every keystroke.
- Choose Save. The diagram appears on the page.
The documentation covers the editor, the settings and the exports.
Templates
The Templates button in the editor has one swimlane diagram ready to use:
- Chargeback dispute: A dispute across cardholder, shop, payment gateway and card network.
Syntax
The code of a swimlane diagram starts with swimlane-beta. The Mermaid documentation describes every element of the syntax. Vellnar Diagrams draws it with Mermaid 12.3; if a line has an error, the editor marks the line and keeps the last valid diagram on screen.
More
- Mermaid in Confluence: how diagrams as code work in a page, and every diagram type.
- Security: the app asks for no permissions and sends nothing outside Atlassian.