Use-case diagram - include and extend

3

Questions have been asked similar to what I'm going to do, but I can not understand and apply to my scenario.

I have the following registrations:
 - Equipment category registration
 - Equipment Registration

To register an item, you must select an item category.

What would my use case diagram look like? Register equipment includes category or register category extends to register equipment?

    
asked by anonymous 18.11.2015 / 16:44

1 answer

3

First of all, we need to understand the differences between the two use-case relationships.

Inclusion relationship

This is when a base use case makes use of the extended use case. The base use case, when finding the point at which the inclusion relationship is defined, then at this point the execution of the use case instance is transferred to the included use case, and an instance of it is created. When the execution of the included instance of the use case ends, then the control returns to the base use case at the same previous point.

The inclusion relationship is not conditional.

Extensionrelationship

Theextensionrelationshipisconditional,whichmeansthatitsexecutiondependsonwhathappenedduringtheexecutionofthebaseusecase.Thebaseusecasedoesnotcontroltheconditionsoftheextension'sexecution.Theseconditionsaredescribedintheextensionrelationship.

Source: Structure the use cases - Aluízo Saiter

Solution

As you said that the category can be created even without an equipment for it, there will be no chance of the "Register category" use case include or extend the "Register equipment". What will link the two use cases is when the user creates a device for a category that does not exist.

Therefore, because there is a condition, the correct thing is that the use case "Register equipment" extends "Register category".

    
18.11.2015 / 17:23