0

Can anyone give a good example of a use case diagram involving two actors?

Also, the diagrams generally have lines without arrows to connect actors to use cases. However, when two actors are involved, do the lines have to show a direction to indicate the path of messages?

For example, I have a system in which users can form groups. One user will initiate the formation of the group and request the other user to join. So in this case the use case will be form groups and will lines connecting to use case have an arrow from the 1st user who initiates the group formation to the 2nd?

Actor 1 -> Form groups -> Actor 2

R.S.K
  • 2,114
  • 4
  • 26
  • 32
  • There is a good example at https://en.wikipedia.org/wiki/Use_case. Use case 'Order food' and two actors. One places the order, the other actor receives the order. But the actors themselves are not connected... – Rolf Schorpion Nov 17 '13 at 23:54
  • 1
    Hi, In fact you have to describe your uses cases with your **kind** of User not with a set of real users as described by spi.ng – Red Beard Nov 18 '13 at 10:20

2 Answers2

1
Actor 1 -> Form groups -> Actor 2 

- is a piece of information to be shown in some activity or sequence diagram.

On the Use Case diagram you show WHAT will be done and BY WHOM, but not in what sequence. If all users can start the group and if the user-starter has additional possibilities, then the use case will be:

enter image description here

Notice, Starter participates in group, too, but as he is getting all features from his parent, we needn't show it.

Also notice, that sequentially, Starter was a Newcomer, but he wasn't Joiner (this session). But structurally his parent is Joiner, because Starter has all his functionalities.

Gangnus
  • 24,044
  • 16
  • 90
  • 149
0

You can connect any number of actors to a single UseCase. The connection is of Association type and direction does not represent communication. By UML definition, the system executes a usecase in collaboration with actors. Actors are always external to the system that defined the usecase.

The behavior of a system which realizes a usecase can be defined by behavioral diagrams e.g. sequence, activity. Actors are represented as Lifeline in sequence or partitions in Activity.

An example could be the UseCase "Apply Payment order" of an Internet Bank application. UseCase has two connections, one to "User" and the second to "Backend System" actors. The UseCase is realized by the Internet Bank in collaboration with the user and the backend system of the bank.

starsplusplus
  • 1,232
  • 3
  • 19
  • 32
Vladimir
  • 2,066
  • 15
  • 13