From now and then I have to create UML diagrams to model certain parts of software projects, especially for the University. Initially, creating. Introduction. UML defines three stereotypes of association between Use Cases, « include», «extend» and generalisation. For the most part, the popular text. This use case diagram relationships tutorial will cover all you need to know about relationships in use cases. Learn about include, extend.
The extend relationship is used to segment out conditional or optional functionality, and is comparable to an alternate flow. Often while writing use cases alternate flows can become quite complex, or can span additional subflows. This is when it may make sense to extract the alternate flow as a separate use case which extends the base use case.
This is called an extension use case.
uml - What's is the difference between include and extend in use case diagram? - Stack Overflow
Of course this is only advantageous if the flow to be extracted is reasonable self-contained from the main flow. If the two are too intermingled then the extension use case will be difficult to understand. The extension use case is aware of and can modify the behavior of the base use case. However, the base use case has no knowledge of the extension use case.
Reuse in Use-Case Models: >, >, and Inheritance
An extension use case can have one or several behavioral sequences called segments that modify the base use case. Each segment augments the base use case at a specific extension point noted in the base use case. A large use case could have some behaviors which might be detached into distinct smaller use cases to be included back into the base use case using the UML include relationship.
The purpose of this action is modularization of behaviors, making them more manageable.
When do you use the Use Case relationship Extend versus Include?
Use case B is extracted from larger use case A into a separate use case. Use cases B and C are extracted from larger use case A into separate use cases.
When two or more use cases have some common behaviorthis common part could be extracted into a separate use case to be included back by the use cases with the UML include relationship. Execution of the included use case is analogous to a subroutine call or macro command in programming.
All of the behavior of the included use case is executed at a single location in the including use case before execution of the including use case is resumed. Note, while UML 2. Including use case depends on the addition of the included use case, which is required and not optional.
It means that including use case is not complete by itself, and so it would make sense to refer to the including use cases as abstract use cases.