Use case diagram - include and extend

Asked

Viewed 3,147 times

4

Questions like the one I’m about to ask have been asked, but I can’t understand and apply to my scenario.

I have the following records:
- Register of equipment category
- Equipment register

To register an equipment, it is necessary to select an equipment category.

How would be my use case diagram? Registering equipment includes register category or register category extends registration equipment?

exemplos

  • What does the category or equipment register first? For example, first you create an empty category, then you create the equipment of that category? That’s it?

  • In fact the cadastrar equipamento should call selecionar categoria and not cadastrar, or I’m wrong?

  • First the category. When entering the equipment registration, has a combobox with the existing categories, but if there is no user wants, has a button next to that opens the category registration, when the screen closes, updates the combobox.

  • So category can never call the cadastrar equipamento. Now you have to see if the equipment will include or extend the category.

1 answer

3


First of all we need to understand the differences of the two relationships of use cases.

Relationship of inclusion

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 that 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 use case instance ends, then the control returns to the base use case in the same previous point.

The inclusion relationship is not conditional.

inclusao

Relationship of extension

The extension relationship is conditional, which means that its execution depends on what happened during the execution of the base use case. The base use case does not control the conditions of the extension execution. These conditions are described in the extension relationship.

extensao

Source: Structuring use cases - Aluízo Saiter


Solution

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

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

  • thanks. in the case of the diagrams I drew, the second is correct or I need to invert the arrow?

  • 1

    Needs to reverse.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.