Encyclopedia

Learn the history and popular uses for dozens of diagrams, charts, and visuals.

Activity Diagram

An Activity Diagram is part of Unified Modeling Language, or UML, and it describes a series of related activities. Each diagram contains four elements: Swim lanes, Action States, Action Flows, and Object Flows.

Activity Diagram
Typical Uses

The strengths of an Activity Diagram are showing object relationships, overall flow of control, and activities of classes. It is effective when there is a need to show a high level flow of control between objects.

Best Practices
  • Establish swim lanes. - Start with three columns (termed "Swim Lanes"), each representing a group of responsibilities that belong to the overall activity you are documenting. This will be the framework of the diagram.
  • Add a start point. - A small filled circle represents a start point, and should be placed in the top-left corner of the first column. Every Activity Diagram must have a start point.
  • Add activities. - An activity or activity state is represented by a rounded rectangle. Add one for each activity to be considered in the diagram, labeling each with a short description of its respective activity.
  • Decisions. - In an Activity Diagram, a small diamond shape represents a decision. When an activity requires a decision prior to moving on to the next activity, add a diamond between the two activities.
  • Need a guard? - In UML, guards are a statement written next to a decision diamond that must be true before moving next to the next activity. These are not essential, but are useful when a specific answer, such as "Yes, three labels are printed", is needed before moving forward.
  • Organize and align. - Once all of the activities have been added, organize them in order of occurrence, and align the activities in the swim lanes. Aligning the activities will make the Activity Diagram easier to read and modify later. Arrows between each activity indicate the flow of the diagram.
  • End the process. - A small filled circle that has a double border represents the end point. Connect the last activity to an end point using an arrow.

Share this page: