Patterns
Commonality: Reuse
Model
Description
The Commonality: Reuse pattern consists of three use cases. The first, called Common Sub-Sequence, models the sequence of actions that is to appear in multiple use cases in the model. The other use cases model usages of the system that share the common sub-sequence of actions. Obviously, there will be at least two of them.
Applicability
In this pattern, the sub-sequence must be in one piece; that is, all of it must be included as one whole. Furthermore, no references must be made from the sub-sequence to where it is to be used, because the inclusion use case must be independent of the base use cases.
Type
Structure pattern.
Commonality: Addition
Model
Description
In an alternative pattern, the Common Sub-Sequence use case extends the use cases sharing the sub-sequence of actions. The other use cases model the flows that are to be expanded with the sub-sequence.
Applicability
This pattern is preferable when other use cases are complete on their own; that is, they do not require the common sub-sequence of actions to model complete usages of the system.
Type
Structure pattern.
Commonality: Specialization
Model
Description
Another Commonality pattern contains use cases of the same kind. In this case, they are modeled as specializations of a Common Usage Type use case. All actions in the Common Usage Type use case are inherited by the child use cases, where other actions may be added or the inherited actions may be specialized.
Applicability
This pattern is applicable when the usages modeled by the use cases are of the same type, and this type should be made visible in the model.
Type
Structure pattern.
Commonality: Internal Reuse
Model
Description
If the sub-sequence of actions is used in multiple places in only one use case, there is no need to extract the sub-sequence into a separate use case. Instead, it should be described in a separate sub-section in the description of the use case. This sub-section will be referenced from the different locations in the description of the use case where the sub-sequence of actions is to be performed.
Applicability
This pattern is preferred when the common sub-sequence appears in multiple places in only one use case.
Type
Description pattern.