Use Case Diagram
Definition
A Use Case Diagram is a graphical UML diagram that aims to present a statement of functionality required of a system (e.g. software). The units of functionality that the system provides for its users are called use cases. A use case diagram is a type of behavioral diagram that enables the definition of requirements, e.g. for interactions that a system must fulfill.
The diagram describes which users use which functionalities of the system. It does not address specific details of an implementation. A use case describes functionality expected from the system. It may encompas a number of functions that happen (are performed or executed) when using a system. Implicitly, a use case provides a tangible benefit for one or more (entities) actors.
In general, a use case is triggered either by invocation (stimulus) of an actor or by a trigger event.
PlantUML Elements
A PlantUML use case diagram specifies and shows the following:
- An Actor represents a requirement (stimulus) of the system
- An Action representing a capability of the system
- A Subject representing the item acted upon by an Action of the system
The use cases are typically represented by either circles or ellipses. The actors are often shown as stick figures.
Example
@startuml skinparam actorStyle Hollow left to right direction skinparam handwritten true skinparam packageStyle rectangle actor Customer actor Clerk :Bank Clerk: as Clerk rectangle Deposit { Customer -- (Help) (Help) .> (Identification) : optionally (Identification) .> (Payment) : leads (Payment) .> (Receipt) : finally (Help) -- Clerk } @enduml