Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 11 Activity Diagrams. 2 “Activity diagrams are a technique to describe procedural logic, business processes, and work flows” - M. Fowler An activity.

Similar presentations


Presentation on theme: "Chapter 11 Activity Diagrams. 2 “Activity diagrams are a technique to describe procedural logic, business processes, and work flows” - M. Fowler An activity."— Presentation transcript:

1 Chapter 11 Activity Diagrams

2 2 “Activity diagrams are a technique to describe procedural logic, business processes, and work flows” - M. Fowler An activity diagram... –models the dynamic aspects of a system. –serves the same function as a flowchart. –Is composed of a sequence of actions, possibly concurrent Introduction

3 3 An activity diagram… –is commonly used to show the actions/steps involved in carrying out a particular use-case. –Shows the flow from action to action. –Commonly contains action states, flows (a.k.a edges and transitions), forks, merges, joins, decisions and objects. Decisions… –are used to show alternate flows of control. –is represented as a diamond. Outgoing transitions are labeled with guard conditions. Terms and Concepts

4 4 Forking and Joining –A fork is when a single flow of control splits into two or more parallel (concurrent) flows of control. –A join is when two or more flows of control merge into a single flow of control. –A flow of control is also known as a thread. –A synchronization bar is used to model forking and joining, and is modeled as a thick horizontal or vertical bar. Terms and Concepts

5 5 A Simple Activity Diagram Figure 11.1

6 6 Actions can be decomposed into subactivities –Used as a way to manage complexity –Indicated by the rake symbol Decomposing an Action

7 7 The Activity Diagram of Figure 11.1 modified to invoke the activity in figure 11.2

8 8 Partitions... –Are used to group actions according to the organization or class responsible for those actions. –Are divided by solid vertical lines. –Can be used in the context of concurrency. An activity can only belong to one partition, but transitions between actions may cross partitions. Partitions (a.k.a. Swimlanes)

9 9 Activity Diagram with Partitions

10 10 Receiving Signals A signal is an event received from an outside process. The receipt of the signal triggers the start of an activity

11 11 Sending Signals The activity sends a signal (send itinerary) and then concurrently waits for two separate external signals. The first flow to reach the final state will terminate the other flow.

12 12 Tokens “ Control flow is modeled in terms of tokens. The start node will create a token which then goes to next action. After the action executes, the token will go to the next action. When it encounters a fork, the fork will create a token for each of its outbound flows. The opposite happens for joins. It will produce an outbound token once all inbound tokens arrived.” -- http://edutechwiki.unige.ch/en/UML_activity_diagram

13 13 Four Ways of Showing an Edge (an edge is another name for transition ) The last two examples are passing an Order object from Receive Invoice to Make Payment

14 14 Pins and Transformations Actions can have parameters Parameters can be modeled as pins Pins correspond to the parameter boxed on a decomposed diagram Transformations can be used to ensure arguments match parameters

15 15 Expansion Region An expansion region marks an activity diagram area where actions occur once for each item in a collection Once all of the reviewed articles have been placed in the list box pin, a single token is passed to Publish Newsletter > or > stereotypes are commonly used

16 16 Expansion Region Prepare Article is a shorthand notation for the expansion region in figure 11.9 > expansion is assumed by default

17 17 Flow Finals Within an expansion region a final flow indicates the end of a particular flow with out termination the remaining flows. The number of items in the output collection may be less than the number of items in the input collection

18 18 Join Specification A join specification is a Boolean expression attached to a join Each time a token arrives at the join, the join specification is evaluated

19 19 Object Flow –Objects may be attached (using dependencies) to specific activities in an activity diagram. –The activity to which an object is connected has a direct effect on the object’s state or lifetime. –An object’s state may be shown in brackets inside the object rectangle. Objects and Activity Diagrams

20 20 Activity Diagram with Object Flow Using UML 1 Notation


Download ppt "Chapter 11 Activity Diagrams. 2 “Activity diagrams are a technique to describe procedural logic, business processes, and work flows” - M. Fowler An activity."

Similar presentations


Ads by Google