Use case diagrams: where to draw the system boundary

Use case diagrams: where to draw the system boundary

puml.online

简介 / Introduction

When drawing a use case diagram, the tricky part is rarely the connections — it is where the boundary sits. The boundary decides which use cases belong to the system you are building and which belong to external systems (an external system is drawn as an “actor” in your diagram). Draw it too wide and the requirements leak out; draw it too narrow and use cases land in the wrong system.

This post uses an order system: “browse products” and “place order” live inside the boundary, while “payment” and “shipping” are delegated to external systems, with <<include>> / <<extend>> relations expressing how the use cases collaborate. PlantUML draws the boundary with rectangle; Mermaid has no dedicated use case syntax, so a flowchart with a subgraph stands in.

PlantUML 版

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
@startuml
title Order System Use Case Diagram

left to right direction

actor Visitor as Guest
actor Admin as Admin
actor "Payment Gateway" as PayGateway
actor "Logistics" as Logistics

rectangle "Order System" {
usecase "Browse products" as UC1
usecase "Place order" as UC2
usecase "Check order status" as UC3
usecase "Review order" as UC4
}

Guest --> UC1
Guest --> UC2
Guest --> UC3
Admin --> UC4

UC2 ..> UC3 : <<include>>
PayGateway -- UC2 : payment
Logistics -- UC4 : shipping

@enduml

Key points:

  • actor declares a participant, usecase "name" as alias declares a use case.
  • rectangle "Order System" { ... } is the system boundary: use cases inside, participants outside.
  • rectangle blocks can be nested, and package gives a similar “subsystem” look.
  • --> marks an interaction; ..> with <<include>> marks a use case that always reuses another.
  • <<extend>> marks a use case that happens only under certain conditions, drawn with a dashed line.

Mermaid 版

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
flowchart LR
Guest(["Visitor"])
Admin(["Admin"])
Pay(["Payment Gateway"])
Logi(["Logistics"])

subgraph System["Order System"]
UC1["Browse products"]
UC2["Place order"]
UC3["Check order status"]
UC4["Review order"]
end

Guest --> UC1
Guest --> UC2
Guest --> UC3
Admin --> UC4

UC2 -. "include" .-> UC3
Pay --> UC2
Logi --> UC4

Mermaid has no use-case-specific syntax, so a flowchart stands in:

  • subgraph System["Order System"] { ... } plays the role of PlantUML’s rectangle boundary.
  • Participants are rounded nodes (["Visitor"]); use cases are rectangles ["Browse products"].
  • A dashed edge with a label -. "include" .-> expresses the <<include>> relation.
  • Mermaid edge labels sit in the middle of the line, written as -. text .-> or -- text -->.

对比 / Side-by-side

Aspect PlantUML Mermaid
Diagram type Native use case diagram (usecase / actor) Generic flowchart (flowchart) emulation
System boundary rectangle "System" { ... } subgraph System["System"] { ... }
Participant shape actor Name as Alias (stick figure) Rounded node (["Name"])
Use case shape Ellipse Rectangle ["Name"]
Include relation UC1 ..> UC2 : <<include>> UC1 -. "include" .-> UC2
Extend relation Native <<extend>> Manual dashed edge + label

小结 / Wrap-up

The practical test for a system boundary is: who benefits from the use case? Put it inside the boundary when the benefit lands on your system; when the use case merely calls out to someone else (payment, shipping, SMS), draw that party as a participant outside the boundary. Both PlantUML’s rectangle and Mermaid’s subgraph can express this layering — the only real difference is that PlantUML understands use case semantics natively while Mermaid relies on your own shape and edge conventions.

  • Title: Use case diagrams: where to draw the system boundary
  • Author: puml.online
  • Created at : 2026-11-05 09:00:00
  • Updated at : 2026-11-26 01:07:01
  • Link: https://puml.online/blog/use-case-diagram-system-boundary-en/
  • License: This work is licensed under CC BY-NC-SA 4.0.
On this page
Use case diagrams: where to draw the system boundary