**Showing why a system exists and who cares about which parts.**
Use Case diagrams illustrate the services a system provides and the actors which care about those services. A system, when viewed through the lens of a Use Case diagram, can be thought of as a tool which provides utility/value to _someone_. The Use Case diagram makes that value clear. For these reasons, **use case diagrams are arguably the most important diagrams to produce** for your system.
A Use Case diagram is almost a [[Context Diagram]] meets a [[Business Capability Models|capability diagram]]. It shows the capabilities of a system and who cares about them. This is usually vital context in any real-world (business) setting.
Uses Cases *(the use case elements inside the diagram)* are a capability of a system. Primary Actors are the people that invoke a Use Case. Secondary actors are anyone who is involved in the behavior.
# Syntax
By convention:
- **Use Cases** are ovals
- **Actors** are little stick figures
- **Systems** are a frame
Use cases can `<<include>>` and `<<extend>>` other use cases. I think the implied semantics on these are not obvious to a casual reader, and would probably use these types of relationships sparingly, or only in obvious ways.
## Examples
### My Notes
![[Pasted image 20250409111629.png]]
### [[Archimate Cookbook]] Example
I really like [[Archimate]]. Here's a basic example using Archimate constructs to fulfill the function of a use case diagram.
![[Pasted image 20250409112334.png]]
The nice part about Archimate is its support for extending the diagram to map use cases to components of systems that serve them. I think the [[Communicative Value]] of diagrams like the following is quite high:
![[Pasted image 20250409113240.png]]
### Mermaid Example
[[Mermaid JS]] has no built-in use case diagram, but you can create one using their standard `graph` (aka `flowchart`) diagram.
```mermaid
---
title: Use Cases
---
flowchart LR
subgraph My Notes
cn((Create Notes))
rn((Read Notes))
end
w[🧍 Writer] --> cn
r[🧍 Reader] --> rn
w-->rn
```
# More
- [[Diagram Types (index)]]
- [[SysML]]
## Source
- Various over the years
- [[SysML Distilled]]