Activity Diagram: Components, Notations, and Uses.

Image result for activity diagram

We previously learned about preparing for C programming questions for an interview. An activity diagram visually presents a series of actions or flow of management during a system kind of like a multidimensional language or an information flow sheet. Activity diagrams are usually employed in business method modeling. They will additionally describe the steps during a use case diagram. Activities sculptured will be ordered and coincident. In each case, an activity diagram can have a starting (an initial state) and a finish (a final state).

Activity diagrams are graphical representations of workflows of stepwise activities and actions with support for alternative, iteration, and concurrency. Within the Unified Modeling Language, activity diagrams are supposed to model each procedure and structure processes (i.e., workflows), still, because the information flows intersecting with the connected additionally embrace parts showing the flow of knowledge between activities through one or additional data stores.

UML Activity Diagram:

 In UML, the activity diagram is employed to demonstrate the flow of management at intervals the system instead of the implementation. It models the coincident and ordered activities. The activity diagram helps in picturing the progress from one activity to a different. It places stress on the condition of flow and therefore the order within which it happens. The flow will be ordered, branched, or coincident and to cope with such styles of flows, the activity diagram has to return up with a fork and be part of, etc. it’s additionally termed as an object-oriented multidimensional language. It encompasses activities composed of a collection of actions or operations that are applied to model the behavioral diagram.

Notation of an Activity diagram:

Activity diagram constitutes following notations:

  1. Initial State or begin Point:

 A small cramped circle followed by an arrow represents the initial action state or the beginning purpose for any activity diagram. For activity diagram exploitation swim lanes, check that the beginning purpose is placed within the high left corner of the primary column.

  • Activity or Action State:

An action state represents the non-interruptible action of objects. You’ll be able to draw an action state in sensible Draw employing a parallelogram with rounded corners.

  • Action Flow:

 The action flows, additionally referred to as edges and ways, illustrate the transitions from one action state to a different. They’re typically drawn with an arrowed line.

  • Object Flow:

Object flow refers to the creation and modification of objects by activities. An object flow arrow from an action to an object means the action creates or influences the item. An object flow arrow from an object to action indicates that the active state uses the item.

  • Selections and Branching:

A diamond represents a call with alternate ways. Once an activity needs a call before moving on to the subsequent activity, add a diamond between the 2 activities. The outgoing alternates ought to be labeled with a condition or guard expression. You’ll be able to additionally label one in all the ways “else.”

  • Guards:

 In UML, guards are a press release written next to a call diamond that has to be true before moving next to the subsequent activity. These aren’t essential, however, are helpful once a particular answer, like “Yes, 3 labels are written,” is required before moving forward.

  • Synchronization:

 A fork node is employed to separate one incoming flow into multiple coincident flows. It’s depicted as a straight, slightly thicker line in an activity diagram.

• A been part of node joins multiple coincident flows back to one outgoing flow.

• A fork and be part of the mode used along are usually spoken as synchronization.

  • Time Event:

This refers to an incident that stops the flow for a time; a sandglass depicts it.

  • Merge Event:

A merge event brings along multiple flows that aren’t coincident.

  1. Sent and Received Signals:

 Signals represent however activities will be changed from outside the system. They typically seem in pairs of sent and received signals, as a result of the state cannot amendment till a response is received, very similar to synchronous messages during a sequence diagram. As an example, authorization of payment is required before an order will be completed.

  1. Interrupting Edge:

  An event, like a cancellation, that interrupts the flow denoted with a lightning bolt.

  1. Swim lanes:

Swim lanes cluster connected activities into one column.

  1. Final State or finish Point:

An arrow informs to a crammed circle nested within another circle represents the ultimate action state.

Components of associate degree Activity Diagram:

 Following are the parts of associate degree activity diagram:

• Activities:

 The categorization of behavior into one or additional actions is termed as associate degree activity. In alternative words, it may be aforementioned that associate degree activity could be a network of nodes that are connected by edges. The sides depict the flow of execution. It’s going to contain action nodes, management nodes or object nodes. The management flow of activity is depicted by management nodes associate degreed object nodes that illustrates the objects used among an activity. The activities are initiated at the initial node and are terminated at the ultimate node.

 • Activity partition /swim lane:

The swim lane is employed to cluster all the connected activities in one column or one row. It may be either vertical or horizontal. It won’t to add modularity to the activity diagram. It’s not necessary to include a swim lane within the activity diagram. However, it’s wont to add additional transparency to the activity diagram.

• Forks:

Forks and be part of nodes generate the synchronal flow within the activity. A fork node consists of 1 inward edge and several other outward edges. It’s constant as that of assorted call parameters. Whenever a piece of knowledge is received at associate degree inward edge, it gets derived and split crosswise varied outward edges. It split one inward flow into multiple parallel flows.

• Join Nodes:

Join nodes are the other fork nodes. A Logical and operation is performed on all of the inward edges because it synchronizes the flow of input across one single output (outward) edge.

• Pins:

It is a little parallelogram, which is connected to the action parallelogram. It clears out all the untidy and sophisticated issues to manage the execution flow of activities. It’s an associate degree object node that exactly represents one input to or output from the action.

Why use Activity Diagram?

An event is formed as an associate degree activity diagram encompassing a bunch of nodes related to edges. To model the behavior of activities, they’ll be connected to any modeling component. It will model use cases, classes, interfaces, components, and collaborations.

 It principally models processes and workflows. It envisions the dynamic behavior of the system moreover as it constructs a runnable system that comes with forward and reverses engineering. It doesn’t embody the message half, which suggests message flow isn’t depicted in an associate degree activity diagram. It is constant as that of a flow chart however not specifically a flow chart itself. It’s wont to depict the flow between many activities.

How to draw associate degree Activity Diagram?

An activity diagram could be a flow chart of activities because it represents the progress among varied activities. They’re similar to the flowcharts, however, they’re not precisely the flow chart. In alternative words, it may be aforementioned that the associate degree activity diagram is associate degree improvement of the flow chart, which encompasses many distinctive skills.

Since it incorporates swim lanes, branching, parallel flows, join nodes, management nodes, and forks, it supports exception handling. A system should be explored as a full before drawing an associate degree activity diagram to supply a clearer read of the user. All of the activities are explored once they’re properly analyzed for locating out the constraints applied to the activities. Each activity, condition, and association should be recognized. Once gathering all the essential information, associate degree abstract or an example is made, that is then reworked into the particular diagram.

Following are the principles that are to be followed for drawing associate degree activity diagram:

1. A meaning name ought to be to each activity.       

2. Determine all of the constraints.

3. Acknowledge the activity associations.

When to use associate degree Activity Diagram?

 An activity diagram may be wont to portray business processes and workflows. Also, it used for modeling business moreover because of the software system.

Associate degree activity diagram is used for the followings:

  1. To diagrammatically model the progress additional simply and clearly.
  2. Modeling the execution flow among many activities.
  3. Modeling comprehensive information on operating or the associate degree rule utilized among the system.
  4. To model the business method and its progress.
  5. To ascertain the dynamic side of a system.
  6. In order to get the top-ranking flowcharts for representing the progress of associate degree application.
  7. To represent a high-level read of a distributed or associate degree object-oriented system.

Difference between Activity Diagram and Flowchart?

The main distinction between activity diagram associate degreed flow chart is that an activity diagram could be a UML behavior diagram that represents the progress of stepwise activities of the system whereas a flow chart could be a graphical diagram that represents the sequence of steps to resolve a haul.

  • Definition:

An activity diagram could be a graphical illustration of workflows of stepwise activities and actions with support for alternative, iteration, and concurrency. In distinction, a flow chart could be a represented illustration that illustrates an answer model to a given downside. Thus, this can be the most distinction between the activity diagram and the flow chart.

  • Usage:

An activity diagram helps to grasp the business method or progress of the system whereas a flow chart helps to research and style a program.

  • Association:

Another distinction between the activity diagram associate degreed flow chart is that an activity diagram is related to UML whereas a flow chart is related to programming.

  • Conclusion:

The main distinction between the activity diagram and the flow chart is that the activity diagram could be a UML behavior diagram that represents the progress of stepwise activities of the system whereas the flow chart could be a graphical diagram that represents the sequence of steps to resolve a haul. Despite the fact that each of these has similar symbols, there’s a definite distinction between the activity diagram and the flow chart.

Also, check our other articles for more coding and programming related fun. Knowing more about software testing will be a plus.


I am a Software Engineer with ample experience in making games, websites, mobile apps and augmented reality solutions.

Pin It on Pinterest