I do not understand well following topic since it is a bit ambiguous from what I read:
- Inlcude is like a reference to next part, the usecase is not completed without it. This part should be referenced from more places otherwise its use has no sense.
But I have seen an example when there is “include” only in some IF statement is true, like:
Add new product—>include—>Add new manufacturer. //Adds only when doesnt exist. Why there isnt “extend”? Is it because somewhere else could be “Add new manufacturer” used once again?
Thanks
Exactly. Once you extend another use case you’ve reached the end of your current use case. However, you can have extend inside an if. Imagine the following.
An include doesn’t end a use case, it uses another use case and then returns. An include is similar to a function call. You perform the actions in the other function and then you return and continue. You can also have an include without an if statement.
Notice that in the above an extend wouldn’t work. This is because the driver still needs to go to the second window and get the food. If we extended to use case 3 then we would never return to this use case.