University of Toronto at Scarborough © Bennett, McRobb and Farmer 2005 CSCC40 communication and sequence diagrams 1 3.1.1: listCampaigns 3.1.1.1 *[For.

Slides:



Advertisements
Similar presentations
Ana M. Fernández  A UML diagram that depicts: ◦ interactions between objects. ◦ how the business currently works by showing how various.
Advertisements

Session 18 Modeling the Dynamic View: The Collaboration Diagram Written by Thomas A. Pender Published by Wiley Publishing, Inc. October 20, 2011 Presented.
Nicolò Carissimi in UML 2.0. Summary what’s behind UML: MDA UML 2.0 and MDA key concepts.
1 Chapter 4 Dynamic Modeling and Analysis (Part I) Object-Oriented Technology From Diagram to Code with Visual Paradigm for UML Curtis H.K. Tsang, Clarence.
Sequence Diagram Objects are represented horizontally across the top of the diagram Each object has a lifeline some exist before and/or after some are.
03/12/2001 © Bennett, McRobb and Farmer Specifying Control Based on Chapter 11 of Bennett, McRobb and Farmer: Object Oriented Systems Analysis and.
1 © Wolfgang Pelz UML2 UML Part Two. 2 © Wolfgang Pelz UML2 Chapters Four & Twelve Interaction Diagrams.
1Spring 2005 Specification and Analysis of Information Systems Modeling Behavior with UML Sequence Diagrams Eran Toch
03/12/2001 © Bennett, McRobb and Farmer Object Interaction Based on Chapter 9 of Bennett, McRobb and Farmer: Object Oriented Systems Analysis and.
Requirements Analysis
WXGC6102: Object-Oriented Techniques Object Interaction – Sequence Diagrams References: Chapter 9 of Bennett, McRobb and Farmer: Object Oriented Systems.
03/12/2001 © Bennett, McRobb and Farmer Use Case Diagrams Based on Chapter 6 of Bennett, McRobb and Farmer: Object Oriented Systems Analysis and.
Design in IS Development. IS Design in general The satisfaction of new information requirements. Considering the interaction between humans and the new.
Sequence diagram example T120B029P pavasaris.
Karolina Muszyńska Based on: S. Wrycza, B. Marcinkowski, K. Wyrzykowski „Język UML 2.0 w modelowaniu SI”
CS3773 Software Engineering
מידול התנהגותי 1. Today’s Session Sequence Diagrams State Machines 2.
University of Toronto at Scarborough © Bennett, McRobb and Farmer 2005 CSCC40 classes 1 Use CasesUse Case Model Campaign Management PackageModelSub-system.
1 CSC 450 Slides adapted from slides created by Robert B. France UML Behavioral Models.
UML / UML 2.0 Diagrams (Part III) 1. Sequence diagram is the most common kind of interaction diagram. It focuses on the message interchange between a.
1 SAD2 - UML 2 nd Lecture Sequence Diagram and other dynamic views Lecturer: Dr Dimitrios Makris
Object-Oriented Systems Analysis and Design Using UML
Introduction to Interaction Diagrams Used to illustrate the dynamic behaviour of a community of objects that collaborate by passing messages in order to.
03/12/2001 © Bennett, McRobb and Farmer Object Interaction Based on Chapter 9 of Bennett, McRobb and Farmer: Object Oriented Systems Analysis and.
Business Informatics Group Institute of Software Technology and Interactive Systems Vienna University of Technology Favoritenstraße 9-11/188-3, 1040 Vienna,
Chapter 5 – System Modeling
Asst.Prof. Dr. Surasak Mungsing. 3 Learning Objectives Explain the purpose and various phases of the systems development life cycle (SDLC) Explain when.
1 Sequence Diagrams (Based on Stevens and Pooley (2006, Chapters 9, 10) and Fowler (2004, Chapter 4)) David Meredith Aalborg University.
Practical Object-Oriented Design with UML 2e Slide 1/1 ©The McGraw-Hill Companies, 2004 PRACTICAL OBJECT-ORIENTED DESIGN WITH UML 2e Chapter 9: Interaction.
University of Toronto at Scarborough © Bennett, McRobb and Farmer 2005 CSCC40 state diagrams 1 state machine for the class GradeRate. Movement from one.
Chapter 2, Modeling with UML, Part 3 UML 2 Hightlights
© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1 UML Sequence Diagrams.
Starting Object Design
Chapter 4: UML Interaction Diagrams. Objective Provide a reference for frequently used UML interaction diagram notation- sequence and communication diagrams.
10/27/20151 WXGC6102: Object-Oriented Techniques Requirements Analysis References: Chapter 7 of Bennett, McRobb and Farmer: Object Oriented Systems Analysis.
© Bennett, McRobb and Farmer Requirements Analysis Based on Chapter 7 of Bennett, McRobb and Farmer: Object Oriented Systems Analysis and Design.
Chapter 2, Modeling with UML: UML 2 Hightlights
Smith’s Aerospace © P. Bailey & K. Vander Linden, 2005 Interaction and Communication Diagrams Patrick Bailey Keith Vander Linden Calvin College.
What to remember from Chap 13 (Logical architecture)
© 2010 Bennett, McRobb and Farmer1 Object Interaction – Interaction Overview Diagrams Timing Diagrams Based on Chapter 09 Bennett, McRobb and Farmer Object.
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 8: Modelling Interactions and Behaviour UML Sequence Diagram.
Object-Oriented Analysis and Design 1 Mira Balaban & Arnon Sturm Object-Oriented Analysis and Design Session 3a: Behavioral Modeling - Interactions.
WXGC6102: Object-Oriented Techniques Object Interaction – Interaction Overview Diagrams Timing Diagrams References: Chapter 9 of Bennett, McRobb and Farmer:
1 CSE323 การวิเคราะห์และออกแบบระบบ (Systems Analysis and Design) Lecture 07: Object Interaction and Specifying Operations.
© 2010 Bennett, McRobb and Farmer1 Requirements Analysis 2: Realizing Use Cases Based on Chapter 7 of Bennett, McRobb and Farmer: Object Oriented Systems.
Karolina Muszyńska Based on: S. Wrycza, B. Marcinkowski, K. Wyrzykowski „Język UML 2.0 w modelowaniu SI”
Dynamic Models Sequence Diagrams Collaboration Diagrams Activity Diagrams.
© Bennett, McRobb and Farmer Object Interaction – Sequence Diagrams Based on Chapter 9 of Bennett, McRobb and Farmer: Object Oriented Systems Analysis.
Chapter 3: Introducing the UML
Communication Diagrams Lecture 8. Introduction  Interaction Diagrams are used to model system dynamics  How do objects change state?  How do objects.
The PUMA project 29 June 2004 Toqeer A Israr page 1 Transformation of Scenarios represented in UML 2.0 Sequence Diagrams to CSM Toqeer A Israr Carleton.
University of Toronto at Scarborough © Kersti Wain-Bantin CSCC40 sequence diagrams 1 synchronous indicates nested flow of control used to ensure that state.
Project 2: Phase 1 Submission 7 Late submissions 10% 10 No submissions 14% Better than project 1 phase 3 submissions 10-point bonus: If you catch the deadline.
Sequence diagrams Lecture 5. Main terms  Interaction  Life line  Activation  Executable behavior and derived behavior  Messages  Trajectory  Frame.
Object Interaction – Interaction Overview Diagrams Timing Diagrams
WXGC6102: Object-Oriented Techniques
CIS511 Information System Architecture
Graphical Systems Modeling with UML / SysML Sequence diagrams
Sequence Diagram.
Sequence Diagram.
UML Sequence Diagrams.
Princess Nourah bint Abdulrahman University
System Sequence Diagrams
IMAT5205 Systems Analysis and Design
Unified Modelling Language
Object Interaction – Sequence Diagrams
Interaction Diagrams A Lot of UML!
UML Interaction diagrams
Systems Analysis and Design I
Systems Analysis and Design I
Presentation transcript:

University of Toronto at Scarborough © Bennett, McRobb and Farmer 2005 CSCC40 communication and sequence diagrams : listCampaigns *[For all client’s campaigns]: getCampaignDetails : Advert *[For all campaign’s adverts]: getAdvertDetails :AddAdvertUI :AddAdvert :Client :Campaign :Advert 3.1: showClientCampaigns 3: selectClient 4: selectCampaign 4.1: showCampaignAdverts 5: createNewAdvert 5.1: addNewAdvert newAd:Advert 2: startInterface 1 *[For all clients]: getClient :CampaignManager sd Add a new advert to a campaign 5.1.1: addNewAdvert 4.1.1: listAdverts Notation for iteration different to that in sequence diagram listCampaigns message may pass back too much data from :Campaign communication diagram

University of Toronto at Scarborough © Bennett, McRobb and Farmer 2005 CSCC40 communication and sequence diagrams : Advert *[For all campaign’s adverts]: getAdvertDetails 5.1.1: addNewAdvert :AddAdvertUI :AddAdvert :Client:Campaign :Advert 3.1: showClientCampaigns 3: selectClient 4: selectCampaign 4.1: showCampaignAdverts 4.1.1: listAdverts 5: createNewAdvert 5.1: addNewAdvert newAd:Advert 2: startInterface 3.1.1: listCampaigns 1 *[For all clients]: getClient :CampaignManager sd Add a new advert to a campaign *[For all client’s campaigns]: getCampaignDetails listCampaigns message does not pass back any data from :Campaign in this alternative interaction

University of Toronto at Scarborough © Bennett, McRobb and Farmer 2005 CSCC40 communication and sequence diagrams 3 Message Labels Type of messageSyntax example Simple message. 4: addNewAdvert Nested call with return value. The return value is placed in the variable name : name = getName Conditional message. This message is only sent if the condition [balance > 0] is true. 5 [balance > 0]: debit(amount) Iteration 4.1 *[For all adverts]: getCost

University of Toronto at Scarborough © Bennett, McRobb and Farmer 2005 CSCC40 communication and sequence diagrams 4 : Campaign : Advert checkCampaignBudget 1*[For all adverts]: getCost 2: getOverheads The direction in which a link can be navigated may be shown if required. sd checkCampaignBudget Navigation links

University of Toronto at Scarborough © Bennett, McRobb and Farmer 2005 CSCC40 communication and sequence diagrams 5 :Client :Campaign :Advert getName listCampaigns listAdverts Advert newAd:Advert addNewAdvert LifelineActivation or Execution Object creation :CampaignManager sd Add a new advert to a campaign loop Interaction Operator Interaction Constraint Combined Fragment (loop) [For all client’s campaigns] getCampaignDetails [For all campaign’s adverts] getAdvertDetails sequence diagram Sequence diagram is enclosed in a frame Frame label

University of Toronto at Scarborough © Bennett, McRobb and Farmer 2005 CSCC40 communication and sequence diagrams 6 :LifelineA :LifelineB Synchronous (blocking) message sd Interaction Name msg a Send message Event Occurrence (msg.sendEvent) Receive messaged Event Occurrence (msg.recieveEvent) start of Execution Occurrence end of Execution Occurrence Active State on lifeline showing pre-condition Message reply showing return of control

University of Toronto at Scarborough © Bennett, McRobb and Farmer 2005 CSCC40 communication and sequence diagrams 7 :Client :Campaign :Advert listCampaigns listAdverts Advert newAd:Advert :CampaignManager sd Add a new advert to a campaign loop :AddAdvertUI :AddAdvert addNewAdvert getClient selectClient loop selectCampaign addNewAdvert getCampaignDetails startInterface [For all clients] showClientCampaigns showCampaignAdverts createNewAdvert [For all client’s campaigns] [For all campaign’s adverts] getAdvertDetails Boundary lifeline Control lifeline

University of Toronto at Scarborough © Bennett, McRobb and Farmer 2005 CSCC40 communication and sequence diagrams 8 listAdverts deleteAdvert Object destruction :Campaign :Advert delete getAdvertDetails X loop sd Delete advert

University of Toronto at Scarborough © Bennett, McRobb and Farmer 2005 CSCC40 communication and sequence diagrams 9 :Client :Campaign :Advert getName listCampaigns checkCampaignBudget getCampaignDetails getCost :CampaignManager sd Check campaign budget loop getOverheads [For all client’s campaigns] [For all campaign’s adverts] Reflexiv e messag e

University of Toronto at Scarborough © Bennett, McRobb and Farmer 2005 CSCC40 communication and sequence diagrams 10 :Client :Campaign :Advert getName listCampaigns checkCampaignBudget getCampaignDetails getCost :CampaignManager sd Check campaign budget loop getOverheads budget = checkCampaignBudget [For all client’s campaigns] [For all campaign’s adverts] Shading showing the focus of control Reply with the return-value shown

University of Toronto at Scarborough © Bennett, McRobb and Farmer 2005 CSCC40 communication and sequence diagrams 11 :Client campaign[i] :Campaign advert[j] :Advert getName listCampaigns checkCampaignBudget getCampaignDetails getCost :CampaignManager sd Check campaign budget loop getOverheads [i=1;i<=campaign.count; i++ ] [j=1;j<=advert.count; j++ ] Object selector notation Interaction constraint refers to variable used in object selector notation

University of Toronto at Scarborough © Bennett, McRobb and Farmer 2005 CSCC40 communication and sequence diagrams 12 :Client campaign[i] :Campaign advert[j] :Advert getName listCampaigns checkCampaignBudget getCampaignDetails getCost :CampaignManager sd Check campaign budget getOverheads loop (1, *) Interaction Operator with parameters loop (1, *) [i<=campaign.count ] [j<=advert.count ]

University of Toronto at Scarborough © Bennett, McRobb and Farmer 2005 CSCC40 communication and sequence diagrams 13 :Client :Campaign :Advert getName listCampaigns ref :CampaignManager Advert addCostedAdvert newAd:Advert newRequest:Request alt [else] sd Add a new advert to a campaign if within budget List client campaigns [totalCost <= budget] Request Get campaign budget alt interaction operator shows branching Two interaction operands, one for each alternative

University of Toronto at Scarborough © Bennett, McRobb and Farmer 2005 CSCC40 communication and sequence diagrams 14 :Client :Campaign :Advert getName listCampaigns :CampaignManager sd Check campaign budget ref Gate showing the message enter this interaction occurrence List client campaigns Get campaign budget ref interaction operator indicates interaction occurrence that references an interaction fragment handling complexity

University of Toronto at Scarborough © Bennett, McRobb and Farmer 2005 CSCC40 communication and sequence diagrams 15 :Client :Campaign listCampaigns getCampaignDetails sd List client campaigns loop Gate showing the message enter this Interaction Fragment [For all client’s campaigns] Interaction fragment that is referenced in Check campaign budget sequence diagram

University of Toronto at Scarborough © Bennett, McRobb and Farmer 2005 CSCC40 communication and sequence diagrams 16 :Campaign :Advert getCost sd Get campaign budget loop getOverheads checkCampaignBudget :CampaignManager [For all campaign’s adverts] Interaction fragment that is also referenced in Check campaign budget sequence diagram

University of Toronto at Scarborough © Bennett, McRobb and Farmer 2005 CSCC40 communication and sequence diagrams 17 :ClientCampaigns ref ClientCampaignAds listCampaigns listAdverts :CampaignManager sd Add a new advert to a campaign :AddAdvertUI :AddAdvert addNewAdvert getClient selectClient loop selectCampaign [For all clients] showClientCampaigns startInterface showCampaignAdverts addNewAdvert createNewAdvert Lifeline representing the interaction between a group of objects

University of Toronto at Scarborough © Bennett, McRobb and Farmer 2005 CSCC40 communication and sequence diagrams 18 :Client :Campaign :Advert listCampaigns listAdverts Advert newAd:Advert sd ClientCampaignAds loop addNewAdvert getClient [For all client’s campaigns] getCampaignDetails [For all campaign’s adverts] getAdvertDetails Sequence diagram referenced in the Add a new advert to a compaign sequence diagram

University of Toronto at Scarborough © Bennett, McRobb and Farmer 2005 CSCC40 communication and sequence diagrams 19 getCost Within budget Budget spent :LifelineA :LifelineB :LifelineC alt sd Calculate costs [else] ref Identify under spend [Within budget] Within budget :LifelineA :LifelineB :LifelineC ref alt sd Authorize expenditure [else] authorize stopExpenditure [Within budget] Calculate costs Continuations are used to link sequence diagrams

University of Toronto at Scarborough © Bennett, McRobb and Farmer 2005 CSCC40 communication and sequence diagrams 20 :ClassA :ClassB signalX d = duration {t..t + 28} signalF signalE {0..14} t = now signalY Asynchronous message with duration constraint Callback Duration constraint An active object sd Interaction Name {d..d*3} Duration observation Time constraint using construction marks Note explaining some aspect of this execution occurrence

University of Toronto at Scarborough © Bennett, McRobb and Farmer 2005 CSCC40 communication and sequence diagrams 21 Interaction Operator Explanation and use altAlternatives represents alternative behaviours, each choice of behaviour being shown in a separate operand. The operand whose interaction constraint is evaluted as true executes. opt Option describes a single choice of operand that will only execute if its interaction contraint evaluates as true. break Break indicates that the combined fragment is performed instead of the remainder of the enclosing interaction fragment. par Parallel indicates that the execution operands in the combined fragment may be merged in any sequence once the event sequence in each operand is preserved. seq Weak Sequencing results in the ordering of each operand being maintained but event occurrence from different operands on different lifelines may occur in any order. The order of event occurrences on common operands is the same as the order of the operands. strict Strict Sequencing imposes a strict sequence on execution of the operands but does not apply to nested fragments. neg Negative describes an operand that is invalid. critical Critical Region imposes a constraint on the operand that none of its event occurrences on the lifelines in the region can be interleaved. ignore Ignore indicates the message types, specified as parameters, that should be ignored in the interaction. consider Consider states which messages should be consider in the interaction. This is equivalent to stating that all others should be ignored. assert Assertion states that the sequence of messaging in the operand is the only valid continuation. loop Loop is used to indicate an operand that is repeated a number times until the interaction constraint for the loop is no longer true.

University of Toronto at Scarborough © Bennett, McRobb and Farmer 2005 CSCC40 communication and sequence diagrams 22 ref Get campaign budget [totalCost <= budget] ref Create advert Create request ref :Campaign :CampaignManag er addCostedAdvert sd Add costed advert [totalCost > budget] sd Add a new advert to a campaign if within budget :Client :Campaign getName listCampaigns getCampaignDetails :CampaignManag er sd List Campaigns for Client loop [For all client’s campaigns] Decision Interaction occurrence In-line sequence diagram Initial node Final node

University of Toronto at Scarborough © Bennett, McRobb and Farmer 2005 CSCC40 communication and sequence diagrams 23 :TicketMachine :Barrier after:WeightSensor sd Car enters car park raiseBarrier lowerBarrier before:WeightSensor activate Raised Lowered Active deactivate Blocked barrierLowered Inactive ticketRequested

University of Toronto at Scarborough © Bennett, McRobb and Farmer 2005 CSCC40 communication and sequence diagrams 24 sd Car enters car park lifelines :Barrier, :TicketMachine :Barrier :TicketMachine Lowered Raised Inactive Active Blocked t {t..t+3s} Timing Constraint raiseBarrier barrierLowered Diagram has two instances, one for each lifeline Sloped line represents duration of state change Message from one lifeline to another