You are on page 1of 4

Scenario XYZ Fashions is a garment company which has number of small offices and a large warehouse in the city.

If a customer wants to order something from the company, he should visit one of the offices of XYZ fashions and place the order. When the orders are received, they are sent to the warehouse to arrange the delivery. When the information regarding the order is received, warehouse employees pick items from shelves and assemble the order. Once the order is assembled, the warehouse arranged the delivery of goods to the customer. Draw an Activity diagram to describe the workflow of the above process.

What is an Activity Diagram? From its basic idea, an activity diagram is a simple and intuitive illustration of what happens in a workflow, what activities can be carried out in parallel, and whether there are substitute paths through the workflow. Activity diagrams represent the business and operational workflows of a system. An Activity diagram is a dynamic diagram that shows the activity and the event that causes the object to be in the particular state. Activity diagram is generally used to show parallel processing. It includes a Fork and a Join and a Branch and a Merge. Fork represents parallel processing. Join indicates the end of the parallel processing. Branch is used for a guard condition or a decision point in other words. It is like an if/else. Each Branch corresponds to a Merge which signifies linear processing from that point on.

The basic purposes of activity diagrams are similar to other four diagrams. It captures the dynamic behavior of the system. Other four diagrams are used to show the message flow from one object to another but activity diagram is used to show message flow from one activity to another. The purpose of the activity diagram is to model the procedural flow of actions that are part of a bigger activity. In projects in which use cases are there, activity diagrams can model a specific use case at a more detailed level. However, activity diagrams can be used independently of use cases for modeling a business-level function, for example buying a concert ticket or registering for a college class. Activity diagrams can also be used to model system-level functions, for example how a ticket reservation data mart populates a corporate sales system's data warehouse. Before drawing an activity diagram we should have a clear understanding about the elements used in activity diagram. The main element of an activity diagram is the activity itself. An activity is a function performed by the system. After classifying the activities we need to understand how they are associated with constraints and conditions. The contents of an activity diagram may be organized into partitions (swim lanes) using solid vertical lines. A partition/ swim lanes does not have a formal semantic interpretation, but is, in business modeling, often used to represent an organizational unit of some kind. For example, see the below figure, which is an Activity Diagram with Swim Lanes:

Elements of an Activity Diagram An Activity diagram consists of the following behavioral elements:
Element and its description

Symbol

Initial Activity: This shows the starting point or first activity of the flow. Denoted by a solid circle. This is similar to the notation used for Initial State.

Activity: Represented by a rectangle with rounded (almost oval) edges.

Transitions: Transitions are represented by open arrow heads. Transitions are used to indicate the flow among elements in the diagram.

>

An Object Flow: Shows the flow of an object from one activity (or action) to another activity (or action).

--------->

An Object Node: Is used to symbolize an object that is connected to a set of Object Flows.

Decisions: Similar to flowcharts, a logic where a decision is to be made is depicted by a diamond, with the options written on either side of the arrows emerging from the diamond, within box brackets. Guard: A condition that specifies whether a thread of control can flow along a connector. Most frequently used on the outgoing flows of a decision node and its shown inside brackets.

Signal: When an activity sends or receives a message, that activity is called a signal. Signals are of two types: Input signal (Message receiving activity) shown by a concave polygon and Output signal (Message sending activity) shown by a convex polygon.

Concurrent Activities: Some activities occur simultaneously or in parallel. Such activities are called concurrent activities. For example, listening to the lecturer and looking at the blackboard is a parallel activity. This is represented by a horizontal split (thick dark line) and the two concurrent activities next to each other, and the horizontal line again to show the end of the parallel activity. Fork Node: Divides a single flow into concurrent flows. Each incoming thread of control produces a thread of control on each outgoing connector. Join Node: Combines concurrent flows into a single flow. When every incoming flow has a thread of control waiting, a thread of control is produced on the output.

A 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.

Final Activity: The end of the Activity diagram is shown by a bull's eye symbol, also called as a final activity.

Activity Diagram for Customer Ordering and Delivering Goods Process of XYZ Fashions.
Activity Diagram for Custom er Ordering and Delivering Goods Process of XYZ Fashions.

Customer

Office

Warehouse

Employees

Visit Office

Place Order

[Order Placed]

Receive Order

Check The Customer Has Available Credit

Check The Ordered Products Are In Warehouse

[Order Accepted]

Send Order

Receive Order

Arrange Delivery

Receive Order Information

Pick Items From Shelves

Assemble Order

Deliver Goods

Finish Assemble

Receive Goods

[Goods Delivered]

I used Star UML to draw the Activity Diagram. I used Swimlanes to show the process. There are four Swimlanes namely, Customer, Office, Warehouse and its Employees. I have used synchronization bars to show the activities done concurrently.

You might also like