Usecase Diagram
Overview
Use case diagrams can be used to describe the behavior of the system in response to user requests.
This page explains the operations for using use case diagrams in the following order.
- Place use case diagram
- Define use case
- Define the actor
- Define relationships
Place the use case diagram
To place a use case diagram, follow these steps:
- Select the package in the model navigator and click [Add Model] > [Usecase Diagram] in the context menu.
- The use case diagram is placed in the child element of the selected package.
Define your use case
To define a use case, follow these steps:
- Drag and drop [Use case] from the toolbox onto the displayed use case diagram.
- A new use case is added as a sibling element of the displayed use case diagram.
You can add the following elements displayed in the toolbox to the use case diagram.
Icon | Name |
---|---|
Package | |
Use case | |
Actor | |
Note | |
Label | |
Shape |
Add stereotypes to your use case
To add a stereotype, follow these steps:
- Select a use case.
- Click the Add button in the Basic information > Stereotype field in the Property Inspector to display the choices.
- Select a stereotype and press the [OK] button to set the stereotype to the use case and display the stereotype on the use case diagram.
Stereotype choices can be defined in the package model's Detail view.
Once you've added a stereotype, you can edit it from your use case diagram by following these steps:
- Double-click the stereotype displayed in the use case to enter the editing state.
- If you change the stereotype and confirm the edit, it will be reflected on the use case diagram and the stereotype of the use case will be changed.
If you want to display an existing use case on the use case diagram, you can display it by dragging and dropping the use case on the model navigator onto the use case diagram.
Define the actor
To define an actor, follow these steps:
- Drag and drop [Actor] from the toolbox onto the displayed use case diagram.
- A new actor is added as a sibling element to the displayed use case diagram.
Define relationships
To define an association, follow these steps:
- Move the pointer over the use case you want to associate.
- Drag the [▲] icons that appear on all sides of the use case and drop them onto the other use case.
- A list of relationships that can be added will be displayed. Select the relationship you want to add, and the selected relationship will be added.
The following relationships are available in use case diagrams:
Icon | Name |
---|---|
Actor related | |
Depends | |
Inheritance |
Add stereotypes to associations
To add a stereotype, follow these steps:
- Select an association.
- Double-click the grayed-out [<<stereotype>>] to enter editing mode.
- Enter the stereotype you want to set, the stereotype will be displayed in the relationship in the use case diagram, and the stereotype will be set in the relationship.
If you want to express inclusion or extension, define a dependency association and express it using a dependency stereotype.
Restrictions
- It is not possible to define extension points for use cases.
- Substitute packages for system boundaries.