Can two actors both required for a usecase be the same person?

Viewed 719

I have been presented with the following use case diagram.

Activity case

The given question was "How many people are required for the Use Case?".

I was taught, that Actors are used to model certain roles in the domain and that a "real" person can take multiple roles.

Going strictly by that definition, a single person with both roles should be enough, but I am not sure whether I am missing something, since intuitively there should be a reason, why there are two actors present. Can a single "real" person be enough here?

2 Answers

The question seems to assume that actors are people. However this is not the case: an actor can be another system interacting with the subject of your use case.

So strictly speaking, if A and B would be systems, then no people would be required at all.

But even if all actors in the diagram would be humans: the multiplicity of actors in your diagram is not specified. This creates an ambiguity. Most people assume it means 1, i.e. 1..1, i.e. a mandatory actor. As Axel explained in the comment, this would be the correct interpretation of the UML specs (it's not written black on white, but some inferences allow to deduct it). However many people also used to represent an association of a use-case with all primary actors that can possibly be involved without explicitly mentioning a 0..1 optional multiplicity (probably because it was newly introduced with UML 2.5). Therefore, in practice there is still an ambiguity if both actors are really mandatory.

Finally, as you already rightly analysed and Bruno confirmed, even if both actors would be required it could be the same person.

Yes this is possible.

For instance imagine a system allowing to trace bugs in a software, the actors can be

  • user : person adding a new bug report in the system to signal the problem
  • corrector : person correcting the bug

enter image description here

In case the bug detected in intern by the persons developing the software are traced a same person of that team can have the two roles


In my forum when a user requests to register I manually accept or not the registration to reject spammers

enter image description here

be sure to test I played the role of both a user and the administrator

Etc, there are lot of cases like that

Related