SlideShare a Scribd company logo
1 of 56
OOAD
Interaction
Diagram
Interaction Diagram
• From the name Interaction it is clear that the
diagram is used to describe some type of
interactions among the different elements in
the model.
• Interaction diagrams are models that describe
how a group of objects interact / collaborate
in some behavior - typically a single use-case.
Interaction Diagram
• Purpose
–To capture dynamic behaviour of a system.
–To describe the message flow in the system.
–To describe structural organization of the
objects.
–To describe interaction among objects.
Forms of Interaction Diagram
• This interactive behaviour is
represented in UML by two diagrams
known as
– Sequence diagram and
–Collaboration diagram.
Drawing the interaction diagram
• The purpose of interaction diagrams are to capture
the dynamic aspect of a system.
• Dynamic aspect can be defined as the snap shot of
the running system at a particular moment.
• So the following things are to identified clearly
before drawing the interaction diagram:
– Objects taking part in the interaction.
– Message flows among the objects.
– The sequence in which the messages are flowing.
– Object organization.
Sequence Diagram
• Describe the flow of messages, events, actions
between objects .
• An important characteristic of a sequence
diagram is that time passes from top to bottom
and model important runtime interactions
between the parts that make up the system.
• Typically used to document and understand
the logical flow of the system .
Sequence Diagram Key Parts
• participant: object or entity that acts in the
diagram
message: communication between participant
objects
• the axes in a sequence diagram:
• –horizontal: which object/participant is acting
• –vertical: time (down -> forward in time)
Sequence Diagrams Dimensions
• Time. The vertical axis represents time proceedings
(or progressing) down the page. Note that Time in a
sequence diagram is all a about ordering, not
duration. The vertical space in an interaction diagram
is not relevant for the duration of the interaction.
• Objects. The horizontal axis shows the elements
that are involved in the interaction. Conventionally,
the objects involved in the operation are listed from
left to right according to when they take part in the
message sequence. However, the elements on the
horizontal axis may appear in any order.
Sequence Diagram (make a phone call)
Object
• Objects as well as classes can be targets on a
sequence diagram, which means that
messages can be sent to them.
• A target is displayed as a rectangle with some
text in it. Below the target, its lifeline extends
for as long as the target exists. The lifeline is
displayed as a vertical dashed line.
Object
• The basic notation for an object is
where 'name' is the name of the object in the
context of the diagram and 'Type' indicates the type
of which the object is an instance.
• Both name and type are optional, but at least one of
them should be present.
Object (Examples)
Object (Examples)
• As with any UML-element, we can add a stereotype
to a target. Some often used stereotypes for objects
are «actor», «boundary», «control», «entity» and
«database».
MultiObject
• When we want to show how a client interacts
with the elements of a collection, we can use
a multiobject. Its basic notation is:
Lifelines in UML diagrams
• In UML diagrams, such as sequence or
communication diagrams, lifelines represent
the objects that participate in an interaction.
• Lifeline is a named element which represents
an individual participant in the interaction.
• For example, in a banking scenario, lifelines
can represent objects such as a bank system
or customer.
• Each instance in an interaction is represented
by a lifeline.
Lifelines in Sequence diagrams
• Lifeline in a sequence
diagram is displayed with
its name and type in a
rectangle, which is called
the head. The head is
located on top of a vertical
dashed line, called the
stem, which represents the
timeline for the instance of
the object.
Messages
• Messages (or signals) on a sequence diagram are
specified using an arrow from the participant (message
caller) that wants to pass the message to the
participant (message receiver) that is to receive the
message.
• A Message (or stimulus) is represented as an arrow
going from the sender to the top of the focus of control
(i.e., execution occurrence) of the message on the
receiver's lifeline.
• Near the arrow, the name and parameters of the
message are shown.
Synchronous message
• A synchronous message is used when the sender waits
until the receiver has finished processing the message,
only then does the caller continue.
• A closed and filled arrowhead signifies that the
message is sent synchronously.
Synchronous message
• If you want to show that the receiver has finished processing the
message and returns control to the sender, draw a dashed arrow
from receiver to sender. Optionally, a value that the receiver
returns to the sender can be placed near the return arrow.
• If you want your diagrams to be easy to read, only show the
return arrow if a value is returned. Otherwise, hide it.
Synchronous message
Asynchronous messages
• With an asynchronous message, the sender
does not wait for the receiver to finish
processing the message, it continues
immediately.
• Messages sent to a receiver in another
process or calls that start a new thread are
examples of asynchronous messages.
Asynchronous messages
• An open arrowhead is used to indicate that a
message is sent asynchronously.
Asynchronous messages
Drink Order
Greet new customer
Instantaneous message
• Messages are often considered to be instantaneous,
i.e. the time it takes to arrive at the receiver is
negligible.
• Such messages are drawn as a horizontal arrow.
Non-instantaneous message
• Sometimes the message takes a considerable
amount of time to reach the receiver.
• For example, a message across a network.
• Such a non-instantaneous message is drawn as a
slanted arrow.
Non-instantaneous message
Found message
• A found message is a message of which the
caller is not shown.
• Depending on the context, this could mean
that either the sender is not known, or that it
is not important who the sender was.
Found message
• The arrow of a found message originates from a
filled circle.
Guards
• A message can include a guard, which signifies that
the message is only sent if a certain condition is met.
• The guard is simply that condition between brackets.
• Guards are used throughout UML diagrams to
control flow.
Guards
Combined fragments (alternatives,
options, and loops)
• If you want to show that several messages are
conditionally sent under the same guard,
you'll have to use an 'opt' combined fragment.
• The combined fragment is shown as a large
rectangle with an 'opt' operator plus a guard,
and contains all the conditional messages
under that guard.
alt
• If you want to show several alternative
interactions, use an 'alt' combined fragment.
• The combined fragment contains an operand
for each alternative. Each alternative has a
guard and contains the interaction that occurs
when the condition for that guard is met.
Repeated interaction
• When a message is prefixed with an asterisk (the '*'-
symbol), it means that the message is sent
repeatedly. A guard indicates the condition that
determines whether or not the message should be
sent (again). As long as the condition holds, the
message is repeated.
Repeated interaction
• If you want to show that multiple messages are sent
in the same iteration, a 'loop' combined fragment
can be used. The operator of the combined fragment
is 'loop' and the guard represents the condition to
control the repetition.
Create and Destroy message
• A create message represents the creation of
an instance in an interaction. The target
lifeline begins at the point of the create
message.
• A destroy message represents the destruction
of an instance in an interaction. The target
lifeline ends at the point of the destroy
message, and is denoted by an X.
Sequence diagram for issuing book
Sequence diagram for returning book
Communication diagram
• A communication diagram, is an interaction
diagram that shows similar information to
sequence diagrams but its primary focus is on
object relationships.
• Formerly known as collaboration diagram.
• Shows interactions between objects and/or
parts (represented as lifelines) using
sequenced messages in a free-form
arrangement.
Communication diagram
• Model collaborations between objects or roles
that deliver the functionalities of use cases
and operations.
• Capture interactions that show the passed
messages between objects and roles within
the collaboration.
• Support the identification of objects (hence
classes) that participate in use cases.
Communication diagram
Communication diagram
Which to Use?
• Choose sequence diagram when only the sequence of
events needs to be shown and collaboration among the
objects are priority.
• Choose a communication diagram when the objects
and their links facilitate understanding the interactions
(you don’t have to put all objects at the top and make
the lines all vertical or horizontal).
• Sequence diagrams emphasize the time ordering of
messages, whereas communication diagrams depict
more of an organizational structure and are more space
efficient.
Which to Use?
• Although it is possible to derive the sequencing of
messages in the communication diagram from the
numbering scheme, it isn’t immediately visible.
• What the communication diagram does show quite
clearly though, is the full set of messages passed
between adjacent objects.
• Communication diagrams offer a better view of a
scenario than a Sequence diagram when the modeler is
trying to understand all of the effects on a given object

More Related Content

What's hot

UNIFIED MODELING LANGUAGE
UNIFIED MODELING LANGUAGEUNIFIED MODELING LANGUAGE
UNIFIED MODELING LANGUAGERaval Chirag
 
UML diagrams and symbols
UML diagrams and symbolsUML diagrams and symbols
UML diagrams and symbolsKumar
 
09 package diagram
09 package diagram09 package diagram
09 package diagramBaskarkncet
 
Object oriented modeling and design
Object oriented modeling and designObject oriented modeling and design
Object oriented modeling and designjayashri kolekar
 
Uml in software engineering
Uml in software engineeringUml in software engineering
Uml in software engineeringMubashir Jutt
 
10 component diagram
10 component diagram10 component diagram
10 component diagramBaskarkncet
 
State Machine Diagram
State Machine DiagramState Machine Diagram
State Machine DiagramNiloy Rocker
 
Dynamic and Static Modeling
Dynamic and Static ModelingDynamic and Static Modeling
Dynamic and Static ModelingSaurabh Kumar
 
Sequence diagram
Sequence diagramSequence diagram
Sequence diagramRahul Pola
 
SE_Lec 05_System Modelling and Context Model
SE_Lec 05_System Modelling and Context ModelSE_Lec 05_System Modelling and Context Model
SE_Lec 05_System Modelling and Context ModelAmr E. Mohamed
 
The Ultimate Sequence Diagram Tutorial
The Ultimate Sequence Diagram TutorialThe Ultimate Sequence Diagram Tutorial
The Ultimate Sequence Diagram TutorialCreately
 
Object oriented-systems-development-life-cycle ppt
Object oriented-systems-development-life-cycle pptObject oriented-systems-development-life-cycle ppt
Object oriented-systems-development-life-cycle pptKunal Kishor Nirala
 
object oriented methodologies
object oriented methodologiesobject oriented methodologies
object oriented methodologiesAmith Tiwari
 
CS8592-OOAD-UNIT II-STATIC UML DIAGRAMS PPT
CS8592-OOAD-UNIT II-STATIC UML DIAGRAMS PPTCS8592-OOAD-UNIT II-STATIC UML DIAGRAMS PPT
CS8592-OOAD-UNIT II-STATIC UML DIAGRAMS PPTleela rani
 

What's hot (20)

UNIFIED MODELING LANGUAGE
UNIFIED MODELING LANGUAGEUNIFIED MODELING LANGUAGE
UNIFIED MODELING LANGUAGE
 
UML diagrams and symbols
UML diagrams and symbolsUML diagrams and symbols
UML diagrams and symbols
 
UML
UMLUML
UML
 
Activity diagram
Activity diagramActivity diagram
Activity diagram
 
09 package diagram
09 package diagram09 package diagram
09 package diagram
 
Object oriented modeling and design
Object oriented modeling and designObject oriented modeling and design
Object oriented modeling and design
 
Presentation on uml
Presentation on umlPresentation on uml
Presentation on uml
 
Uml in software engineering
Uml in software engineeringUml in software engineering
Uml in software engineering
 
Types of UML diagrams
Types of UML diagramsTypes of UML diagrams
Types of UML diagrams
 
10 component diagram
10 component diagram10 component diagram
10 component diagram
 
State Machine Diagram
State Machine DiagramState Machine Diagram
State Machine Diagram
 
Dynamic and Static Modeling
Dynamic and Static ModelingDynamic and Static Modeling
Dynamic and Static Modeling
 
Object Oriented Design
Object Oriented DesignObject Oriented Design
Object Oriented Design
 
Sequence diagram
Sequence diagramSequence diagram
Sequence diagram
 
SE_Lec 05_System Modelling and Context Model
SE_Lec 05_System Modelling and Context ModelSE_Lec 05_System Modelling and Context Model
SE_Lec 05_System Modelling and Context Model
 
The Ultimate Sequence Diagram Tutorial
The Ultimate Sequence Diagram TutorialThe Ultimate Sequence Diagram Tutorial
The Ultimate Sequence Diagram Tutorial
 
Uml Common Mechanism
Uml Common MechanismUml Common Mechanism
Uml Common Mechanism
 
Object oriented-systems-development-life-cycle ppt
Object oriented-systems-development-life-cycle pptObject oriented-systems-development-life-cycle ppt
Object oriented-systems-development-life-cycle ppt
 
object oriented methodologies
object oriented methodologiesobject oriented methodologies
object oriented methodologies
 
CS8592-OOAD-UNIT II-STATIC UML DIAGRAMS PPT
CS8592-OOAD-UNIT II-STATIC UML DIAGRAMS PPTCS8592-OOAD-UNIT II-STATIC UML DIAGRAMS PPT
CS8592-OOAD-UNIT II-STATIC UML DIAGRAMS PPT
 

Viewers also liked

Collaboration Diagram
Collaboration DiagramCollaboration Diagram
Collaboration Diagramfahad_uaar
 
Collaboration diagram- UML diagram
Collaboration diagram- UML diagram Collaboration diagram- UML diagram
Collaboration diagram- UML diagram Ramakant Soni
 
7. sequence and collaboration diagrams
7. sequence and collaboration diagrams7. sequence and collaboration diagrams
7. sequence and collaboration diagramsAPU
 
Class, Collaboration, Sequence Diagram of a sample project
Class, Collaboration, Sequence Diagram of a sample projectClass, Collaboration, Sequence Diagram of a sample project
Class, Collaboration, Sequence Diagram of a sample projectNaimul Arif
 
Lecture 6 collaboration diagrams
Lecture 6 collaboration diagramsLecture 6 collaboration diagrams
Lecture 6 collaboration diagramsASHOK KUMAR PALAKI
 
5.state diagrams
5.state diagrams5.state diagrams
5.state diagramsAPU
 
Pak Afghan relations
Pak Afghan relationsPak Afghan relations
Pak Afghan relationsAreej Fatima
 
Pak Afghan Relation
Pak Afghan RelationPak Afghan Relation
Pak Afghan RelationShArear Roy
 
Pak-Afghan Relations in post 9-11 era: A case study of Durand line security b...
Pak-Afghan Relations in post 9-11 era: A case study of Durand line security b...Pak-Afghan Relations in post 9-11 era: A case study of Durand line security b...
Pak-Afghan Relations in post 9-11 era: A case study of Durand line security b...Bilal yousaf
 
Relationship between pakistan and afghanistan
Relationship between pakistan and afghanistanRelationship between pakistan and afghanistan
Relationship between pakistan and afghanistanBarkat12345
 
Use Case diagram-UML diagram-1
Use Case diagram-UML diagram-1Use Case diagram-UML diagram-1
Use Case diagram-UML diagram-1Ramakant Soni
 
Pak afghan relations
Pak afghan relationsPak afghan relations
Pak afghan relationsFakhare
 

Viewers also liked (20)

Collaboration Diagram
Collaboration DiagramCollaboration Diagram
Collaboration Diagram
 
Collaboration diagram- UML diagram
Collaboration diagram- UML diagram Collaboration diagram- UML diagram
Collaboration diagram- UML diagram
 
7. sequence and collaboration diagrams
7. sequence and collaboration diagrams7. sequence and collaboration diagrams
7. sequence and collaboration diagrams
 
Class, Collaboration, Sequence Diagram of a sample project
Class, Collaboration, Sequence Diagram of a sample projectClass, Collaboration, Sequence Diagram of a sample project
Class, Collaboration, Sequence Diagram of a sample project
 
UML
UMLUML
UML
 
Lecture 6 collaboration diagrams
Lecture 6 collaboration diagramsLecture 6 collaboration diagrams
Lecture 6 collaboration diagrams
 
Sequence diagrams in UML
Sequence diagrams in UMLSequence diagrams in UML
Sequence diagrams in UML
 
5.state diagrams
5.state diagrams5.state diagrams
5.state diagrams
 
Class diagrams
Class diagramsClass diagrams
Class diagrams
 
Pak Afghan relations
Pak Afghan relationsPak Afghan relations
Pak Afghan relations
 
Interaction diagram
Interaction diagramInteraction diagram
Interaction diagram
 
Uml sequence diagrams
Uml sequence diagramsUml sequence diagrams
Uml sequence diagrams
 
Pak Afghan Relation
Pak Afghan RelationPak Afghan Relation
Pak Afghan Relation
 
Sequence diagrams
Sequence diagramsSequence diagrams
Sequence diagrams
 
Pak-Afghan Relations in post 9-11 era: A case study of Durand line security b...
Pak-Afghan Relations in post 9-11 era: A case study of Durand line security b...Pak-Afghan Relations in post 9-11 era: A case study of Durand line security b...
Pak-Afghan Relations in post 9-11 era: A case study of Durand line security b...
 
Relationship between pakistan and afghanistan
Relationship between pakistan and afghanistanRelationship between pakistan and afghanistan
Relationship between pakistan and afghanistan
 
Use Case diagram-UML diagram-1
Use Case diagram-UML diagram-1Use Case diagram-UML diagram-1
Use Case diagram-UML diagram-1
 
Pak afghan relations
Pak afghan relationsPak afghan relations
Pak afghan relations
 
Human Resource Management PPT
Human Resource Management PPTHuman Resource Management PPT
Human Resource Management PPT
 
State Diagram
State DiagramState Diagram
State Diagram
 

Similar to Slide 4 Interaction Diagram

UML Diagram @ Software engineering discussion
UML Diagram @ Software engineering discussionUML Diagram @ Software engineering discussion
UML Diagram @ Software engineering discussionCherryBerry2
 
07 interaction diagrams
07 interaction diagrams07 interaction diagrams
07 interaction diagramsBaskarkncet
 
Basic Behavioral Modeling
Basic Behavioral ModelingBasic Behavioral Modeling
Basic Behavioral ModelingAMITJain879
 
An introduction to uml
An introduction to umlAn introduction to uml
An introduction to umlTony Huynh
 
sequencediagram-150302224029-conversion-gate01 (1).pdf
sequencediagram-150302224029-conversion-gate01 (1).pdfsequencediagram-150302224029-conversion-gate01 (1).pdf
sequencediagram-150302224029-conversion-gate01 (1).pdfmounikanarra3
 
Lecture#03, uml diagrams
Lecture#03, uml diagramsLecture#03, uml diagrams
Lecture#03, uml diagramsbabak danyal
 
Uml Omg Fundamental Certification 5
Uml Omg Fundamental Certification 5Uml Omg Fundamental Certification 5
Uml Omg Fundamental Certification 5Ricardo Quintero
 
Introduction to OOA and UML - Part 2
Introduction to OOA and UML - Part 2 Introduction to OOA and UML - Part 2
Introduction to OOA and UML - Part 2 Shwetha-BA
 
Case tool lab-Reg2013 by Karthick Raja
Case tool lab-Reg2013 by Karthick RajaCase tool lab-Reg2013 by Karthick Raja
Case tool lab-Reg2013 by Karthick RajaursKarthick Raja
 
UML, ER and Dimensional Modelling
UML, ER and Dimensional ModellingUML, ER and Dimensional Modelling
UML, ER and Dimensional ModellingStefano Dalla Palma
 
Use case Diagram and Sequence Diagram
Use case Diagram and Sequence DiagramUse case Diagram and Sequence Diagram
Use case Diagram and Sequence DiagramNikhil Pandit
 

Similar to Slide 4 Interaction Diagram (20)

UML Diagram @ Software engineering discussion
UML Diagram @ Software engineering discussionUML Diagram @ Software engineering discussion
UML Diagram @ Software engineering discussion
 
Chapter3
Chapter3Chapter3
Chapter3
 
Sequence diagrams
Sequence diagramsSequence diagrams
Sequence diagrams
 
07 interaction diagrams
07 interaction diagrams07 interaction diagrams
07 interaction diagrams
 
Basic Behavioral Modeling
Basic Behavioral ModelingBasic Behavioral Modeling
Basic Behavioral Modeling
 
An introduction to uml
An introduction to umlAn introduction to uml
An introduction to uml
 
sequencediagram-150302224029-conversion-gate01 (1).pdf
sequencediagram-150302224029-conversion-gate01 (1).pdfsequencediagram-150302224029-conversion-gate01 (1).pdf
sequencediagram-150302224029-conversion-gate01 (1).pdf
 
Lecture#03, uml diagrams
Lecture#03, uml diagramsLecture#03, uml diagrams
Lecture#03, uml diagrams
 
MID2 UML (1).pptx
MID2 UML (1).pptxMID2 UML (1).pptx
MID2 UML (1).pptx
 
UML
UMLUML
UML
 
Sequence diagrame
Sequence diagrameSequence diagrame
Sequence diagrame
 
Uml diagrams
Uml diagramsUml diagrams
Uml diagrams
 
Uml Omg Fundamental Certification 5
Uml Omg Fundamental Certification 5Uml Omg Fundamental Certification 5
Uml Omg Fundamental Certification 5
 
Introduction to OOA and UML - Part 2
Introduction to OOA and UML - Part 2 Introduction to OOA and UML - Part 2
Introduction to OOA and UML - Part 2
 
Case tool lab-Reg2013 by Karthick Raja
Case tool lab-Reg2013 by Karthick RajaCase tool lab-Reg2013 by Karthick Raja
Case tool lab-Reg2013 by Karthick Raja
 
Sequence diagram
Sequence diagramSequence diagram
Sequence diagram
 
UML tutorial
UML tutorialUML tutorial
UML tutorial
 
Chapter7
Chapter7Chapter7
Chapter7
 
UML, ER and Dimensional Modelling
UML, ER and Dimensional ModellingUML, ER and Dimensional Modelling
UML, ER and Dimensional Modelling
 
Use case Diagram and Sequence Diagram
Use case Diagram and Sequence DiagramUse case Diagram and Sequence Diagram
Use case Diagram and Sequence Diagram
 

Recently uploaded

Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxMaryGraceBautista27
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Celine George
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxAshokKarra1
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfSpandanaRallapalli
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSJoshuaGantuangco2
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 

Recently uploaded (20)

Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptx
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
 
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptxYOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptx
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdf
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 

Slide 4 Interaction Diagram

  • 2. Interaction Diagram • From the name Interaction it is clear that the diagram is used to describe some type of interactions among the different elements in the model. • Interaction diagrams are models that describe how a group of objects interact / collaborate in some behavior - typically a single use-case.
  • 3. Interaction Diagram • Purpose –To capture dynamic behaviour of a system. –To describe the message flow in the system. –To describe structural organization of the objects. –To describe interaction among objects.
  • 4. Forms of Interaction Diagram • This interactive behaviour is represented in UML by two diagrams known as – Sequence diagram and –Collaboration diagram.
  • 5. Drawing the interaction diagram • The purpose of interaction diagrams are to capture the dynamic aspect of a system. • Dynamic aspect can be defined as the snap shot of the running system at a particular moment. • So the following things are to identified clearly before drawing the interaction diagram: – Objects taking part in the interaction. – Message flows among the objects. – The sequence in which the messages are flowing. – Object organization.
  • 6. Sequence Diagram • Describe the flow of messages, events, actions between objects . • An important characteristic of a sequence diagram is that time passes from top to bottom and model important runtime interactions between the parts that make up the system. • Typically used to document and understand the logical flow of the system .
  • 7. Sequence Diagram Key Parts • participant: object or entity that acts in the diagram message: communication between participant objects • the axes in a sequence diagram: • –horizontal: which object/participant is acting • –vertical: time (down -> forward in time)
  • 8. Sequence Diagrams Dimensions • Time. The vertical axis represents time proceedings (or progressing) down the page. Note that Time in a sequence diagram is all a about ordering, not duration. The vertical space in an interaction diagram is not relevant for the duration of the interaction. • Objects. The horizontal axis shows the elements that are involved in the interaction. Conventionally, the objects involved in the operation are listed from left to right according to when they take part in the message sequence. However, the elements on the horizontal axis may appear in any order.
  • 9. Sequence Diagram (make a phone call)
  • 10. Object • Objects as well as classes can be targets on a sequence diagram, which means that messages can be sent to them. • A target is displayed as a rectangle with some text in it. Below the target, its lifeline extends for as long as the target exists. The lifeline is displayed as a vertical dashed line.
  • 11. Object • The basic notation for an object is where 'name' is the name of the object in the context of the diagram and 'Type' indicates the type of which the object is an instance. • Both name and type are optional, but at least one of them should be present.
  • 13. Object (Examples) • As with any UML-element, we can add a stereotype to a target. Some often used stereotypes for objects are «actor», «boundary», «control», «entity» and «database».
  • 14. MultiObject • When we want to show how a client interacts with the elements of a collection, we can use a multiobject. Its basic notation is:
  • 15. Lifelines in UML diagrams • In UML diagrams, such as sequence or communication diagrams, lifelines represent the objects that participate in an interaction. • Lifeline is a named element which represents an individual participant in the interaction. • For example, in a banking scenario, lifelines can represent objects such as a bank system or customer. • Each instance in an interaction is represented by a lifeline.
  • 16. Lifelines in Sequence diagrams • Lifeline in a sequence diagram is displayed with its name and type in a rectangle, which is called the head. The head is located on top of a vertical dashed line, called the stem, which represents the timeline for the instance of the object.
  • 17. Messages • Messages (or signals) on a sequence diagram are specified using an arrow from the participant (message caller) that wants to pass the message to the participant (message receiver) that is to receive the message. • A Message (or stimulus) is represented as an arrow going from the sender to the top of the focus of control (i.e., execution occurrence) of the message on the receiver's lifeline. • Near the arrow, the name and parameters of the message are shown.
  • 18. Synchronous message • A synchronous message is used when the sender waits until the receiver has finished processing the message, only then does the caller continue. • A closed and filled arrowhead signifies that the message is sent synchronously.
  • 19. Synchronous message • If you want to show that the receiver has finished processing the message and returns control to the sender, draw a dashed arrow from receiver to sender. Optionally, a value that the receiver returns to the sender can be placed near the return arrow. • If you want your diagrams to be easy to read, only show the return arrow if a value is returned. Otherwise, hide it.
  • 21. Asynchronous messages • With an asynchronous message, the sender does not wait for the receiver to finish processing the message, it continues immediately. • Messages sent to a receiver in another process or calls that start a new thread are examples of asynchronous messages.
  • 22. Asynchronous messages • An open arrowhead is used to indicate that a message is sent asynchronously.
  • 24. Instantaneous message • Messages are often considered to be instantaneous, i.e. the time it takes to arrive at the receiver is negligible. • Such messages are drawn as a horizontal arrow.
  • 25. Non-instantaneous message • Sometimes the message takes a considerable amount of time to reach the receiver. • For example, a message across a network. • Such a non-instantaneous message is drawn as a slanted arrow.
  • 27. Found message • A found message is a message of which the caller is not shown. • Depending on the context, this could mean that either the sender is not known, or that it is not important who the sender was.
  • 28. Found message • The arrow of a found message originates from a filled circle.
  • 29.
  • 30. Guards • A message can include a guard, which signifies that the message is only sent if a certain condition is met. • The guard is simply that condition between brackets. • Guards are used throughout UML diagrams to control flow.
  • 32. Combined fragments (alternatives, options, and loops) • If you want to show that several messages are conditionally sent under the same guard, you'll have to use an 'opt' combined fragment. • The combined fragment is shown as a large rectangle with an 'opt' operator plus a guard, and contains all the conditional messages under that guard.
  • 33.
  • 34.
  • 35. alt • If you want to show several alternative interactions, use an 'alt' combined fragment. • The combined fragment contains an operand for each alternative. Each alternative has a guard and contains the interaction that occurs when the condition for that guard is met.
  • 36.
  • 37.
  • 38.
  • 39.
  • 40. Repeated interaction • When a message is prefixed with an asterisk (the '*'- symbol), it means that the message is sent repeatedly. A guard indicates the condition that determines whether or not the message should be sent (again). As long as the condition holds, the message is repeated.
  • 41.
  • 42. Repeated interaction • If you want to show that multiple messages are sent in the same iteration, a 'loop' combined fragment can be used. The operator of the combined fragment is 'loop' and the guard represents the condition to control the repetition.
  • 43.
  • 44.
  • 45. Create and Destroy message • A create message represents the creation of an instance in an interaction. The target lifeline begins at the point of the create message. • A destroy message represents the destruction of an instance in an interaction. The target lifeline ends at the point of the destroy message, and is denoted by an X.
  • 46.
  • 47. Sequence diagram for issuing book
  • 48. Sequence diagram for returning book
  • 49.
  • 50. Communication diagram • A communication diagram, is an interaction diagram that shows similar information to sequence diagrams but its primary focus is on object relationships. • Formerly known as collaboration diagram. • Shows interactions between objects and/or parts (represented as lifelines) using sequenced messages in a free-form arrangement.
  • 51. Communication diagram • Model collaborations between objects or roles that deliver the functionalities of use cases and operations. • Capture interactions that show the passed messages between objects and roles within the collaboration. • Support the identification of objects (hence classes) that participate in use cases.
  • 52.
  • 55. Which to Use? • Choose sequence diagram when only the sequence of events needs to be shown and collaboration among the objects are priority. • Choose a communication diagram when the objects and their links facilitate understanding the interactions (you don’t have to put all objects at the top and make the lines all vertical or horizontal). • Sequence diagrams emphasize the time ordering of messages, whereas communication diagrams depict more of an organizational structure and are more space efficient.
  • 56. Which to Use? • Although it is possible to derive the sequencing of messages in the communication diagram from the numbering scheme, it isn’t immediately visible. • What the communication diagram does show quite clearly though, is the full set of messages passed between adjacent objects. • Communication diagrams offer a better view of a scenario than a Sequence diagram when the modeler is trying to understand all of the effects on a given object

Editor's Notes

  1. From the name Interaction it is clear that the diagram is used to describe some type of interactions among the different elements in the model. So this interaction is a part of dynamic behaviour of the system.
  2. From the name Interaction it is clear that the diagram is used to describe some type of interactions among the different elements in the model. So this interaction is a part of dynamic behaviour of the system.
  3. From the name Interaction it is clear that the diagram is used to describe some type of interactions among the different elements in the model. So this interaction is a part of dynamic behaviour of the system.
  4. Stem: a long, thin supportive or main section of something.
  5. The white rectangles on a lifeline are called activations and indicate that an object is responding to a message. It starts when the message is received and ends when the object is done handling the message. When a messages are used to represent method calls, each activation corresponds to the period during which an activation record for its call is present on the call stack.
  6. The white rectangles on a lifeline are called activations and indicate that an object is responding to a message. It starts when the message is received and ends when the object is done handling the message. When a messages are used to represent method calls, each activation corresponds to the period during which an activation record for its call is present on the call stack.