0
votes

I have to model the following scenario in a UML Activity Diagram: there is an Activity, that must performed in parallel on two different data values.

In particular, in my case, I have a Player chooses actions Activity that must be performed in parallel by Player 1 and Player 2. At the moment I am representing that parameter value (i.e. the player name) in brackets after the label of the Call Activity Action, but I don't think it is the correct UML way to represent it.

A piece of my Activity Diagram

How can I do it?

1

1 Answers

1
votes

On activity definition use activity parameter nodes (a small rectangle crossing activity border) When depicting an action of activity call, use pins. Each in and inout parameter of activity will have a corresponding input pin (respectively out and inout parameter will have output pin). Now if the previous activity has two output pins (one for each player) when the activity ends out will offer a token on each of its output pins so it works as implicit fork. So object flow will go from one output pin to input pin of (in your case) left action (P1) and another object flow will go from the second output pin to the input pin of right action.

Pins are object nodes so we'll be labeled with object name and type (_P1:Player_).

Sorry I don't have access to a tool compliant to this part of specification to give you an example.