The Complete Project Source Code Platform

Kashipara.com is a community of ONE million programmers and students, Just like you, Helping each other.Join them. It only takes a minute: Sign Up

Buy a laptop for coding and programming Buy a programming books

What is Sequence Diagram?


Sequence Diagrams tutorial and examples

Sequence diagrams is a kind of interaction diagram because it describes how—and in what order—a group of objects works together. They're also called event diagrams. This allows the specification of simple runtime scenarios in a graphical manner. The sequence diagram has four objects (Customer, Order, SpecialOrder and NormalOrder).

The first call is sendOrder () which is a method of Order object. The next call is confirm () which is a method of SpecialOrder object and the last call is Dispatch () which is a method of SpecialOrder object. The following diagram mainly describes the method calls from one object to another, and this is also the actual scenario when the system is running.

Symbols or Notation Used in Sequence Diagram

Object

The object symbol demonstrates how an object will behave in the context of the system. object are represented by rectangles.

Object

Activation Box

An activation boxes represent the time an object needs to complete a task. The longer the task will take, the longer the activation box becomes.

Activation Box

Actor Symbol

Actoe symbol shows entities that interact with or are external to the system.

Actor Symbol

Messages

Message are represnted by arrows,use half-arrowed lines to represent asynchronous messages. Asynchronous messages are sent from an object that will not wait for a response from the receiver before continuing its tasks.

Messages Messages

Lifelines

Place multiplicity notations near the ends of an association. These symbols indicate the linking of instances of one class from another. For example, one company will have one or more employees, but each employee works for just one company.

Lifelines

Messages in Sequence Diagrams

Synchronous Message

Synchronous Message needs to wait untill the feedback is not received from the receiver and represented by soli line and solid arrowhead.

message

Asynchronous Message

Synchronous Message don't need to wait untill the feedback is not received from the receiver and represented by soli line and lined arrowhead.

Asynchronous Message

Reply or Return Message

A reply message is drawn with a dotted line and an open arrowhead pointing back to the original lifeline.

Reply or Return Message

Self Message

A message an object sends to itself, usually shown as a U shaped arrow pointing back to itself.

Self Message

Recursive Message

Recursive message is a kind of message that represents the invocation of message of the same lifeline. It's target points to an activation on top of the activation where the message was invoked from.

Self Message

Create Message

This message creates a new object. it's depicted with a dashed line and an open arrowhead that points to the rectangle representing the object created.

Create Message

Delete message

Represented by a solid line with a solid arrowhead, followed by an X. This message destroys an object.

Delete Message

Duration Message

A message defines a particular communication between Lifelines of an Interaction.

Duration Message

Examples Of Sequence Diagram

Shopping Cart Sequence Diagram

Shopping Cart Sequence Diagram example

ATM System Sequence Diagram

ATM System Management Sequence Diagram example