uml

UML - Use Case - Identify not registered user and registered users


I'm planning to write a service of event handling (like Google's Doodle) and, in the use case diagram, I need to distinguish between registered users and not registered users. At first, I thought that:

Registered User _ is generalization of _ Not Registered User

with the following actions:

Not Registered User ---> Registration to the service

Not Registered User ---> Partecipate to an event

Registered User ---> Login to the service

But I don't know if I didn't understand the theory behind use cases: should I use only one actor ("User") and associate him all the actions, or keep this generalization?


Solution

  • Actor can be seen as the ROLE a user plays in a system. From this statement it is already clear that the single actor ("User") version does not model your situation correctly.

    Generalization between two actors gives the specialized actor access to all the use cases associated with his parent-actor. In your case I would not say that this is the case. Maybe they even have some common use cases, but they both have use cases that do not make sense for the other one. For example:

    They roles in the system are simply very different and therefore a generalization is not the perfect solution eihter.

    I would simply make 2 separate actors, that eventualy share some use cases. I will assume that Not registered user can also participate in an event (maybe restricted), just to show that they can share some use cases, without the need to use generalization:

    enter image description here