activity diagram
DESCRIPTION
Use case model activity diagramTRANSCRIPT
UML Behavioral Diagram
Activity Diagram
INSPIRING CREATIVE AND INNOVATIVE MINDS
Activity Diagram
• Activity diagrams describe the workflow behavior of a system
• The diagrams describe the state of activities by showing the sequence of activities performed.
•Activity diagrams can show activities that are conditional or parallel
INSPIRING CREATIVE AND INNOVATIVE MINDS
Activity Diagram Elements
Initial Activity: This shows the starting point or first activity . Final Activity: The end of the Activity
diagram
Represented by a rectangle with rounded (almost oval) edges.
Similar to flowcharts, a logic where a decision is to be made is depicted by a diamond
Some activities occur simultaneously or in parallel. Such activities are called concurrent activities.
Initial Activity Final Activity
Activity
Decisions
Concurrent Activities
INSPIRING CREATIVE AND INNOVATIVE MINDS
Activity Diagram allow to model Decisions
act Customer Process
Customer EntersWeb site
User Logs In
UserValidation
Rejected
View BookStore
Select Book for Purc hase
Add to Shopping Basket
View Shopping Basket
Commit Order
Supply Credit Card Deta ils
Confirm Purchase
Credit Card Problems
Close Order
Credit Check
Items De livered
Order Complete
Customer Process
Decision
INSPIRING CREATIVE AND INNOVATIVE MINDS
Activity Diagram can model concurrency
act Credit Card Problem
StaffContactClient
Order
Phone Client
Update on Credit Ca rd
Accept Order
Order
Cancel Order
Check Credit Card
Process Credit CardDeliv er Goods
Check Stock
Upda te M ail Order
ActivityFinal
Inva lid
Valid
Out of Stock
In Stock
Credit card problem Synchronization
Splitting
Synchronizationof multiple activities
Splitting the flow of control into multiple threads
INSPIRING CREATIVE AND INNOVATIVE MINDS
Exercise
Activity Diagram
Draw an activity diagram that represents the making of a cup of tea.
The initial three activities are Fill kettle with water, Find cup and Find tea bag and they may be performed in parallel. When the Find cup and Find tea bag are completed the activity Place tea bag in cup
can start. The kettle must have boiled and the tea bag must have been placed in the cup before the activity Add water to cup can begin. If milk is required then activity Add milk should be performed.