asynchronoussynchronizationumlmessagesequence-diagram

Sequence diagram synchronous and asynchronous messages


I am not quite sure that I am using synchronous and asynchronous messages correctly in the diagram I have built.When we talk about asynchrony, the sequence of actions is lost. Does this mean that I can remove an announcment even before I add information about it? Сorrect me if I'm wrong. Also I will be grateful for an explanation if there is something contradictory in my diagram.

enter image description here


Solution

  • The asynchronous message means that the sender doesn't wait for the response and continue its execution. Looking at the incoming and outgoing message on each line separately, we could imagine that:

    However, the sequence diagram is not meant to be a specification of an algorithm. Some use it for visual programming, but your question demonstrate it isn't. In fact the sequence diagram represents a typical scenario. And in the scenario you have modelled, the order of the message is such that the announcement creation page is finished before the removal.

    Btw, the two creation messages that create a new lifeline must be a dashed line with an open arrow head. This is a special case of messages and in this case the open arrow has nothing to do with asynchronicity.