Creating a Dependency Relationship
Use cases can have Include and Extend relationships with other use cases.
Note
Extend and include relationships cannot be created using the Dependencies tool window or Dependency Editor.
Creating an Extend Relationship Between Use Cases
Context
You can use an extend behavior between use cases to set that a use case (source) displays an extension of the behavior of the linked use case (target).
In accordance with UML, the behavior that displays a use case can be used by multiple use cases. This extends the function of the linked use cases. The extend dependency is depicted by means of an arrow from the extending use case that provides the behavior to the use case that is extended by the behavior.
Extend identifies a can relationship. A use case can be extended by various .
You can assign an extension point to an extend dependency and show at which point in time an extension takes place in the flow, i.e. use of the respective behavior of the extending use case.
Note
An extend relationship is always created from the extending source element to the extended target element. The target element is always extended if you do not enter a condition for the extend relationship.
How to proceed
-
Select a use case in the diagram.
The carousel appears.
-
Move the mouse pointer over the
Extend Relationship connection type.
-
Drag the link with the mouse button pressed to the existing target element and release the mouse button to create an extend relationship to an existing use case.
You have created an extend relationship between the use case (source) with a behavior and the use case (target) with the behavior to be extended.
-
Drag the link with the mouse button pressed to the existing target element and release the mouse button to create an extend relationship to an existing extension point of a use case.
You have created an extend relationship between the use case (source) with a behavior and the use case (target) with the behavior to be extended. At the same time, through the direct reference to the extension point, you have assigned the extension point to the extend dependency.
Alternatively, you can make the assignment of an extension point using drag-and-drop by dragging the extension point to the relationship, or you can do it in the Properties tool window.
-
If you want to create an extend relationship to a new use case instead, drag the link with the mouse button pressed to the free target position and release the mouse button.
The Create Connection dialog appears.
-
Select the use case.
A use case with a behavior to be extended and the extend relationship from the source element are inserted in the diagram. The use case is integrated into the model structure. A unique name is created and selected.
-
Enter the use case's name and then press the [Enter] key.
The use case is renamed. An error message appears if the name entered is not unique.
Setting a Condition for an Extend Relationship
Context
You can enter an extension condition for the extend relationship; this can then be assigned to one or more extension points. The condition is checked when the extension point is reached. If the condition is missing, then the use case is always extended.
How to proceed
-
Select the extend relationship you want to set a condition for.
-
Enter the condition that the extension of the extended use case should cause the linking extending use case to occur in the Properties tool window in the Properties tab in the Condition field. If the extended use case has multiple extension points, then explicitly enter the extension point you want the condition to apply to. Then press the [Enter] key.
You have set a condition for the extend relationship.
Creating an Include Relationship Between Use Cases
Context
You can use an include relationship between use cases to set that the selected use case always imports the behavior of the linked use case.
The behavior that is a set component of multiple use cases is linked with this by the include relationship. It is shown by an arrow from the use case that always uses the behavior to the use case that prepares the behavior.
Include portrays a must relationship; it describes that a use case is always used by another in its flow. This relationship is often made up of combined sequences in various use cases to a single use case.
Note
An include relationship is always created from the dependent importing source element to the independent always included target element that prepares the behavior.
How to proceed
-
Select a use case in the diagram.
The carousel appears.
-
Move the mouse pointer over the
Include Relationship connection type.
-
Drag the link with the mouse button pressed to the existing target element and release the mouse button to create an include relationship to an existing use case.
You have created an include relationship between the use case (source) that always imports a behavior and the use case (target) that prepares the behavior.
-
If you want to create an include relationship to a new use case instead, drag the link with the mouse button pressed to the free target position and release the mouse button.
The Create Connection dialog appears.
-
Select the use case.
A use case with a behavior that should always be imported in the source element and the include relationship from the source element are inserted in the diagram. The use case is integrated into the model structure. A unique name is created and selected.
-
Enter the use case's name and then press the [Enter] key.
The use case is renamed. An error message appears if the name entered is not unique.