A sequence diagram is a diagram on which for a certain set of objects on a single time axis the life cycle of a certain object (creation-activity-destruction of a certain entity) and the interaction of actors (actors) of IP within or a specific precedent (sending requests and receiving answers). Used in the UML language.
The main elements of the sequence diagram are the designations of objects (rectangles with the names of objects), vertical “ lifeline ” ( English lifeline ), representing the passage of time, rectangles reflecting the activity of the object or its performance of a certain function (rectangles on the dotted “life line”), and Arrows showing the exchange of signals or messages between objects.
In this diagram, objects are arranged from left to right.
Content
Chart Examples
Arrow Types
As mentioned above, the interaction between the actors is displayed using special arrows that transfer control from the sender (from whom the arrow is coming) to the receiver (the one to whom the arrow is directed). The arrows show the course of the scenario and those events that occur during the analyzed use case. There are 5 types of arrows in total:
- Synchronous message - the sending actor transfers control to the receiving actor, who needs to take some action in the use case. Until the action performed by the recipient actor is completed (accordingly, a response message will not be received), the sending actor loses the ability to perform any action. It is graphically depicted as an arrow with a filled triangle, after which there is a rectangle reflecting the activity of the object, at the end of which there is a response message.
- Reply message - this message is a response to a synchronous message. Usually, it contains some value returned to the original actor-sender, also returning control to it (the ability to act).
- Asynchronous message - the sending actor transfers control to the receiving actor, which needs to take some action in the use case. The main difference from a synchronous message is that the sending actor does not lose the ability to perform other actions.
- Lost message - a message without a recipient (there is a sender, no recipient).
- Found message - message without sender.
The last two types of arrows (interactions) are used extremely rarely. They are mainly used to demonstrate the interaction of existing objects in this use case with external systems.