UML Guide: UML Activity Diagrams

Categories:

Recommended

Activity diagram

Activity diagrams are graphical representations of workflows of stepwise activities and actions with support for choice, iteration and concurrency. In the Unified Modeling Language, the first structured method for documenting process flow, the “flow process chart”. Activity diagrams combine techniques from flow charts, event diagrams, and Petri nets. Activity diagrams describe the workflow of a system. The diagrams describe activities by showing the sequence of activities performed. Activity diagrams are useful for analysing a use case by describing what actions need to take place and when they should occur. Usually activity diagrams are used to describe a complicated algorithm or to model the flow in applications with parallel processes. The distinction between state and activity diagrams is only in what they model. Where state diagrams are used to model state-dependent behaviour and conditions for transitions between states, activity diagrams are used to model the flow of actions and the order in which the actions take place.

Notational Elements

The notational elements used in state diagrams and activity diagrams are the same except for a few subtle differences. The main difference between UML state diagrams and UML activity diagrams is in their intent. The basic elements of UML activity diagrams can be classified as activity nodes and edges. Activity nodes can either be action, object or control nodes. An activity is shown as a round-cornered rectangle which encloses all the action and control nodes which make up the activity. Action nodes represent a single step within an activity and are also denoted by a round-cornered rectangle. Control nodes model different flows that are controlled by conditions called guards.

Initial and final nodes

The starting point of the flow that is shown in an activity diagram is indicated with a filled circle. An activity diagram must have exactly one initial node. An exit point in an activity diagram is called an final node. There are two kinds of final nodes, referred to as as activity final node and flow final node. The flow final node denotes the end of all flow controls within the activity. The activity final node denotes the end of a single flow control. An activity final node is shown with a filled circle with an outline.

Construction

Activity diagrams are constructed from a limited number of shapes, connected with arrows.[4] The most important shape types:

  • ellipses represent actions;
  • diamonds represent decisions;
  • bars represent the start (split) or end (join) of concurrent activities;
  • black circle represents the start (initial node) of the workflow;
  • an encircled black circle represents the end (final node).

Arrows run from the start towards the end and represent the order in which activities happen.

Activity diagrams can be regarded as a form of a structured flowchart combined with a traditional data flow diagram. Typical flowchart techniques lack constructs for expressing concurrency. However, the join and split symbols in activity diagrams only resolve this for simple cases; the meaning of the model is not clear when they are arbitrarily combined with decisions or loops.

While in UML 1.x, activity diagrams were a specialized form of state diagrams, in UML 2.x, the activity diagrams were reformalized to be based on Petri net-like semantics, increasing the scope of situations that can be modeled using activity diagrams. These changes cause many UML 1.x activity diagrams to be interpreted differently in UML 2.x.

UML activity diagrams in version 2.x can be used in various domains, e.g. in design of embedded systems. It is possible to verify such a specification using model checking technique.

Category:
Tag:

Attribution

University of Pretoria. Chapter 16- UML Activity Diagrams. https://www.cs.up.ac.za/cs/lmarshall/TDP/2015/Notes/_Chapter16_ActivityDiagrams.pdf

Source of the article: Wikipedia

VP Flipbook Maker

This flipbook was made with the free flipbook maker from Visual Paradigm Online, you can also develop a book like this. Create online flipbooks, design, publish and share your flipbooks online, try it now!