4

I have a use case diagram for an appointment scheduling app. The customer is usually the primary actor (e.g. when they register, search services, pick a date, etc.). In 2 use cases the customer is the secondary actor though (e.g. when they receive notifications sent by the service provider). How do I properly visualize that in the use case diagram? Duplicate the actor "customer" and place it on the left and right side. Or work with arrows?

Promeixcel
  • 41
  • 1
  • Not all conceptualizations of secondary actors would classify user receiving notification as secondary actor though, see for example: https://thetelepathic.wordpress.com/2015/11/26/use-case-actors-primary-versus-secondary/ – vrsio Mar 09 '21 at 20:44
  • @vrsio That's what people put under the acronym YMMV. And of course it does :-) – qwerty_so Mar 09 '21 at 22:10
  • 1
    @qwerty_so of course, you're right. I just wanted to point out that one possible solution to OP's question is not to visualize customer as secondary actor, at least not in those use cases, where customer does nothing apart from receiving notifications. Moreover, there are some methodologies, according to which this actually is the correct way to draw use case diagram. The article linked to in my previous comment was originally on Oracle's website (which I had bookmarked but that bookmark does not work anymore) describing the correct way to draw use case diagrams in Oracle Unified Method. – vrsio Mar 10 '21 at 19:36

1 Answers1

3

The left/right notation is a convention, not a law. I would place a primary actor always to the left, even if it is a secondary in some use case. Alternatively create more than one UC diagram where the roles can be placed as per convention. That is, in one UC diagram with the actor with his primary role and use cases and on another where the UCs using it as secondary are shown.

Duplicating an element is a fall-back at best. UML does not forbid it, but it's used only on one place with generalizations. The problem here is that you can not see on a diagram whether some element is a something else with the same name or just two renderings of the same thing. I propagate to disallow it. (In the tool I use it's even impossible to have the same element twice on a diagram.)

In the past I also had a convetion to have a «use» association for secondary actors. That's even more clear but it needs to be practiced and documented throughout the model.

qwerty_so
  • 35,448
  • 8
  • 62
  • 86
  • 2
    Another possibility is to use navigability arrows mentioned by OP to differentiate primary/secondary actors as described for example here: https://www.sparxsystems.eu/resources/project-development-with-uml-and-ea/use-case-diagram/ `Indicating a navigable association (arrow to or from an Actor), even more semantics with a use case can be expressed... When an actor navigates to a use case, then the Actor is the active party and initiates the use case. Vice versa, in navigation from use case to actor, the actor is passive and will be required and requested by the use case to participate.` – vrsio Mar 09 '21 at 20:48
  • 1
    @vrsio Yes, another "YMMV" here. There is no right way, Just it should be handled consitently in a modeling domain which often turns out to be tough enough. Many cooks spoil the broth. And many modelers the model. – qwerty_so Mar 09 '21 at 22:12