Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Interaction diagrams and activity diagrams Speaker: 陳 奕 全 Real-time and Embedded System Lab 15 August 2002.

Similar presentations


Presentation on theme: "1 Interaction diagrams and activity diagrams Speaker: 陳 奕 全 Real-time and Embedded System Lab 15 August 2002."— Presentation transcript:

1 1 Interaction diagrams and activity diagrams Speaker: 陳 奕 全 Real-time and Embedded System Lab 15 August 2002

2 2 Outline Introduction of interaction diagrams Introduction of interaction diagrams Modeling flows of control Modeling flows of control Introduction of activity diagrams Introduction of activity diagrams Modeling a workflow Modeling a workflow Modeling a operation Modeling a operation

3 3 Introduction of interaction diagrams How do you model system ’ s dynamic aspects? How do you model system ’ s dynamic aspects? –To build up storyboards of scenarios. In UML, you model these storyboards by using interaction diagrams. In UML, you model these storyboards by using interaction diagrams. storyboard: noun, a series of drawings or pictures that show the outline of the story of a film/movie, etc. storyboard: noun, a series of drawings or pictures that show the outline of the story of a film/movie, etc.

4 4 Introduction of interaction diagrams (Cont.) Interaction diagrams contain sequence diagrams and collaboration diagrams. Interaction diagrams contain sequence diagrams and collaboration diagrams. Sequence diagrams: emphasis the time ordering of messages. Sequence diagrams: emphasis the time ordering of messages. Collaboration diagrams: emphasis the structural organization of objects that send/receive messages. Collaboration diagrams: emphasis the structural organization of objects that send/receive messages. Both of them are semantically equivalent. Both of them are semantically equivalent.

5 5 Introduction of interaction diagrams (Cont.) Sequence diagrams Sequence diagrams Collaboration diagrams Collaboration diagrams

6 6 Modeling flows of control By time ordering: By time ordering: –Set the context for the interaction. –Set the stage for the interaction. –Set the lifeline for each object –Starting with the message –Visualize the nesting of messages (optional) –Specify time or space constraints (optional)

7 7 Modeling flows of control (Cont.)

8 8 By organization: By organization: –Set the context for the interaction –Set the stage for the interaction –Set the initial properties of each object –Specify the links among –Starting with the messages that initiates this interaction –Specify time or space constraints (optional)

9 9 Modeling flows of control (Cont.)

10 10 Introduction of activity diagrams Consider the workflow associated with building a house. Consider the workflow associated with building a house. –select site, commission an architect, develop plan, bid plan, construction … until everything is done. In a real project, there are a lots of parallel activities among various trades. In a real project, there are a lots of parallel activities among various trades. We can model these dynamic aspects using activity diagrams. We can model these dynamic aspects using activity diagrams.

11 11 Introduction of activity diagrams (Cont.) Activity diagrams shows the flow from activity to activity. Activity diagrams shows the flow from activity to activity. Activity: an ongoing nonatomic execution within a state machine. Activity: an ongoing nonatomic execution within a state machine. ActivityAction Made up of executable atomic computations (send a signal, create, destroy)

12 12 Introduction of activity diagrams (Cont.) Activity diagrams commonly contain: Activity diagrams commonly contain: –Activity states and action states –Transition Sequential transition, branching, forking and joining. Sequential transition, branching, forking and joining.

13 13 Introduction of activity diagrams (Cont.) –Objects Swimlane: modeling workflows of business processes. Swimlane: modeling workflows of business processes. Flow of object: Usage of dependency relationships and objects Flow of object: Usage of dependency relationships and objects

14 14 Modeling a workflow To model a workflow To model a workflow –Establish a focus for the workflow. –Select the business objects. –Identify the conditions of the workflow ’ s states. –Specify the activities and actions and render them in diagrams –Render transitions the connect activity and action states. –Render important objects in the activity diagrams.

15 15 Modeling a workflow (Cont.)

16 16 Modeling a operation To model a operation: To model a operation: –Collect the abstractions that are involved in this operation –Identify the precondition and postcondition –Specify the activities and actions and render them in diagrams –Specify conditional paths and iteration. –Use forking and joining to specify parallel flows of control

17 17 Modeling a operation Signature: one parameter and one return value


Download ppt "1 Interaction diagrams and activity diagrams Speaker: 陳 奕 全 Real-time and Embedded System Lab 15 August 2002."

Similar presentations


Ads by Google