User journeys: sections, tasks, actors
简介 / Introduction
Journey diagrams visualize the steps different actors complete across phases of a process. Both PlantUML and Mermaid support this diagram type, but their syntax differs significantly. This post对比同一示例的两种写法。
PlantUML 版
1 | @startuml |
PlantUML uses |<Role>| to declare actors, |#Stage| to group tasks, and supports the scope keyword for parallel regions. Tasks are written as :description;.
Mermaid 版
1 | journey |
Mermaid’s journey diagram uses section to define stages; each task line follows task: score: actor. The score (1-5) indicates the step’s importance to the user. Mermaid does not require explicit actor declarations — the actor name appears on each task line.
对比 / Side-by-side
| Feature | PlantUML | Mermaid |
|---|---|---|
| Stage declaration | |#StageName| |
section StageName |
| Actor declaration | |role: Name| |
Actor name on each task line |
| Task format | :task description; |
task: score: actor |
| Parallel regions | scope keyword |
Not supported |
| Color labels | #ColorCode |
Not directly supported |
| Task score | Not supported | 1-5 score |
小结 / Wrap-up
PlantUML journey diagrams suit multi-actor, multi-stage parallel scenarios — verbose but powerful. Mermaid journeys are concise and ideal for lightweight docs and blog embeds. The core difference lies in how stages and actors are declared; choose based on whether you need colors or parallel regions.
- Title: User journeys: sections, tasks, actors
- Author: puml.online
- Created at : 2026-09-21 09:00:00
- Updated at : 2026-09-29 01:06:38
- Link: https://puml.online/blog/journey-section-tasks-en/
- License: This work is licensed under CC BY-NC-SA 4.0.