Activity diagrams: parallel fork/join

Activity diagrams: parallel fork/join

puml.online

简介 / Introduction

Parallel activity diagrams express a scenario where multiple tasks execute concurrently and then converge. Both PlantUML and Mermaid support fork/join-style syntax, though their details differ. This article uses the same scenario — “after receiving an order, simultaneously check inventory and verify payment, then confirm” — rendered in both engines for direct comparison.

PlantUML 版

1
2
3
4
5
6
7
8
9
10
11
12
13
@startuml
|Department|
start
:Receive order;
fork
:Check inventory;
fork again
:Verify payment;
end fork
join
:Confirm order;
stop
@enduml

Mermaid 版

1
2
3
4
5
6
flowchart TD
A[Receive order] --> B[/"Parallel"/]
B -->|"Inventory check"| C[Check inventory]
B -->|"Payment verify"| D[Verify payment]
C & D --> E[Confirm order]
E --> F([End])

Mermaid has no native fork/join node; this example uses a parallel branch symbol /"..."/ with & convergence to achieve equivalent logic.

对比 / Side-by-side

Feature PlantUML Mermaid
Parallel branch keywords fork / fork again No native support; uses parallel branch symbol
Merge keyword join & convergence
Swimlanes (partitions) |Department| Not supported
Render style Classic UML flowchart Horizontal flowchart

小结 / Wrap-up

PlantUML’s fork/join follows the UML standard and suits formal modeling; Mermaid achieves the same effect via parallel branches and & convergence, winning on simplicity. Either approach clearly conveys parallel logic — pick based on your needs.

  • Title: Activity diagrams: parallel fork/join
  • Author: puml.online
  • Created at : 2026-09-10 09:00:00
  • Updated at : 2026-09-29 01:06:38
  • Link: https://puml.online/blog/activity-diagram-parallel-fork-en/
  • License: This work is licensed under CC BY-NC-SA 4.0.