Download presentation
1
A Student Guide to Object-Oriented Development
Chapter 8 Activity diagrams
2
Activity diagrams show the internal flow of control in a process
can be used to model processing at different levels e.g. high-level workflows in an organization detail of what happens in a use case detail of how an operation works
3
Activity diagrams can be used to represent
sequence selection iteration can also illustrate where different activities can be carried out in parallel
4
Modelling a sequence of activities
5
Notation
6
Modelling alternative courses of action (1)
7
Activity Diagram (UML)
Decision point Synchronization bar End Task UML and C++ A Practical Guide To Object-Oriented Development
8
Activity Diagrams Activity diagrams extend statechart diagrams and present a sequence of "activities" and how the execution path progresses from one activity to another. UML and C++ A Practical Guide To Object-Oriented Development
9
Activity Diagrams Activity diagrams can also present:
decision points: conditions that change the flow of actions parallel execution paths objects affected by actions UML and C++ A Practical Guide To Object-Oriented Development
10
Example: Activity Diagram
Select Course Check Schedule Pre-requisites Assign to Resolve Conflict Update [checks completed] [checks failed] [student added to course] Initial state Action state Final state The flow of events of a use-case can be described graphically with the help of an activity diagram. Such a diagram is used for capturing workflow in an organiztion and shows: Action states, which represent the execution of an activity or step within the flow of events. Transitions between those action states. Decisions for which a set of guard conditions are defined. These guard conditions control which transition follows once the activity an action state represents has been completed. The above activity diagram shows the steps of the Register for Courses use case. The student first selects a course. Once the course has been selected, the student’s schedule must be checked for conflicts and it must be verified that the student has taken all of the pre-requisites of the selected course. If these validation steps complete successfully, the student is added to the course and his/her schedule can be updated. If the checks fail, the conflicts must be resolved before the student can be registered for the course. Note: An activity diagram is a special case of a state diagram, so a state diagram could also be used. State diagrams are discussed in the Class Design module.
11
Modelling alternative courses of action(2)
12
Modelling iteration of activities
13
Modelling activities that are carried out in parallel(1)
14
Modelling activities that are carried out in parallel(2)
15
Alternative and parallel activities
16
Swimlanes
17
In alternative activities the diamond symbol may be omitted
18
Including objects and object flows
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.