1 / 19

UML Sequence Diagrams

UML Sequence Diagrams. 2 December 2010. UML Diagrams. Structure diagram Class diagram Object diagram Component diagram Deployment diagram Package diagram. Behaviour diagram Use Case diagram Activity diagram Interaction diagram Sequence diagram Communication diagram. 2.

Download Presentation

UML Sequence Diagrams

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. UML Sequence Diagrams 2 December 2010

  2. UML Diagrams Structure diagram Class diagram Object diagram Component diagram Deployment diagram Package diagram Behaviour diagram Use Case diagram Activity diagram Interaction diagram Sequence diagram Communication diagram 2

  3. In a nutshell: what are interactions? • A collection of communications between instances, including all ways to affect instances, like operation invocation, as well as creation and destruction of instances • The communications are partially ordered (in time) 3

  4. Interaction Diagram Guide • Show interactions between instances in the model • graph of instances (possibly including links) and stimuli • existing instances • creation and deletion of instances • Kinds • Sequence diagram (temporal focus)  • Communication diagram (structural focus) 4

  5. Sequence Diagram Communication Diagram x y z 1.1: a1.2: c x y a b 1.1.1: b c z Interaction Diagrams 5

  6. Different Kinds of Arrows 6

  7. Lifeline & Messages • The vertical line is called the object’s lifeline. The lifeline represents the object’s life during the interaction. • Each message is represented by an arrow between the lifelines of two objects. • The order in which these messages occur is shown top to bottom. • Each message is labeled at minimum with the message name; also arguments and some control information can be included. • A self-back is a message that an object sends to itself, by sending the message arrow back to the same lifeline.

  8. Sequence Diagram / Communication Diagram 8

  9. Sequence Diagram vs. Communication Diagram • Sequence diagrams are used when you want to look at the behavior of several objects within a single use case. Sequence diagrams are good at showing collaborations among the objects. • Communication diagrams emphasize the data links between the various participants in the interaction. With communication diagrams we can show how the participants are linked together. 9

  10. Elements Sequence Diagrams 10

  11. Next Concepts Sequence Diagrams 1of2 control guard

  12. Next Concepts Sequence Diagrams 2of2 constraint { a b-a < 5 sec b b'-b < 1 sec b' }

  13. : Order Entry Window : Order : Order Line : Stock Item SEQUENCE DIAGRAM : Reorder Item : Delivery Item

  14. : Transaction : Transaction Coordinator : first Transaction Checker : second Transaction Checker Concurrent Processes and Activations

  15. : Transaction : Transaction Coordinator : first Transaction Checker : second Transaction Checker SEQUENCE DIAGRAM: Check Failure

  16. Example: A Booking System

  17. Use Case Description: Change Flt Itinerary • Actors: traveler, client account db, airline reservation system • Preconditions: Traveler has logged in • Basic course: • Traveler selects ‘change flight itinerary’ option • System retrieves traveler’s account and flight itinerary from client account database • System asks traveler to select itinerary segment she wants to change; traveler selects itinerary segment. • System asks traveler for new departure and destination information; traveler provides information. • If flights are available then … • … • System displays transaction summary. • Alternative course: • If no flights are available then…

  18. Traveler Client Account DBMS Client Account DBMS Airline Reservation System : Booking System change flight itinerary get customer account select segment update information present itinerary present detailed info get itinerary available flight Sequence Diagram: Change Flight Itinerary

  19. 1: change flight itinerary 2: get customer account3: get itinerary : Booking System 4: present itinerary Client Account DBMS Traveler 8: available flight Airline Reservation System Collaboration Diagram: Change Flt Itinerary 5: select segment 7: update information 6: present detailed info

More Related