An activity diagram is a UML diagram that provides a view of the behavior of a system by describing the sequence of actions in a process. Activity diagrams are similar to flowcharts because they show the flow between the actions in an activity; however, activity diagrams can also show parallel or concurrent flows and alternate flows.
In activity diagrams, you use activity nodes and activity edges to model the flow of control and data between the actions.
Activity diagrams are helpful in the following phases of a project:
As the following figure illustrates, an activity diagram belongs to an activity in the model. When you create an activity diagram, the activity that owns the diagram is displayed in the Model Explorer view and an activity frame is displayed in the diagram editor. After you create the activity diagram, you cannot move it in the Model Explorer view.
The following topics describe model elements in activity diagrams:
Activities
In UML modeling, activities are container elements that describe the highest level of behavior in an activity diagram. Activities contain several activity nodes and activity edges that represent the sequence of tasks in a workflow that result in a behavior.Structured activities
In activity diagrams, structured activities are a type of node that you can use to create logical groups of activity nodes and edges.Actions
In UML modeling, an action represents a discrete unit of executable functionality in an activity.Call behaviors
In activity diagrams, call behaviors are a type of action that you can use to reference behaviors in other activity, state machine, or interaction diagrams in a model.Call operations
In activity diagrams, call operations are actions that you can use to invoke operations in a model. The referenced operation defines a type of behavior, such as a transformation or a query, that the target object can execute.Control nodes
In activity diagrams, a control node is an abstract activity node that coordinates the flow of control in an activity.Object nodes
In activity diagrams, an object node is an abstract activity node that helps to define the object flow in an activity. An object node indicates that an instance of a classifier might be available at a particular point in the activity.Activity edges
In activity diagrams, an activity edge is a relationship between two activity nodes that you can use to represent the control flow or object flow in an activity diagram.
Related tasks
Modeling user workflow by using activity diagrams
Specifying the flow of control and data in activity diagrams
Grouping the behaviors in activities