Presentation is loading. Please wait.

Presentation is loading. Please wait.

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.

Similar presentations


Presentation on theme: "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."— Presentation transcript:

1 UML / UML 2.0 Diagrams (Part III) 1

2 Sequence diagram is the most common kind of interaction diagram. It focuses on the message interchange between a number of lifelines. An UML sequence diagram is typically composed of – lifeline, execution specification, message, combined fragment, interaction use, state invariant, continuation, destruction event. UML Sequence Diagrams 2

3 Lifeline Lifeline is a named element which represents an individual participant in the interaction. While parts and structural features may have multiplicity greater than 1, lifelines represent only one interacting entity. 3

4 Examples of lifelines Lifeline "data" of class Stock Anonymous lifeline of class User Lifeline "x" of class X is selected with selector [k] 4

5 Message Message is a named element that defines one specific kind of communication between lifelines of an interaction. A message is shown as a line from the sender message end to the receiver message end. The line must be such that every line fragment is either horizontal or downwards when traversed from send event to receive event. A message reflects either an operation call and start of execution or a sending and reception of a signal. 5

6 Messages by Action Type synchronous call asynchronous call asynchronous signal create delete reply 6

7 Synchronous Call A type of operation call - send message and suspend execution while waiting for response. Web Client searches Online Bookshop and waits for results. 7

8 Asynchronous Call A type of operation call - send message and proceed immediately without waiting for return value. Service starts Task and proceeds in parallel without waiting. 8

9 Asynchronous Signal corresponds to asynchronous send signal action E.g. Notify Customer send signal action creates and sends Notify Customer signal E.g. After order is shipped, Notify Customer send signal action creates and sends Notify Customer signal 9

10 Create Message Create message is sent to lifeline to create itself. In real life, create message is sent to some runtime environment. E.g. Online Bookshop creates Account. 10

11 Delete Message sent to terminate another lifeline. E.g., Online Bookshop terminates Account. 11

12 Reply Message to an operation call is shown as a dashed line with open arrow head E.g. Web Client searches Online Bookshop and waits for results to be returned. 12

13 Messages by Presence of Events Complete message Lost message Found message Unknown message 13

14 Lost Message Where the sending event is known, but there is no receiving event. Interpreted as if the message never reached its destination E.g. Web Client sent search message which was lost. 14

15 Found Message Where the receiving event is known, but there is no (known) sending event. Interpreted as if the origin of the message is outside the scope of the description. E.g. Online Bookshop gets search message of unknown origin. 15

16 Combined Fragment An interaction fragment which defines a combination (expression) of interaction fragments. Defined by an interaction operator and corresponding interaction operands. Through the use of combined fragments the user will be able to describe a number of traces in a compact and concise manner. 16

17 Examples of interaction operators 17

18 Strict sequencing vs. weak sequencing Strict Sequencing: Search Google, Bing and Yahoo in the strict sequential order. Weak Sequencing: Search Google possibly parallel with Bing and Yahoo, but search Bing before Yahoo. 18

19 Examples of interaction operators (cont.) The interaction operator critical defines that the combined fragment represents a critical region. A critical region is a region with traces that cannot be interleaved by other occurrence specifications (on the lifelines covered by the region). 19

20 Interaction Use An interaction fragment which allows to use (or call) another interaction. Large and complex sequence diagrams could be simplified with interaction uses. It is also common reusing some interaction between several other interactions. Use Login interaction to authenticate user and assign result back to the user attribute of Site Controller. Interaction name I/o argumentsReturn-value Interaction use 20

21 Facebook User Authentication 21

22 22 Currently on Floor 2, still going up

23

24 24

25 Timing Diagrams Show interactions when a primary purpose of the diagram is to reason about time. Focus on conditions changing within and among lifelines along a linear time axis. Describe behavior of both individual classifiers and interactions of classifiers, focusing attention on time of events causing changes in the modeled conditions of the lifelines. 25

26 State or Condition Timeline show states of the participating classifier or attribute, or some testable conditions, such as a discrete or enumerable value of an attribute. Timeline shows Virus changing its state between Dormant, Propagation, Triggering and Execution state 26

27 Duration Constraint Ice should melt into water in 1 to 6 minutes 27

28 Time Constraint 28

29 Destruction Event Virus lifeline is terminated 29

30 Example Timing diagram 30

31 Discussions Actions: the elemental quanta of UML behavior. (see slide 9) Events: Signal / Call / Time / Change events (resulting in state transition) Messages: generated by action or event Calls: One type of actions/messages Signals: One type of actions/messages 31

32 Put Them All Together Cardiac Pacemaker Three Letter parameters – First Letter (A, V, or D) whether the atrium or the ventricle or both is being paced – Second Letter (A, V, or D) whether the atrium or the ventricle or both is being monitored – Third Letter (I, T, or D) indicating if inhibited, triggered or dual pacing modes 32

33 Class Diagram 33

34 34

35 35

36 36

37 37 CoilDriver State Model 15 times -> “0” 8 times -> “1”

38 38 Communications Manager State Model

39 39 Processing Statechart

40 Chamber Model State Model 40

41 41 Atrial Model State Model

42 42 Ventricular Model State Model

43 43


Download ppt "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."

Similar presentations


Ads by Google