Activity Diagram For IWP.
Activity Diagram For IWP.
Activities
The steps of an activity diagram are the activities which are basically
operations.
These activities are specifically actions with respect to events from a
state model.
One activity can be started after completion of a previous activity or
multiple activities can be performed simultaneously(concurrent
activities).
Consider the following activity diagram for a stock trade processing.
The online stock broker first verifies the order against the customer’s
account, then execute it with the stock exchange. if the order executes
successfully, the system does three things concurrently i.e. mails trade
conformation to the customer, updates the online portfolio to reflect the
results of the trade, and settles the trade by debiting the account. When all
three concurrent threads (or activities) have been completed, the system
merges control into a single thread (or activity) and closes the order. If the
order execution fails, then the system sends a failure notice the customer
and closes the order.
Benefits or Usage of activity diagrams
Activity1
Activity2
Activity3
Activity4.1 Activity4.2
Activity Diagram Notations and Symbols:
A small filled circle followed by an arrow represents the initial action state
or the start point for any activity diagram.
Guards
In UML, guards are statements written next to a decision diamond
that must be true before moving next to the next activity.
yes
Activity
No
Activity
Synchronization
A fork node is used to split a single incoming flow into multiple
concurrent flowsi.e. a fork represents splitting of a single activity into
multiple parallel or concurrent activities. It is represented as a straight,
slightly thicker line in an activity diagram.
Fork Symbol
Join Symbol
Merge Event
A merge event brings together multiple flows that are not concurrent.
Sent and Received Signals:
Signals:
Signals represent how activities can be modified from outside the system.
They usually appear in pairs of sent and received signals, because the state
can't change until a response is received, much like synchronous messages
in a sequence diagram.
The following examples illustrates an activity diagram with sending and receiving signal.
Consider a workstation that is turned on.It goes through a boot sequence and then
prompted for user log in.After the entry of user_name and password,the workstation
queried the network to validate the user.Upon validation ,the workstation then finishes
the start up process.
Object Flows:
Activity diagram sometimes shows objects that are input to an activity or output from
the activities.
Objects input to an activity means objects as arguments values to the operation which
initiates the activity and objects output to an activity means the returning object values
from the operation after completion of the activity.
In UML the object values are represented in square bracket below the object name.
In Activity diagrams, there are several ways to define the flow of data between objects.
The following diagram depicts a simple Object Flow between two actions, Fill Order
and Ship Order, both accessing order information. The order object is the result of the
operation to perform the Fill Order activity and the order object is taken as input
parameter for the operations to perform Ship order activity.
Pins are also used to show object flows. These are the small squares attached to the
activities where objects are taken as parameter to the operations. In the following
diagram Action Pins are used to reflect the order.
Consider the following example which represent object flows with pin :
1. Execute Action1. This action produces two output parameters: Object1 and Object2.
2. Execute Action2. This action requires Object2 as an input parameter. It DOES NOT
REQUIRE Object1 as an input parameter.
3. Execute Action3. This action requires both Object1 and Object2 (output parameters
of Action1) as input parameters.
Activity diagram examples with object flows:
In the following diagram , an airplane goes through several states as it leaves the gate,
flies and then lands again.
The following is the activity diagram for Process Order Activity with object flows
Activity diagrams tell you what happens, but they do not tell you who does what.
Consider the following example of an activity diagram for AMT withdrawal transaction
The above activity diagram does not show which people or organization
performs a particular activity
In programming, this means that the diagram does not convey which class is responsible for which
activity.
In domain modelling, this means that the diagram does not convey which people or organizations
are responsible for each activity.
To use swimlanes, the activity diagrams must be portioned into vertical zones separated by lines.
Each zone represents the responsibilities of a particular people or organization or class .