1Spring 2005 Specification and Analysis of Information Systems Modeling Behavior with UML Sequence Diagrams Eran Toch

Slides:



Advertisements
Similar presentations
Use-Cases.
Advertisements

1 Behavioral Modeling Chapter 8. 2 Key Ideas Behavioral models describe the internal dynamic aspects of an information system that supports business processes.
Ana M. Fernández  A UML diagram that depicts: ◦ interactions between objects. ◦ how the business currently works by showing how various.
© 2006 ITT Educational Services Inc. SE350 System Analysis for Software Engineers: Unit 9 Slide 1 Appendix 3 Object-Oriented Analysis and Design.
Robert B. Jackson Brigham Young University John W. Satzinger
Slide 1 Systems Analysis & Design CS183 Spring Semester Dr. Jonathan Y. Clark Course Website:
1 © Wolfgang Pelz UML2 UML Part Two. 2 © Wolfgang Pelz UML2 Chapters Four & Twelve Interaction Diagrams.
Copyright W. Howden1 Lecture 4: Sequence Interaction Diagrams.
1Spring 2005 Specification and Analysis of Information Systems Specifying State-based Behavior With UML Statechart Diagrams Eran Toch
Systems Analysis and Design in a Changing World, 6th Edition
Objectives Explain the purpose and objectives of object- oriented design Develop design class diagrams Develop interaction diagrams based on the principles.
Slide 1 Chapter 8 Behavioral Modeling. Slide 2 Key Ideas Behavioral models describe the internal dynamic aspects of an information system that supports.
Sept Ron McFadyen1 Extend Relationship.
SE-565 Software System Requirements More UML Diagrams.
Sequence diagram example T120B029P pavasaris.
Chapter 7: The Object-Oriented Approach to Requirements
Karolina Muszyńska Based on: S. Wrycza, B. Marcinkowski, K. Wyrzykowski „Język UML 2.0 w modelowaniu SI”
2005/05/25 Unified Modeling Lanauage 1 Introduction to Unified Modeling Language (UML) – Part One Ku-Yaw Chang Assistant Professor.
CS3773 Software Engineering
State Diagrams / System Sequence Diagrams (SSDs)
E-Learning Material Web Application Design 2. Web Application Design Use cases Guidelines Exceptions Interaction Sequence diagrams Finding objects.
Implementation Yaodong Bi. Introduction to Implementation Purposes of Implementation – Plan the system integrations required in each iteration – Distribute.
מידול התנהגותי 1. Today’s Session Sequence Diagrams State Machines 2.
1 CSC 450 Slides adapted from slides created by Robert B. France UML Behavioral Models.
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 21. Review ANALYSIS PHASE (OBJECT ORIENTED DESIGN) Functional Modeling – Use case Diagram Description.
1 SAD2 - UML 2 nd Lecture Sequence Diagram and other dynamic views Lecturer: Dr Dimitrios Makris
Introduction to Interaction Diagrams Used to illustrate the dynamic behaviour of a community of objects that collaborate by passing messages in order to.
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
Systems Analysis and Design in a Changing World, 6th Edition
Copyright 2002 Prentice-Hall, Inc. Chapter 2 Object-Oriented Analysis and Design Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey.
Chapter 2, Modeling with UML, Part 3 UML 2 Hightlights
© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1 UML Sequence Diagrams.
Faculty of Computer & Information
Starting Object Design
Chapter 4: UML Interaction Diagrams. Objective Provide a reference for frequently used UML interaction diagram notation- sequence and communication diagrams.
Behavioral Modeling Chapter 8.
Chapter 2, Modeling with UML: UML 2 Hightlights
Software Engineering Prof. Ing. Ivo Vondrak, CSc. Dept. of Computer Science Technical University of Ostrava
Collaboration Diagrams CSIS3600. What is a Collaboration Diagram Collaboration diagrams illustrate interactions between objects The collaboration diagram.
Smith’s Aerospace © P. Bailey & K. Vander Linden, 2005 Interaction and Communication Diagrams Patrick Bailey Keith Vander Linden Calvin College.
TAL7011 – Lecture 4 UML for Architecture Modeling.
What to remember from Chap 13 (Logical architecture)
Discovering object interaction. Use case realisation The USE CASE diagram presents an outside view of the system. The functionality of the use case is.
1 An Introduction to UML Interaction (Sequence and Communication) Diagrams Georgia State University CIS 3300 Spring, 2009.
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 8: Modelling Interactions and Behaviour UML Sequence Diagram.
University of Toronto at Scarborough © Bennett, McRobb and Farmer 2005 CSCC40 communication and sequence diagrams : listCampaigns *[For.
Systems Analysis and Design in a Changing World, 6th Edition 1 Chapter 5 INTRODUCTION TO SYSTEMS ANALYSIS AND DESIGN: AN AGILE, ITERATIVE APPROACH CHAPTER.
Karolina Muszyńska Based on: S. Wrycza, B. Marcinkowski, K. Wyrzykowski „Język UML 2.0 w modelowaniu SI”
(14-2) UML Instructor - Andrew O’Fallon CptS 122 (December 2, 2015) Washington State University.
Dynamic Models Sequence Diagrams Collaboration Diagrams Activity Diagrams.
Architecture View Models A model is a complete, simplified description of a system from a particular perspective or viewpoint. There is no single view.
© Bennett, McRobb and Farmer Object Interaction – Sequence Diagrams Based on Chapter 9 of Bennett, McRobb and Farmer: Object Oriented Systems Analysis.
Prof. Hany H. Ammar, CSEE, WVU, and
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.
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.
UML Activity and Sequence Diagrams David Millard
Sequence diagrams Lecture 5. Main terms  Interaction  Life line  Activation  Executable behavior and derived behavior  Messages  Trajectory  Frame.
UML Diagrams By Daniel Damaris Novarianto S..
Systems Analysis and Design in a Changing World, 6th Edition
Sequence Diagram.
Prepared By Sidra Noureen
UML Diagrams Jung Woo.
Business System Development
UML Sequence Diagrams.
System Sequence Diagrams
Systems Analysis and Design in a Changing World, 6th Edition
Interaction Diagrams A Lot of UML!
Appendix 3 Object-Oriented Analysis and Design
Presentation transcript:

1Spring 2005 Specification and Analysis of Information Systems Modeling Behavior with UML Sequence Diagrams Eran Toch Spring 2007

2 Outline Introduction Basic notation Alternating paths Modularity

3 Modeling Process Introduction | Basics | Alternations | Modularity PhaseActionsOutcome Initiation Raising a business need Business documents Requirements Interviewing stakeholders, exploring the system environment Organized documentation Specification Analyze the engineering aspect of the system, building system concepts Formal specification Design Define architecture, components, data types, algorithms Formal Specification Implementation Program, build, unit-testing, integrate, documentation Testable system Testing & Integration Integrate all components, verification, validation, installation, guidance Testing results, Working sys Maintenance Bug fixes, modifications, adaptation System versions

4 Why to Model Behavior? How do we use the SMS Server interface? What is the order of executing the operations? –sendMessage, getStatus, Resend? –getStatus, sendMessage, checkForMessages? When do we use resend? Introduction | Basics | Alternations | Modularity

5 Behavioral Modeling Where are people coming from? Where are they going? How do they move from one space to the other? Introduction | Basics | Alternations | Modularity

6 Behavior Modeling In process supplied Order Checkout Manager Order message: change status Add to cart Check availability Supply Order Notify User [okay] [problem] Sequence DiagramsActivity DiagramsState Diagrams Introduction | Basics | Alternations | Modularity * We will not talk about collaboration diagrams Inventory message: create

7 Outline Introduction Basic elements Alternating paths Modularity

8 Building a Sequence Diagrams Class A Class C Class B Class D Use Case 1 Use Case 2 Use Case 3 Sequence diagrams capture the use-case behavior using the foundation of the classes. therefore Sequence = Objects + messages Introduction | Basics | Alternations | Modularity

9 Sequence Diagrams p : Product : ShooppingCart addProduct (p) customer display() getPrice() checkout () sd Product Buying objects message Life line activation (focus of control) Diagram Name A simple sequence diagram: Introduction | Basics | Alternations | Modularity

10 Object Control obj1 : Class1 obj2 : Class2 do (…) : Class3 create (…) obj1 : Class1 user operate() Object Creation Object Destruction Return Message foo() Messages to self Introduction | Basics | Alternations | Modularity Illustration

11 Illustration Corresponding Class Diagram Notice that a dependency exists whenever messages are passed between instances of the class Dependencies can be overridden by associations, aggregations etc. Introduction | Basics | Alternations | Modularity

12 Sequences and Use-Cases p : Product : ShooppingCart addProduct (p) : Order create (…) customer display() getPrice() checkout () Introduction | Basics | Alternations | Modularity Hidden part Visible part

13

14 Full Message Attributes C3.1: res := getLocation (fig) sequence number return value message nameargument list [sequence-expression] [return-value :=] [message-name] [(argument-list)] Introduction | Basics | Alternations | Modularity

15 Different Kinds of Messages Synchronous Message asynchronous Message Return Message Introduction | Basics | Alternations | Modularity

16 Synchronous & Asynchronous Messages teller: Order: Article Nested Flow getValue price setID applerr handlalarm Asynchronous Flow unknown ring Price need to be finished, before teller can do another operation (getName) Ring is executed, while the control flow is returned to err handle and appl unknown log Introduction | Basics | Alternations | Modularity Example

17 Outline Introduction Basic elements Alternating paths Modularity

18 Flow Constructs When we tell a scenario, which types of alternatives do we need? Introduction | Basics | Alternations | Modularity If Else Loop Repeat Jump

19 Example Options archive(msg) msg : Message: Database opt Do something... [msg.status=confirmed] Fragment Condition Introduction | Basics | Alternations | Modularity Used for modeling simple optional blocks. Has one operand; no "else" guard.

20 Alternatives archive(msg) msg : Message: Database Condition : Admin alt notify(msg.getID()) wait() [msg.status=confirmed] [msg.status=error] [else] Else condition (optional) Alternative Fragment group Execution regions. At most one will execute. Introduction | Basics | Alternations | Modularity

21 Loops Display() : OS: Folder : File loop Display() [for each Folder] [for each File] Loop Fragment Condition Nested Loop Fragment Introduction | Basics | Alternations | Modularity

22 Breaks isLooged = login(name,pass) : User: User Manager : Policy addBadLogin(name) break [ ¬ isLooged] Do something… If the condition is met, the break fragment is executed, and the reminder of the sequence is ignored Handy in model exception handling Introduction | Basics | Alternations | Modularity

23 Examples of Guards [for each Object] [5] [i=1..5] [status = okay] No guard means an infinite loop Introduction | Basics | Alternations | Modularity

24 Outline Introduction Basic elements Alternating paths Modularity

25 Modularity We need ways to create modular scenarios Introduction | Basics | Alternations | Modularity

26 Referencing a diagram login(name,pass) : User: User Manager : Policy Login Handling(user,pass) : bool ref Do something… Reference Gate Introduction | Basics | Alternations | Modularity

27 Referenced Diagram : User Manager: UserAccount sd Login Handling loop cName -= getUseNamer() [for each UserAccount] login(name,pass) opt [cName = name] cName -= getUseNamer() isInSystem(true) true false Diagram name Input message Output message Introduction | Basics | Alternations | Modularity

28 Parallel Fragments provideDetails(…) : User : Checkout Handler : Shipping Handler performCheckout() : Transaction Handler par Ship(address,products) provideDetails(…) chargeMoney(CC,sum) Introduction | Basics | Alternations | Modularity

29 Critical Fragment the region is treated atomically by the enclosing fragment (i.e. parallel fragment) No other operations can interfere while a critical region is executed Introduction | Basics | Alternations | Modularity

30 Summary Behavior Modeling Sequence models interaction Language Objects + lifeline Messages Alternations Loops Alternatives Modularity Referencing Parallel Introduction | Basics | Alternations | Modularity