An activity diagram is a special case of a statechart diagram in which all of the states are action states and the flow of control is triggered by the completion of actions in the source state.
Related to a specific class or use case, an activity diagram describes the internal behavior of a method. Use an activity diagram to represent a flow driven by internally generated actions. Use a statechart diagram to represent a flow in response to external events.
Activity diagrams encourage you to notice and document parallel and concurrent activities. This makes them excellent tools for modeling workflow, analyzing use cases, and dealing with multi-threaded applications.
The initial state is the state of an object before any events in the diagram have acted upon it.
An action state is a type of state that represents a completed activity.
A transition from an action state occurs when the action state's internal action is complete.
To indicate concurrent activities that must be completed before the next activity can occur, use a join transition.
Double-click transitions from action states to label them with guard conditions and action expressions.
To indicate activities that can occur in parallel, use a fork transition.
The final state represents the completion of activity in the situation the diagram represents.