I am looking on a sequence diagram similar to the attached snapshot, object A instantiated 3 actions on same activation bar and received by object B with same activation bar as well.
So can I say the 3 functions are being executed one after one? Since they are solid arrowhead, I not sure my understanding is correct.
Please advise, thanks.
can I say the 3 functions are being executed one after one? Since they are solid arrowhead
The arrows indicate synchronous messages, so the second message cannot be send before the end of the execution of function A, the first cannot be sent before the end of the execution of function B and ExecutionSpecification on the lifeline of Object A cannot end before the end of the execution of function C.
object A instantiated 3 actions on same activation bar
All these three messages can start from the same ExecutionSpecification on the lifeline of Object A
3 actions ... received by object B with same activation bar
This is invalid, an ExecutionSpecification represents the execution of one and only action/behavior, so you need three ExecutionSpecification on the lifeline of the Object B, you cannot have only one.
A valid diagram can be :
or also showing the returns :
(on them function_c
is not immediately called when function_b
returns, the execution on object a does 'something' before introducing a delay, and also 'something' after)
from your remark :
From the requirements saying these 3 functions should be executed by objectB concurrently. That means i should use line arrow head instead of solid arrow head? And can i use the same ExecutionSpecification on objectB if functions are executed concurrently?
If you use asynch calls (open arrow head) there is no return message, so object a cannot know when the execution ends and it can sent immediately the next message.
The fact the 3 functions should be executed by object b concurrently is something else, asynch calls can be executed in sequence by the receiver, and the fact the receiver does concurrent executions does not imply asynch calls, but yes you can use asynch calls.
You still have to use 3 ExecutionSpecification on object b, to show concurrent execution just use a combined fragment "par".
So for instance :