lenhhoxung
lenhhoxung

Reputation: 2756

Show condition in use case diagram

In my system, a user can have more than one role. Users with two roles or more can switch between roles. However, it's impossible to switch role for a user with only one role. How can I represent this fact in use case diagram?

enter image description here

Thank you.

Upvotes: 4

Views: 5386

Answers (2)

Geert Bellekens
Geert Bellekens

Reputation: 13711

You shouldn't show that condition in the use case diagram. The use case diagram is meant to give you a helicopter view of the features of the application and hide all the details.

You can put the condition in the pre-condition of the use case. So if you put User must have more then one role as pre-condition then the use case doesn't even start if that condition is not true.

PS. I'm assuming that your Role is a different concept from the roles represented by the actors and that Role could have been Account or Group or something else.

Upvotes: 3

qwerty_so
qwerty_so

Reputation: 36305

You don't. The actor represents a role he plays. And whether users can take certain roles is an organizational question. You might show a diagram with actors instances where you describe those organizational constraints.

You can use Generalization to show that there's a role hierarchy.

Upvotes: 2

Related Questions