EMZETT.
Login

Use case diagram: Presenting use cases and actors

In short: A use case diagram shows which actors use a system and which functions it offers them; it is a simple, understandable overview for requirements.

In more detail: The UML use case diagram answers: who uses the system for what? It shows no flows and no technology but the scope of functions from the user’s view. That is why it suits requirements specifications, talks with customers and IHK documentation.

In Depth

Building blocks

  • Actor (stick figure): role outside the system (customer, admin, payment service, another system).
  • Use case (ellipse): a service for an actor (“place order”, “block account”), named as verb + object.
  • System boundary (rectangle): what belongs to the system, what does not.
  • Association (line): actor uses use case.
  • «include»: a use case always includes another (“order” → “log in”).
  • «extend»: optional extension (“order” ← “redeem voucher”).
  • Generalisation: special case (premium customer is a customer).

Example (online shop)

Customer ──── Search items
Customer ──── Place order ──«include»→ Log in
                         ←«extend»── Redeem voucher
Admin ──── Maintain items
Payment service ── Process payment

The actors stand outside, the use cases inside the system boundary.

Writing and checking

  • Per use case a short description: trigger, precondition, flow (main scenario), alternative and error cases, result, postcondition. From this arise user stories, test cases and activity/sequence diagrams.
  • Naming from the user’s view, not technical (“reset password” instead of “change database entry”).
  • Not too detailed: a diagram with 5 to 15 use cases is enough for the overview.
  • Check all actors and use cases with the customer.

Limits and tools

Use case diagrams show no sequence, no data, no quality requirements (performance, security); these appear in text, activity diagrams, data model, non-functional requirements. Tools: draw.io, PlantUML, Mermaid, StarUML, Lucidchart. Text-based (PlantUML) can be versioned in the repository.

See also: UML class and sequence diagram, Modelling (UML, EPC, BPMN), Requirements and specification documents, User stories