Use case diagram (PlantUML)

Use case diagrams are for scope conversations with people who will not read a technical diagram. The boundary is the whole point.


#What this example shows

  • A rectangle acting as the system boundary.

  • include and extend, which mean different things.

  • An external system drawn as an actor on the right.


#A worked example

Open it, edit it, or copy the source below.

Use case diagram (PlantUML)

The source, which you can paste into a new diagram and edit:

@startuml
left to right direction

actor Customer
actor "Support agent" as Agent
actor "Payment provider" as Pay

rectangle "Online shop" {
  usecase "Browse catalogue" as UC1
  usecase "Place order" as UC2
  usecase "Pay for order" as UC3
  usecase "Apply discount code" as UC4
  usecase "Track delivery" as UC5
  usecase "Refund order" as UC6
}

Customer --> UC1
Customer --> UC2
Customer --> UC5
Agent --> UC6
UC2 .> UC3 : <<include>>
UC4 .> UC2 : <<extend>>
UC3 --> Pay
UC6 --> Pay
@enduml

#Making it your own

  • include means always; extend means sometimes. Swapping them changes the meaning.

  • left to right direction usually reads better for use case diagrams.

  • Keep use cases at the level of goals, not steps.



Verbose, stable, and it draws almost everything.