What Are Include and Extend Use Cases? | Extend and Include Use Case Analyzer

Articles4 days ago

Use case diagrams are widely used to describe system functionality from the perspective of actors and their goals. Two common relationships that often appear in these diagrams are and . While they look similar on the surface, they serve very different purposes in structuring your system’s behavior.

The <include> Relationship

An include relationship represents mandatory behavior that is reused by multiple use cases. Think of it as extracting a shared step that always happens.

Purpose: Avoids duplication by modeling common functionality once.

Example:

Login use case → includes Validate Credentials

Both Register and Reset Password may also include Validate Credentials, since that step is essential every time a person’s identity is confirmed.

Whenever the base use case runs, the included use case is always executed.

The <exclude> Relationship

An extend relationship, on the other hand, captures optional or conditional behavior. It lets you model steps that only happen under specific circumstances.

Purpose: Keeps the base use case simple, while still allowing you to capture variations.

Example:

Checkout use case → extends Apply Discount

Place Order use case → extends Add Gift Wrapping

The extended part is not always triggered; it depends on conditions like a promotion code or customer choice.

Why It Matters to Distinguish Them

Mixing up <include> and <extend> can make a use case diagram confusing:

  • If everything is modeled as <include>, optional features look mandatory.
  • If everything is modeled as <extend>, core system logic becomes fragmented.

By using them properly:

  • Diagrams stay structured and readable.
  • Developers and stakeholders share the same understanding of what is essential versus what is conditional.
  • Tools like the Extend and Include Use Case Analyzer can highlight these relationships, helping you filter and focus on a single use case without losing the bigger picture.

In short, <include> is for must-do, reusable actions, while <extend> is for may-do, conditional actions. Getting this distinction right makes your system design more precise and easier to communicate.

Loading

Signing-in 3 seconds...

Signing-up 3 seconds...