Loading content...
Before we can design classes or model interactions, we must answer a more fundamental question: What is this system supposed to do? Not how it works internally—what it offers to the world outside. Use case diagrams step back from implementation concerns to capture the essential contract between a system and its users.
Imagine explaining a new software system to a non-technical stakeholder—a business owner, a product manager, or an end user. They don't want to hear about classes, interfaces, or database schemas. They want to know: What can I do with this system? What will it do for me? Use case diagrams answer these questions with remarkable clarity, providing a visual contract that both technical and non-technical stakeholders can understand and validate.
By the end of this page, you will understand precisely when use case diagrams are the optimal choice. You'll recognize requirements-level questions that call for use case diagrams, understand their unique value in stakeholder communication, and develop the judgment to choose use case diagrams when capturing system scope and user goals is the primary concern.
Requirements occupy a distinct level of abstraction—above implementation details, concerned with what the system provides rather than how it provides it. Use case diagrams are purpose-built for this level.
The Requirements Challenge
Every software project begins with requirements—statements of what the system must do to satisfy its stakeholders. But requirements come in many forms:
Use case diagrams transform these raw inputs into a structured visual model that organizes requirements around the people (actors) who interact with the system and the goals (use cases) they pursue.
Use case diagrams bridge the gap between business stakeholders and technical teams. Business people see the things they care about (actors doing things with the system). Technical people see the starting points for design (use cases that must be realized through class interactions).
To understand when use case diagrams are appropriate, we must understand what requirements information looks like at this level of abstraction.
Actors: The people, systems, or devices that interact with the system from outside. Represented as stick figures (for human actors) or boxes with <<actor>> stereotype (for system actors). Actors represent roles, not specific individuals.
Use Cases: The goals or objectives that actors pursue using the system. Represented as ovals with descriptive names (verb phrases like 'Place Order' or 'Generate Report'). Each use case represents a complete, meaningful interaction that provides value to an actor.
System Boundary: The box that contains use cases, separating what's inside the system from what's outside. This boundary is crucial for scope definition—it answers 'What is our system responsible for?'
Relationships: The connections between actors and use cases (association lines) and between use cases themselves (include and extend relationships). These show who can do what and how use cases relate.
| Requirements Element | Use Case Diagram Notation | Information Conveyed |
|---|---|---|
| User Role | Stick figure (Actor) | Who interacts with the system |
| External System | Box with <<actor>> stereotype | Systems that integrate with ours |
| User Goal | Oval (Use Case) | What users can accomplish |
| System Scope | Rectangle boundary | What's inside vs. outside the system |
| Access Rights | Lines between actors and use cases | Which roles can perform which actions |
| Shared Behavior | <<include>> arrow | Mandatory sub-functionality |
| Optional Extension | <<extend>> arrow | Conditional additional behavior |
| Role Hierarchy | Generalization arrow between actors | Role inheritance |
The power of goal-focused notation:
Use case diagrams are unique in their focus on goals rather than features or functions. A use case is not just 'the system can do X'—it's 'the actor can achieve Y using the system.' This goal focus keeps requirements user-centered and prevents feature creep that doesn't serve actual user needs.
The stick figure notation for actors is deliberately simple and familiar. Even stakeholders who have never seen a UML diagram instantly understand that the stick figures represent people (or their roles) and the ovals represent things they can do. This accessibility is a key strength of use case diagrams.
Let's examine the specific situations where use case diagrams provide maximum value.
Use Case 1: Project Scoping and Vision
At project inception, before any architecture or design decisions, the team needs clarity on scope. What will this system do? For whom? Where are its boundaries with other systems or processes?
A use case diagram for the entire system provides this clarity. Product managers, architects, and developers can all look at the same diagram and agree (or disagree constructively) about whether the scope is appropriate. Is the system trying to do too much? Are important capabilities missing? These questions become visible and answerable.
Use Case 2: Stakeholder Validation
One of the most costly mistakes in software development is building the wrong thing. Use case diagrams help prevent this by providing a validation artifact that stakeholders can review and approve before development begins.
The diagram asks: 'Is this what you want?' Stakeholders can identify missing actors ("What about external auditors?"), missing use cases ("Customers also need to track their orders"), or incorrect associations ("Actually, only managers should be able to approve refunds"). Each correction at this stage saves orders of magnitude more effort than corrections during implementation.
Use Case 3: Role-Based Access Planning
The connections between actors and use cases implicitly define an access control matrix. By reading the diagram, you can see which roles can access which functionality. This makes use case diagrams valuable for:
Use Case 4: Feature Decomposition
For agile teams working in sprints, use case diagrams help organize the backlog. Each use case is a candidate for further decomposition into user stories, and the include/extend relationships show dependencies between features.
The diagram becomes a map of the work to be done. Teams can see what's remaining, estimate effort, and plan releases. Product owners can prioritize use cases based on business value and complexity.
Use Case 5: External Integration Documentation
When your system integrates with external systems, those external systems are actors. The use case diagram shows what your system provides to (or receives from) each external system.
For API documentation, this provides a high-level view: Our system provides these capabilities to these consumers. The details (endpoints, data formats, protocols) belong in other documents, but the use case diagram provides the organizing structure.
Each use case corresponds to one or more test scenarios. If an actor can 'Place Order,' there should be tests for placing orders: successful order, out-of-stock handling, payment failure, etc. Use case diagrams provide natural test organization—they're a map of what must be tested.
Just as structural questions point to class diagrams and behavioral questions point to sequence diagrams, requirements-level questions point to use case diagrams.
The Question Test
Requirements questions are user-focused and goal-oriented:
These are fundamentally different from implementation questions ('How do we store orders?') or interaction questions ('What happens when a user clicks Submit?').
| Question Pattern | Example | Best Diagram |
|---|---|---|
| What can users do? | What can a customer do with this app? | Use Case Diagram |
| Who are the users? | What roles interact with the system? | Use Case Diagram |
| What's in scope? | What features are we building? | Use Case Diagram |
| What exists in the system? | What classes are needed? | Class Diagram |
| How does X work internally? | How does order processing work? | Sequence Diagram |
| What states can X be in? | What are the order states? | State Diagram |
The User-Story Pattern
If you're working with user stories ("As a [role], I want to [goal], so that [benefit]"), you're already thinking in use case terms. Each user story is essentially a mini use case. Use case diagrams organize these stories:
Moving from user stories to a use case diagram provides the 'big picture' that individual stories lack—how all the stories relate, who can do what, where the boundaries are.
The 'For Whom' Indicator
When discussing features, notice if the conversation focuses on who benefits and what they achieve, rather than how it's implemented. Statements like:
'Administrators need to manage user accounts, customers need to browse products and place orders, and suppliers need to update inventory.'
This is use case material—roles (administrators, customers, suppliers) paired with goals (manage accounts, browse products, update inventory).
If you're creating a diagram primarily for non-technical stakeholders (product owners, business analysts, executives), use case diagrams are often the best choice. They speak the language of users and goals, not classes and methods.
Use case diagrams can be drawn at different levels of granularity depending on purpose.
Summary Level: High-level use cases that represent major system capabilities. Each summary-level use case might decompose into many smaller use cases.
Example: 'Manage Orders' might be a summary use case that includes creating, viewing, modifying, and canceling orders.
Purpose: Executive overviews, project charters, initial scoping.
User Goal Level: The 'sweet spot' for most use case modeling. Each use case represents a single goal that a user might have in a single sitting. This is the level that best supports development planning and testing.
Example: 'Place Order,' 'Cancel Order,' 'Track Shipment'—each is a complete goal achievable in one session.
Purpose: Requirements documentation, sprint planning, acceptance testing.
Subfunction Level: Detailed use cases that represent steps or sub-goals within larger use cases. Often shown using <<include>> relationships.
Example: 'Validate Payment' as an included use case within 'Place Order.'
Purpose: Detailed analysis, identifying shared functionality, technical planning.
Choosing the Right Level
Avoiding Common Mistakes
The most common mistake is mixing levels in the same diagram. A diagram with 'Manage Orders' (summary) alongside 'Update Shipping Address' (subfunction) creates confusion about granularity. Keep each diagram at a consistent level, and create separate diagrams for different levels if needed.
Don't create use cases for every button click or screen transition. Use cases are user goals, not system functions. 'Click the Save button' is not a use case—'Save Document' is. Keep the abstraction at the goal level.
Use case diagrams have a natural place in the software development lifecycle—primarily at the beginning, but with ongoing relevance throughout.
In Requirements Gathering
During initial requirements discovery, sketching use case diagrams during stakeholder interviews helps ensure complete coverage. As stakeholders describe what they need, you can map their statements to actors and use cases, and they can immediately validate your understanding.
The diagram becomes a focal point for discussion: 'You've mentioned customers—what about suppliers? Do they interact with the system?'
In Project Planning
Use cases provide natural units for effort estimation and scheduling. Each use case has an implementation cost and business value. Product owners can prioritize use cases, and development leads can estimate complexity. The diagram becomes a roadmap for delivery.
'In Phase 1, we'll implement these seven use cases. In Phase 2, these five. The cloud integration use cases are Phase 3.'
In Design
Each use case becomes the starting point for deeper design. The sequence diagrams that realize use cases trace directly back to the use case diagram. The class diagrams that support the behavior are designed to enable the use cases.
This traceability is valuable: any class or method can be justified by the use case(s) it supports. Conversely, any use case should be traceable to the design elements that implement it.
In Testing
Use cases directly inform test planning. For each use case:
Answering these questions for each use case generates comprehensive test coverage.
In Documentation
For user manuals and help systems, use cases organize the content from the user's perspective. 'Want to place an order? See Chapter 3. Want to track your shipment? See Chapter 5.' The structure mirrors how users think about the system.
Use case diagrams should evolve as requirements evolve. New features mean new use cases; deprecated features mean use cases are removed. Unlike implementation-level diagrams that may be generated from code, use case diagrams require intentional maintenance because they represent design intent, not implementation reality.
Knowing when use case diagrams are appropriate includes knowing their limitations.
When the Audience is Deeply Technical
For detailed technical discussions among developers, use case diagrams are too abstract. Developers typically want to see class structures, sequence flows, or data models—not high-level goals they already understand.
Use case diagrams are bridges to non-technical stakeholders. If everyone in the room is technical and understands the domain well, more detailed diagrams (class, sequence) provide more value.
When Details Matter More Than Overview
Use case diagrams deliberately hide implementation details. If the question is how the system accomplishes something (not what it accomplishes), use case diagrams don't help. They show the 'what' at a high level; they don't show the 'how' at any level.
When Data Structure is the Focus
Use case diagrams say nothing about data. If the question is about what entities exist, what their attributes are, or how they're related, you need entity-relationship diagrams or class diagrams, not use case diagrams.
When There Are No Clear Actors
Some systems—batch processing jobs, infrastructure services, scheduled tasks—don't have traditional interactive users. While you can model schedules and triggers as actors, use case diagrams become awkward. Alternative models (component diagrams, data flow diagrams) may work better.
When Behavioral Details are Critical
Use case diagrams show that an actor can 'Place Order,' but not what happens step-by-step when they do so. If the detailed flow matters (click this, then that, then this, handling this error, etc.), you need activity diagrams or sequence diagrams. Use case diagrams are the table of contents; other diagrams are the chapters.
Think of use case diagrams as the beginning of design, not the end. They capture requirements at a high level, then serve as the organizing structure for deeper design artifacts. Each use case should eventually have detailed descriptions, sequence diagrams, and test cases behind it.
We've explored when and why use case diagrams are the right choice for capturing and communicating requirements. Let's consolidate the key insights:
What's Next:
We've now covered when to use the three most important diagram types: class diagrams for structure, sequence diagrams for interactions, and use case diagrams for requirements. The final page brings it all together—providing a decision framework for matching any design situation to the optimal diagram type.
You now understand when use case diagrams are the optimal choice for design representation. You can recognize requirements-level questions, match diagram detail to audience and purpose, and know when alternative diagrams are more appropriate. Next, we'll provide a comprehensive decision framework for diagram selection.