Activity Diagram
Activity Diagram
Introduction
• Activity diagrams are the object-oriented equivalent of flow charts and
data-flow diagrams from structured development.
• Activity diagrams describe the workflow behavior of a system.
• The process flows in the system are captured in the activity diagram.
• Activity diagram illustrates the dynamic nature of a system by modeling
the flow of control from activity to activity.
Activity Diagram can be used
• to explore the logic of
• a complex operation.
• a complex business rule.
• a single use case.
• several use cases.
• a business process.
• software processes.
• Useful for showing workflow and parallel processing.
Notations
• Activity name
• Control flow
• Object flow
• An Initial node
• A final Activity node
• An object node
• A decision node
• Merge node
• Fork node
• Join node
• Swimlane
Control Node Activities guidelines
• It is possible to show that activities can occur in parallel, using two parallel bars.
• The first bar is called a fork, it has one transition entering it and two or more transitions
leaving it.
• The second bar is a join, with two or more transitions entering it and only one leaving it.
• A Fork Should Have a Corresponding Join.
• Forks Have One Entry Transition.
• Joins Have One Exit Transition
• Avoid Superfluous Forks.
Control node - Fork
• Fork is the first kind of control node for concurrency which has one
incoming edge that is activity that was going on is flowing it through this
edge and it has multiple outgoing edges. So, it has to have at least 2 to
mean concurrency that is used to split incoming flow into multiple
concurrent flows. So, this is a sequential flow and these are all concurrent
flows.
Control node - Join
• a join node waits for the different flows that had started concurrently to
reach a common point of completion and then only this will proceed. So,
this is known as a join node. These are very typical of activity diagrams
which show you the concurrent part of the algorithmic behavior or the use
case behavior where more than one activities are happening at the same
time which is very common in most situations.
Swimlane
• A swimlane is a way To group activities Performed by the Same actor on an Activity diagram or to
group activities in a single thread
• Order Swimlanes in a Logical Manner.
• Apply SwimLanes To Linear (sequential) processes. A good rule of thumb is that swimlanes are best applied to
linear processes.
• Activities will relate to certain actors, try to partition the activity based on which actor is involved
in this activity
• Have Less Than Five Swimlanes.
• Consider Swimareas For Complex Diagrams.
• SwimLane Suggest The Need to Reorganize Into Smaller Activity Diagrams.
Example: ATM scenario
Click icon to add picture