You are on page 1of 16

UML Activity

Diagrams

If a use case
gets too
complex, we
use activity
diagrams to
clarify
things

Activi
ty
diagra
ms

Activities are rectangles with


rounded corners

Transitions are shown


by arrows
Sometimes the transition may have
text to explain what is happening

Start and Finish


A start is shown by a filled in circle
A finish is a circle containing a filled in
circle

Decisions are denoted


by diamonds

Guard
conditions block
the flow if some
condition is not
met
They "guard" the door

Synchronization bars
Allow for the branching and
joining of synchronous activities

Synchronous means
that two or more things
are happening
simultaneously

Swimlanes show who


is responsible for
what
Swimlanes are optional

Activity Diagram Example


1

Solution

Activity Diagram Example


2

Activity Diagram Example


3
A major distributor of office supplies has a set of criteria for
preparing bills.
When the customer places the order one of the sales staff
prepares the order and writes the bill, if there is an insufficient
quantity of items on hand, the back order is set up for missing
items. The available items are shipped and bill is prepared.
The cost is billed for the back order items when they shipped.
Wholesale
customers are eligible for discount if they purchase minimum of
100 items. Retail customers are4 not eligible for any discount
irrespective of the number of items ordered. All retail customers
pay sales tax, Wholesale customers dont pay any tax provided
they have state tax exception. All bills are mailed to customers.
Draw activity diagram with swim lanes and draw class
diagram.

Conclusion
When we have a complex use case, UML
activity diagrams can clarify things
They are essentially tightly-defines
flowcharts
They use activities, transitions, decisions,
guard conditions, and synchronization bars

You might also like