Download as pdf or txt
Download as pdf or txt
You are on page 1of 26

Sequence

Digram
present by : Raghad Khlaf , Duha Aqeel, May Mofiz, Najd Bader
Introduction
• There are 3 types of Interaction diagrams :
Sequence diagrams, communication diagrams, and timing diagrams.

• Sequence Diagrams are interaction diagrams that detail how operations are
01
carried out. They capture the interaction between objects in the context of a
collaboration. Sequence Diagrams are time focus and they show the order of 02
the interaction visually.
03
• These diagrams are used by software developers and business professionals to
04
understand requirements for a new system or to document an existing process.
Sequence diagrams are sometimes known as event diagrams or event scenarios. 05

06
Benefit of Sequence Digram

Help you discover architectural, Plan and understand the


01 interface and logic problems early. 04 detailed of an future scenario .

01
Can be used as can easily update as per the
02 Collaboration tool 05 new change in the system.
02

03

depicts the message flow 04


03 Can be used as 06
Documentation between the different objects. 05

06
01
Actor
• A role played by an entity that interacts with the subject is called as
an actor.
• It represents the role, which involves human users and external
hardware or subjects.
• An actor may or may not represent a physical entity, but it purely 01
depicts the role of an entity.
02
• Several distinct roles can be played by an actor or vice versa.
03

04

05

06
02 Object
• Object in a sequence diagram is drawn as a rectangle containing
the name of the object, and it participates in a sequence by
sending or receiving message .

• Objects take on the responsibility for things like managing data, 01


moving data around in the system, responding to inquiries, and
02
protecting the system. Objects work together by communicating
or interacting with one another. 03

04

05

06
Purpose of Sequence Diagram:

•Model high-level interaction between active objects in a


system
•Model the interaction between object instances within a 01
collaboration that realizes a use case
02
• Model the interaction between objects within a collaboration
03
that realizes an operation
•Either model generic interactions (showing all possible paths 04
through the interaction) or specific instances of a interaction 05
(showing just one path through the interaction)
06
03
Lifeline
Represents the passage of time as it extends downward. This
dashed vertical line shows the sequential events that occur to
an object during the charted process. Lifelines may begin
with a labeled rectangle shape or an actor symbol . Contains
01
an X at the point at which the class no longer interacts
02

03

04

05

06
04 An execution
occurrence
An execution occurrence: Is a long narrow rectangle placed
atop a lifeline,Represents the time needed for an object to
complete a task. The longer the task will take, the longer the
activation box becomes. Denotes when an object is sending
01
or receiving messages
02

03

04

05

06
Example :

01

02

03

04

05

06
05 Messages
Transfers information from one object to another
1- Synchronous message: A synchronous message requires a response
before the interaction can begin, and is usually drawn using a line with a
closed arrowhead, with the arrow pointing from one object to another.
2- Asynchronous message: An asynchronous message is used when the
01
message caller does not wait for the receiver to process the message and
return before sending other messages to other objects within the system. 02
3- Reply or return message: The reply message is drawn with a dotted line
03
and an open arrowhead indicating the original life line.
04

05

06
4-Self Message – Certain scenarios might arise where the object needs to
send a message to itself. Such messages are called Self Messages and are
represented with a U shaped arrow

5-Found Message – A Found message is used to represent a scenario 01


where an unknown source sends the message. It is represented using an
02
arrow directed towards a lifeline from an end point. For example: Consider
the scenario of a hardware failure. 03

04

05

06
6-Lost Message – A Lost message is used to represent a scenario where the
recipient is not known to the system. It is represented using an arrow directed
towards an end point from a lifeline. For example: Consider a scenario where a
warning is generated.
01
7-Delete Message – We use a Delete Message to delete an object. When an
object is deallocated memory or is destroyed within the system we use the 02
Delete Message symbol.
03

04

05

06
Example:

01

02

03

04

05

06
06

Guard Condition
Represent a test that must be met for message to be sent
The guards condition: The sentinel indicates a sentence
written next to the decision node on an arrow sometimes
within square brackets, the sentence must be true for the 01
control to turn in a certain direction. The guards help us
02
know the constraints and conditions that define the flow
03
of the process.
04

05

06
07 Object destruction
An X is placed at the end of an object's lifeline to show that it is going out
of existence.-The object destructuring is a useful JavaScript feature to
extract properties from objects and bind them to variables.

01

02

03

04

05

06
08

Frame
Indicates the context of the sequence diagram. Frames
are a special case in JavaScript — each frame behaving
like the separate document that it is. This means that
to modify anything in another frame, you first need to 01

gain control of this frame 02

03

04

05

06
Example:

01
Drinks
02

03

04

05

06
Thank you
For listening

You might also like