Use Case Diagram Tutorial

A use case describes how a user uses a system to accomplish a particular goal. A use case diagram consists of the system, the related use cases and actors and relates these to each other to visualize: what is being described? (system), who is using the system? (actors) and what do the actors want to achieve? (use cases), thus, use cases help ensure that the correct system is developed by capturing the requirements from the user's point of view.

Use Case Diagram Example

What is a Use Case Diagram in UML?

A use case is a list of actions or event steps typically defining the interactions between a role of an actor and a system to achieve a goal. A use case is a useful technique for identifying, clarifying, and organizing system requirements. A use case is made up of a set of possible sequences of interactions between systems and users that defines the features to be implemented and the resolution of any errors that may be encountered.

While a use case itself might drill into a lot of detail (such as, flow of events and scenarios) about every possibility, a use-case diagram can help provide a higher-level view of the system, providing the simplified and graphical representation of what the system must actually do.

A use case (or set of use cases) has these characteristics:

  1. Organizes functional requirements
  2. Models the goals of system/actor (user) interactions
  3. Describes one main flow of events (main scenarios) and possibly other exceptional flows (alternatives), also called paths or user scenarios

Try it!

Finding an online Use Case Diagram tool? Just click the Draw button below to create your Use Case Diagram online. Visual Paradigm Online is free* and intuitive. You can also go through this Use Case Diagram tutorial to learn about Use Case Diagram before you get started.

Draw Now

Use Case Diagram Notations

Use cases define interactions between external actors and the system to attain particular goals. A use case diagram contains four main components

Use Case Diagram Notations

Actor

Actors are usually individuals involved with the system defined according to their roles. The actor can be a human or other external system.

Use Case

A use case describes how actors uses a system to accomplish a particular goal. Use cases are typically initiated by a user to fulfill goals describing the activities and variants involved in attaining the goal.

Relationship

The relationships between and among the actors and the use cases.

System Boundary

The system boundary defines the system of interest in relation to the world around it.


Benefits of Use Case Diagram

  1. Use cases is a powerful technique for the elicitation and documentation of black-box functional requirements.
  2. Because, use cases are easy to understand and provide an excellent way for communicating with customers and users as they are written in natural language.
  3. Use cases can help manage the complexity of large projects by partitioning the problem into major user features (i.e., use cases) and by specifying applications from the users' perspective.
  4. A use case scenario, often represented by a sequence diagram, involves the collaboration of multiple objects and classes, use cases help identify the messages (operations and the information or data required - parameters) that glue the objects and classes together.
  5. Use cases provide a good basis to link between the verification of the higher-level models (i.e. interaction between actors and a set of collaborative objects), and subsequently, for the validation of the functional requirements (i.e. blueprint of white-box test).
  6. Use case driven approach provides an traceable links for project tracking in which the key development activities such as the use cases implemented, tested, and delivered fulfilling the goals and objectives from the user point of views.

How to Draw a Use Case Diagram?

A Use Case model can be developed by following the steps below.

  1. Identify the Actors (role of users) of the system.
  2. For each category of users, identify all roles played by the users relevant to the system.
  3. Identify what are the users required the system to be performed to achieve these goals.
  4. Create use cases for every goal.
  5. Structure the use cases.
  6. Prioritize, review, estimate and validate the users.

Note that: to make use case approach more "Agile", do not detail all use cases, but prioritize them in your product backlog, you should refine the use case in different level of details according to the development phase with just-in-time and just-enough manner.

You can also:

  1. Draw packages for logical categorization of use cases into related subsystems.
    UML Use Case Diagram with Packages

Structuring Use Cases

UML defines three stereotypes of association between Use Cases:

<<include>> Use Case

The time to use the <<include>> relationship is after you have completed the first cut description of all your main Use Cases. You can now look at the Use Cases and identify common sequences of user-system interaction.

UML Use Case Diagram Include Use Case Example

<<extend>> Use Case

An extending use case is, effectively, an alternate course of the base use case. The <<extend>> use case accomplishes this by conceptually inserting additional action sequences into the base use-case sequence.

UML Use Case Diagram Extend Use Case Example

Abstract and generalized Use Case

The general use case is abstract. It can not be instantiated, as it contains incomplete information. The title of an abstract use case is shown in italics.

UML Use Case Diagram Generalization Example

Example

This example depicts a model of several business use cases (goals) which represents the interactions between a restaurant (the business system) and its primary actors.

After the base use cases have been identified in the first cut, perhaps we could further structuring those use case with <<extend>> and <<include>> use cases in the second round touch up as shown in the Figure below:

UML USe Case Diagram Example

Business Use Case

A business use case is described in technology-free terminology which treats the business process as a black box and describes the business process that is used by its business actors, while an ordinary use case is normally described at the system functionality level and specifies the function or the service that the system provides for the user. In other words, business use case represents how the work to be done manually in the currently situation and it is not necessarily done by the system or intend to be automated in the scope of target system.

UML Generalization Diagram Example

Use Case Diagram Examples

The figure below shows an ATM use case diagram example, which is quite a classic example to use in teaching use case diagram.

Use Case Diagram Example - ATM

The Document Management System (DMS) use case diagram example below shows the actors and use cases of the system. In particular, there are include and extend relationships among use cases.

Use Case Diagram Example - Using website

The Order System use case diagram example below shows the actors and use cases involved in the system:

Use Case Diagram Example: Order System

Want to draw a Use Case Diagram?

You've learned what a Use Case Diagram is and how to draw a Use Case Diagram step-by-step. It's time to get your hands dirty by drawing a Use Case Diagram of your own. Draw UML diagrams free* with Visual Paradigm Online. It's easy-to-use, intuitive.

Draw Now

* The Free edition supports free usage of Visual Paradigm Online for non-commercial use only.