Extend is a relationship between two use cases. Where A extends B, it means A describes more specific behavior and B the general version of that behavior.
In many respects extend is like generalization. However the key difference is that the extended use case defines extension points (see Section 16.4, “Extension Point”), which are the only places where its behavior may be extended. The extending use case must define at which of these extension points it adds behavior.
This makes the use of extend more tightly controlled than general extension, and it is thus preferred wherever possible.
Examples for a travel agent sales system might be the use case for paying for a ticket, which has an extension point in the specification of the payment. Extending use cases may then extend at this point to pay by cash, credit card etc.
Within the UML metamodel, Extend
is a
sub-class of Relationship
.
An extend relationship is represented as a dotted link with an open
arrow head and a label «extend»
. If a
condition is defined, it is shown under the
«extend»
label (see Figure 16.1, “Possible artifacts on a use case diagram.”).
The details tabs that are active for extend relationships are as follows.
![]() | Note |
---|---|
There is no source tab, since there is no source code that could be generated for an extend relationship. |
ToDoItem
Standard tab.
Properties
See Section 16.9.2, “Extend Property Toolbar” and Section 16.9.3, “Property Fields For Extend” below.
Documentation
Standard tab. See Section 12.5, “Documentation Tab”.
Style
Standard tab
![]() | Note |
---|---|
The values for the bounds of the extend relationships appear to have no meaning. Changing them has no effect on the diagram. This is sensible behavior, given the extend is tied to a particular pair of use cases. |
Constraints
Standard tab. ArgoUML only supports constraints on Classes and Features (Attributes, Operations, Receptions, and Methods), so this tab is grayed out.
Tagged Values
Standard tab. In the UML metamodel,
Extend
has the following standard
tagged values defined.
derived
(from the
superclass, ModelElement
). Values
true
, meaning the extend relationship is
redundant—it can be formally derived from other
elements, or false
meaning it
cannot.
![]() | Note |
---|---|
Derived extend relationships could have their value in analysis to introduce useful names or concepts. |
Go
up
Navigate up through the package structure of the model. For a extend this will be the package containing the extend.
Add extension
point
This creates a new use case extension point within the namespace of the current extend relationship, with the current extend relationship as its first extending relationship.
![]() | Tip |
---|---|
While it is perfectly valid to create extension points from an extend relationship, the created extension point will have no associated use case (it can subsequently be set up). It would be more usual to instead create the extension point within a use case and subsequently link to it from an extend relationship (see Section 16.9.3, “Property Fields For Extend” below). |
Delete
This deletes the selected extend relationship from the model.
![]() | Warning |
---|---|
This is a deletion from the model
not just the diagram. To delete a
extend from the diagram, but keep it within the model,
use the main menu |
Name
Text box. The name of the extend relationship.
![]() | Tip |
---|---|
It is quite common to leave extends unnamed in use case analysis. |
![]() | Note |
---|---|
ArgoUML does not enforce any naming convention for extend relationships. |
Stereotype
Drop down selector. ArgoUML does not provide any stereotypes by default.
![]() | Tip |
---|---|
Stereotyping does not have great value on an extend relationship. |
![]() | Note |
---|---|
There is no representation of the stereotype of an extend relationship on the diagram. |
Navigate Stereotype
icon. If a
stereotype has been selected, this will navigate to the
stereotype property panel (see Section 15.4, “Stereotype”).
Namespace
Text box. Records the namespace for the extend relationship. This is the package hierarchy.
Button 1 Double Click on the entry will navigate to the package defining this namespace (or the model for the top level namespace).
Base Use Case
Drop down selector. Shows the use case that is being extended by this extend relationship. Button 1 click on this entry will give a drop down menu of all available use cases (and an empty entry) which may be selected by button 1 click.
Extension
Drop down selector. Show the use case that is doing the extending through this extend relationship. Button 1 click on this entry will give a drop down menu of all available use cases (and an empty entry) which may be selected by button 1 click.
Extension Points
Text box. If this use case is, or can be extended, this field lists the extension points for the use case.
![]() | Note |
---|---|
Extension points are listed by their location point rather than their name. |
Where an extension point has been created, button 1 Double Click will navigate to that relationship. Button 2 gives a pop up menu with two entries.
Add
.
The selected extension points window opens.
In this window it is possible to select extension points.
New
.
Add a new extension point
before the current extension point in the list and navigate to
it. The current extend relationship is added as the first in list
of extending relationships of the new extension
point.
Condition
Text area. Multi-line textual description of any condition attached to the extend relationship.