Use-Case reuse: Extend vs Include generalization in UML

Two commonly used relationships to indicate potential reuse in UML use case model are <<include>> and <<extend>>.  Commonly speaking, <<include>> is used when usecase A is mandatory for Usecase B while <<extend>> is used when usecase A is optional for use case B.

However this is a very simplisitic definition of the interaction between the use cases and this needs a more elaborate treatment.
Lets try to understand the difference between the two:

A) <<include>>:


The dependency << include>> is used when you want to “call”, “invoke” or simply reuse a use case within another use case. 

Thus, when a use case A is a subset of use case B and Use case C, you can <<include>> use case A in B & C.

This dependency is commonly used:

1) when a use case compulsorily needs the behavior of another

2) to remove duplication of common elements from several use cases

3) when the included steps occur in more than one use cases.

B) << extend>>


The << extend>> relationship is used when one use case A literally extends on the behavior of another use case B. The Usecase B is fully functional in its own right and can be used independently of use case A. In case of an << extend>> the use case A may only be required for modeling optional behaviour for an otherwise independent object.

Thus the << extend>> dependency is commonly used:

1) when a use case may optionally need the behavior of another

2) to extend the behavior of a use case

By Bhaskar

My name is Bhaskar. I am a CTO and a startup techno guy with 10+ years of experience startups.
Full-time coding in Python, React. Part-time coding in Haskell, Java, C.
Scientifically interested in Music, BioInformatics, Linear Algebra, Category theory, Graph theory.

What excites me: anything that has the potential to disrupt the status quo.

Looking for technical support on a startup idea ?
write at : bhaskar {-at-}