0% found this document useful (0 votes)
61 views30 pages

Activity Diagrams

The document discusses activity diagrams, including their purpose, how to draw them, components used in activity diagrams, and examples. Activity diagrams can be used to visualize the dynamic nature of a system and construct executable systems using forward and reverse engineering techniques. They describe the sequential, parallel, branched, and concurrent flow between activities in a system.

Uploaded by

Khoa Phạm Anh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
61 views30 pages

Activity Diagrams

The document discusses activity diagrams, including their purpose, how to draw them, components used in activity diagrams, and examples. Activity diagrams can be used to visualize the dynamic nature of a system and construct executable systems using forward and reverse engineering techniques. They describe the sequential, parallel, branched, and concurrent flow between activities in a system.

Uploaded by

Khoa Phạm Anh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 30

1

Duration : 3 Hrs

Ramakant Soni
Assistant Professor
Dept. of Computer Science
B K Birla Institute of Engineering & Technology, Pilani, India

Ramakant Soni @ BKBIET Pilani


Activity Diagram

Activity diagram is basically a flow chart to


represent the flow from one activity to another
activity.

The activity can be described as an operation


of the system.

This flow can be sequential, branched or


concurrent.

Ramakant Soni @ BKBIET Pilani 2


Purpose

Activity diagrams are not only used for visualizing


dynamic nature of a system but they are also used to
construct the executable system by using forward and
reverse engineering techniques.

It does not show any message flow from one activity to


another.

Ramakant Soni @ BKBIET Pilani 3


So the purposes can be described as to:

• Draw the activity flow of a system.

• Describe the sequence from one activity to another.

• Describe the parallel, branched and concurrent flow


of the system.

Ramakant Soni @ BKBIET Pilani 4


How to draw Activity Diagram

Before drawing an activity diagram we must have a


clear understanding about the elements used in activity
diagram.

First we should identify the following elements :


1. Activities
2. Association
3. Conditions
4. Constraints

Once the above mentioned parameters are identified we need to


make a mental layout of the entire flow. This mental layout is then
transformed into an activity diagram.

Ramakant Soni @ BKBIET Pilani 5


Example of an order management system

The diagram is drawn with the four main activities :


• Send order by the customer
• Receipt of the order
• Confirm order
• Dispatch order

After receiving the order request condition checks are


performed to check if it is normal or special order.

After the type of order is identified dispatch activity is


performed and that is marked as the termination of the
process.

Ramakant Soni @ BKBIET Pilani 6


Activity Diagram for order management system

Ramakant Soni @ BKBIET Pilani 7


Activity Diagram components

 Initial node
The filled circle is the starting point of the diagram

 Final node
The filled circle with a boarder is the ending point. An
activity diagram can have zero or more activity final
state.

Ramakant Soni @ BKBIET Pilani 8


Activity
The rounded rectangle represents activities that occur. An
activity is not necessarily a program, it may be a manual thing
also.

Flow/ edge
The arrows in the diagram. No label is necessary.

Ramakant Soni @ BKBIET Pilani 9


 Fork
A black bar ( horizontal/vertical ) with one flow going into it
and several leaving it. This denotes the beginning of parallel
activities.

 Join
A block bar with several flows entering it and one leaving it.
this denotes the end of parallel activities

Ramakant Soni @ BKBIET Pilani 10


 Merge
A diamond with several flows entering and one leaving. The
implication is that all incoming flow to reach this point until
processing continues

 Sub-activity indicator
The rake in the bottom corner of an activity, indicates that
the activity is described by a more finely detailed activity
diagram.

Ramakant Soni @ BKBIET Pilani 11


Difference between Join and Merge
› A join is different from a merge in that the join synchronizes
two inflows and produces a single outflow. The outflow from
a join cannot execute until all inflows have been received.

› A merge passes any control flows straight through it. If two


or more inflows are received by a merge symbol, the action
pointed to by its outflow is executed two or more times.

Ramakant Soni @ BKBIET Pilani 12


 Decision
› A diamond with one flow entering and several leaving.
The flow leaving includes conditions as yes/ no state.

 Flow final
› The circle with X through it. This indicates that Process
stop at this point.

Ramakant Soni @ BKBIET Pilani 13


 Accept Event Action
Accept Event Action is an action that waits for the
occurrence of an event meeting specified
condition.

Ramakant Soni @ BKBIET Pilani 14


 Send Signal Action
Send Signal Action is an action that creates a
signal instance from its inputs, and transmits it to
the target object, where it may cause the firing of
a state machine transition or the execution of an
activity.

Ramakant Soni @ BKBIET Pilani 15


 Swim lane
A partition in activity diagram by means of dashed line,
called swim lane. This swim lane may be horizontal or
vertical.

Vertical Swimlane Horizontal Swimlane

Ramakant Soni @ BKBIET Pilani 16


Activity Diagram notation

text  Start at the top black circle


 If condition 1 is TRUE, go
right; if condition 2 is TRUE,
go down
 At first bar (a synchronization
bar), break apart to follow two
parallel paths
 At second bar, come together
to proceed only when both
parallel activities are done

Ramakant Soni @ BKBIET Pilani 17


Activity Diagram notation
 Activity – an oval

text  Trigger – path exiting an activity


 Guard – each trigger has a guard, a
logical expression that evaluates to
“true” or “false”
 Synchronization Bar – can break a
trigger into multiple triggers
operating in parallel or can join
multiple triggers into one when all
are complete
 Decision Diamond – used to
describe nested decisions (the first
decision is indicated by an activity
with multiple triggers coming out
of it)

Ramakant Soni @ BKBIET Pilani 18


Use Case: Receiving an Order Use Case: Receiving a Supply

text

Ramakant Soni @ BKBIET Pilani 19


Use Case: Receiving an Order and Receiving a Supply
Ramakant Soni @ BKBIET Pilani 20
Swimlane Activity Diagram

Swimlanes -
Activity Diagrams that show
activities by class.

Arrange activity diagrams


into vertical zones separated
by lines.

Each zone represents the


responsibilities of a particular
class.
(for example a particular
department).

Ramakant Soni @ BKBIET Pilani 21


Exercise 1: Online Shopping Process

Scenario:

“Online customer can browse or search items,


view specific item, add it to shopping cart, view
and update shopping cart, checkout. User can
view shopping cart at any time. Checkout is
assumed to include user registration and login.”

Ramakant Soni @ BKBIET Pilani 22


Activity diagram: Online Shopping Process

Ramakant Soni @ BKBIET Pilani 23


Exercise 2: Ticket Vending Machine

Scenario:
“Activity is started by Commuter actor who needs to buy a
ticket. Ticket vending machine will request trip information from
Commuter. This information will include number and type of
tickets, e.g. whether it is a monthly pass, one way or round
ticket, route number, destination or zone number, etc.

Based on the provided trip info ticket vending machine will


calculate payment due and request payment options. Those
options include payment by cash, or by credit or debit card. If
payment by card was selected by Commuter, another actor,
Bank will participate in the activity by authorizing the payment.

Ramakant Soni @ BKBIET Pilani 24


Activity diagram: Ticket Vending Machine

Ramakant Soni @ BKBIET Pilani 25


Exercise 3: Resolving issues in Software

Scenario:

“Prepare an activity diagram which shows how to


resolve an issue in a software design. After ticket is
created by some authority and the issue is reproduced,
issue is identified, resolution is determined, issue is fixed
and verified, and ticket is closed, if issue was resolved.”

Ramakant Soni @ BKBIET Pilani 26


Activity diagram: Resolving issues in Software

Ramakant Soni @ BKBIET Pilani 27


Exercise 4: Single Sign- on for Google Apps
Scenario:
To interact with partner companies Google uses single sign-on based on OASIS SAML 2.0
protocol. Google acts as service provider with services such as Gmail or Start Pages. Partner
companies act as identity providers and control user names, passwords, and other information
used to identify, authenticate and authorize users for web applications that Google hosts. Each
partner provides Google with the URL of its SSO service as well as the public key that Google will
use to verify SAML responses.

When a user attempts to use some hosted Google application, such as Gmail, Google generates
a SAML authentication request and sends redirect request back to the user's browser. Redirect
points to the specific identity provider. SAML authentication request contains the encoded URL
of the Google application that the user is trying to reach.

The partner identity provider authenticates the user by either asking for valid login credentials
or by checking for its own valid authentication cookies. The partner generates a SAML response
and digitally signs it. The response is forwarded to Google's Assertion Consumer Service (ACS).

Google's ACS verifies the SAML response using the partner's public key. If the response is valid
and user identity was confirmed by identity provider, ACS redirects the user to the destination
URL. Otherwise user will see error message.
Ramakant Soni @ BKBIET Pilani 28
Activity diagram: Single Sign- on for Google Apps

Ramakant Soni @ BKBIET Pilani 29


References:
[1] http://www.uml-diagrams.org/

[2] http://en.wikipedia.org/wiki/Activity_diagram

[3] http://www.visual-paradigm.com/VPGallery/diagrams/Activity.html

[4] http://www.ibm.com/developerworks/rational/library/3101. html

[5] http://www.uml-diagrams.org/activity-diagrams-examples.html

Thanks
Ramakant Soni @ BKBIET Pilani 4/26/2015 30

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy