Activity diagram basics
Activity diagrams are primarily used to describe behaviour. They are represented as a sequential
flow of activities that describes concepts like workflow.
An activity describes a logical unit of work. Activities can be broken down in actions. An action is
the smallest unit of work that are not decomposed any further. An activity diagram has a start and
may have multiple end points. The UML 2 also provides for a flow final (a circle with a cross) that
indicates that the process stops.
Activities are joined by process flows or events. In addition, a decision node can model divergent
behaviour based on a condition. Typically a Start and End node are defined to complete the full
activity diagram representation.
Synchronization points may also be defined to illustrate how processing may be carried out in
parallel, then synchronized at a point before further activity is undertaken.
Input and output parameters can be shown. This is done via rectangles that attach to the activities.
Partitions allow the modeller to create views on the activity diagram. It may show areas of
responsibility, organizational departments and the like.
The following example shows what happens if a system becomes unavailable while a user is using
it. The user will receive a message that the system is unavailable. The system will try to reconnect
three times. If not successful it will display an error message. The display activity makes use of an
input parameter:connect state. This parameter indicates to the activity what error occurred. The
display error message activity is broken down in the actions that executes.
We have made use of partitions to indicate the areas of system execution and error management.