Sequence diagram is an important tool to visualize the interaction between various objects of a business. It can be used to model both existing procedures as well as planned procedures for future. It is a formal way of assisting developers who are designing the system by giving them a clear picture of how the entire system should work in real time.
The important elements in a sequence diagram are –
Lifelines: These are the objects or actors participating in a sequence diagram
Messages: represent the communication occurring between the objects. The messages are represented by horizontal arrows between the objects.
Solid arrow with solid head - represents synchronous message from sender to receiver
Solid arrow with stick head – represents asynchronous message from sender to receiver
Dotted arrow – represents response signal from receiver to sender.
Let’s consider an example of sequence diagram for an ATM transaction between a user and ATM machine.