Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Model parametrized API Call in Activity Diagram

I have an an activity diagram with two swimlanes (Client and Server). I want to model a request call from Client to Server.

  1. Is it correct to use Signals Notation for Calls between systems? Are there alternatives?
  2. The call is parametrized, Client wants to send something which was created before. How to model this?

Thankful for any hint! Here's my example: link

like image 333
user6903701 Avatar asked Nov 03 '17 05:11

user6903701


2 Answers

My answer has to be improved, but here is a first step.

The norm/spec says: "A SendSignalAction is an InvocationAction that creates a Signal instance and transmits the instance to the object given on its target InputPin. A SendSignalAction must have argument InputPins corresponding, in order, to each of the (owned and inherited) Properties of the Signal being sent, with the same type, ordering and multiplicity as the corresponding attribute.

And a SendSignalAction has an association to a target objet which is an input pin.

So for your question about Request:item I would use input pin, one for the object from which the Signal is created and one to define the Target. (in the schema the target comes from an output pin but a data store may be use). Then after sending the request, the client is waiting the answer. The AcceptEvent is linked to a trigger (not shown on the schema) which a signal, the one created by the server. But you can not link SendRequest of Client to ReceiveRequest of Server because this is not how it runs.

For the server, you can do similar reasoning.

enter image description here

like image 53
granier Avatar answered Nov 11 '22 09:11

granier


Concerning the parametrization of the call I would use InputPin to model the arguments of the Call i.e. the Object sent by the Call as shown below. enter image description here

Signal and Call Notations are correct for me but I am not used to have the sending and receive action in the same diagram so will suggest two alternatives. 1) First remove them... enter image description here

2) Separate Client and Server Modelling enter image description here enter image description here

Let me know what you think about that and what seems to be clear for you... I also recognize the tool you used so please find my project at:

https://www.dropbox.com/s/s1mx46cb3linop0/Project1.zip?dl=0

like image 42
Red Beard Avatar answered Nov 11 '22 11:11

Red Beard