Use Case View  «Prev  Next»
Lesson 3The use case diagram
ObjectiveIdentify the four fundamental modeling elements of a use case diagram.

Use Case Diagram

The use case model has three components. The first component, and the only one actually defined by the UML, is the use case diagram. To supplement the diagram, it is almost always necessary to add a use case narrative. Once a use case is fully described, it is possible to dissect it into scenarios, or test cases. Remember that although diagrams are extremely valuable and provide substantial information, they nearly always require some form of explanation to put them into context and ensure their proper interpretation.

Use case diagram

There are four modeling elements which make up the use case diagram:
  1. system,
  2. actors,
  3. use cases,
  4. and associations.

  1. Actor: People, systems, and devices that have a stake in the successful operation of the system
  2. System: Sets the context of the system in relation to the actors who use it and the features it must provide.
  3. Use case: Identifies the key features of the system. Without these features, the system will not fulfill the user/actor requirements. Each use case expresses a goal that the system must achieve
  4. Association: Identifies an interaction between elements

Use Case Diagram Elements
Each association becomes a dialog that must be explained in a use case narrative. Each narrative in turn provides a set of scenarios that function as test cases when evaluating the design and implementation of the use case.
In the next lesson, you will learn about the use case system element.

Use Case Diagrams

The UML provides use case diagram notation to illustrate the names of use cases can actors, and the relationships between them (see Figure 3.3)

Partial use case context diagram
Figure 3.3 Partial use case context diagram

Use case diagrams and use case relationships are secondary in use case work. Use cases are text documents. Doing use case work means to write text.
A common sign of a novice (or academic) use-case modeler is a preoccupation with use case diagrams and use case relationships, rather than writing text. World-class use case experts such as Anderson, Fowler, Cockburn, among others, downplay use case diagrams and use case relationships, and instead focus on writing. With that as a caveat, a simple use case diagram provides a succinct visual context diagram for the system, illustrating the external actors and how they use the system.
Suggestion: Draw a simple use case diagram in conjunction with an actor-goal list.
A use case diagram is an excellent picture of the system context; it makes a good context diagram, that is, showing the boundary of a system, what lies outside of it, and how it gets used. It serves as a communication tool that summarizes the behavior of a system and its actors.

Elements of Use Case Diagram

The diagram below shows the elements of a use case diagram.
Use case diagram

  1. Use case: This element is used to identify a goal of the system.
  2. Actor: This element could represent a role played by a person, a system, or a device that will use the system.
  3. Association: This element describes the fact that two elements interact with each other.
  4. System: This element represents the system in the context of the actors who use it and the features it must provide for them.