Use case diagrams in Confluence
A use case diagram shows who uses a system and what each of them can do with it.
Last updated
When to use it
Use a use case diagram at the start of a project to agree on scope: the actors outside the system, the goals inside its boundary, and which goals include or extend others. It says what the system does, not how.
Example
This is the code of the Online banking template: actors, use cases and include/extend relations inside a system boundary.
usecase-beta
direction LR
actor Customer
actor BackOffice("Back office")
actor FraudScreening("Fraud screening system")
systemBoundary "Online banking"
Login("Log in")
ViewBalance("View balance")
MakeTransfer("Make transfer")
VerifySecondFactor("Verify second factor")
ScreenTransaction("Screen transaction")
end
Customer --> Login
Customer --> ViewBalance
Customer --> MakeTransfer
BackOffice --> ScreenTransaction
FraudScreening --> ScreenTransaction
MakeTransfer ..> : include VerifySecondFactor
ScreenTransaction ..> : extend MakeTransfer
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 use case diagram ready to use:
- Online banking: Actors, use cases and include/extend relations inside a system boundary.
Syntax
The code of a use case diagram starts with usecase-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.