Hi,
It's ten years since this thread was started. I didn't find a helpful answer on how to model multi-threaded / parallel processing with EA in sequence diagrams on this forum. Unfortunately, the Zicom Mentor link didn't work for me. But I was lucky enough to collect partial UML know-how on the net. Here are my conclusions (might require verification).
[*]UML sequence diagram models a single-threaded view. It was the first thing I had to realize myself.
[*]Every activation (or execution occurrence) should therefore refer to the activity in the modeled execution thread. Mixing activations of different threads in one diagram looks reasonable only in the "parallel-interaction fragment". Doing it without or outside "par" makes the diagram ambiguous/unreadable.
[*]
Every asynchronous message implies existence of some kind of multi-threading. Typically, one thread does the sending only. The execution is in the other thread and thus requires no activity of the sending thread. => At one end of an asynchronous message, there should be only a short activation rectangle (represents the sending).
[*]The "parallel-interaction fragment" ("par") makes it possible to switch the thread context for the messages within its partitions. In every partition, you can model a different thread.
[*]If I would like to have a diagram modeling
parallel processing explicitly (not relying on the implied parallelism of an asynchronous message),
I would prefer an activity diagram.
[/list]
Here are some examples. All of them try to model the cooperation of 3 threads, a client, a timer server and a processing server. I hope, the use case is clear (a timer guards the processing time).
[*]Sequence_test_parallel_1.png shows my first direct approach. It looks ok according to UML. I didn't like it however. It came to me, that implementing it strictly would require the messages startTimer and startProcessing to be called from different threads.
[*]Sequence_test_parallel_2.png shows how I dealt with the above. It clearly shows, how I failed to let go of my wrong interpretation of activation rectangle. It is definitely mixing threads outside of the "par". It's not ok.
[*]Sequence_test_parallel_3.png shows how I corrected the above. This looks correct, if your implementation will cancel the processing/timer immediately during sending of expiredTimer/doneProcessing. If your implementation only signals to the client thread, the cancellation is done in the client thread and thus its activation does not belong to any partition of "par", the diagram would not fit.
[*]Sequence_test_parallel_4.png shows what I ended-up with, after cleaning the diagram of unnecessary elements. Well, it probably is not, what you would expect to get, when you are modelling parallel processing. I would end-up with three sequence diagrams modelling the activity within client, timer and server threads separately. However, it looks unambiguous, clean and readable to me, which is what I prefer with UML.
[/list]
All of the diagrams have been created with EA10.
Best regards
Martin



