Activity Diagram Tutorial

UML is very handy but the terminology can be somewhat dense for a beginner. Don't feel intimidated when you hear the term "activity diagram"—it simply refers to a standardized system of notation for a flowchart. An activity diagram is nothing more than a flowchart. The UML shape library in Lucidchart can help you design activity diagrams using our UML diagram tool.

Using UML diagrams is easy when you have dozens of convenient shapes and templates on hand. Check them out in Lucidchart!

Demo here
Sign up free

What is an Activity Diagram

The Unified Modeling Language has several subsets of diagrams that it can model, including structure diagrams, interaction diagrams, and behavior diagrams. Activity diagrams are a subset of the latter. Along with use case and state machine diagrams, they're used to describe business activities and software systems' functionality. You'll use a set of specialized symbols—including those for starting, ending, merging, or receiving steps in the flow—to build an activity diagram.

Stakeholders have many issues to manage, so it's important to communicate with clarity and brevity. Activity diagrams help people on the business and development sides of an organization come together.

What is an activity diagram in UML?

Use Cases for Activity Diagram

Activity diagrams have a number of benefits for any organization. Try using an activity diagram to:

  • Demonstrate the logic of an algorithm.
  • Describe the steps performed in a UML use case.
  • Illustrate a business process or workflow between users and the system.
  • Simplify and improve any process by clarifying complicated use cases.
  • Model software architecture elements, such as method, function, and operation.

Activity Diagram Components

To answer the question of "What is an activity diagram in UML?", you should first understand its makeup. Some of the most common components of an activity diagram include:

  • Actions - a step in the activity wherein the users or software perform a given task. In Lucidchart, this is symbolized with a round-edged rectangle.
  • Decision node - a conditional branch in the flow that is represented with a diamond. It includes a single input and two or more outputs.
  • Control flows - this is another name for the connectors that show the flow between steps in the diagram.
  • Start node - symbolizes the beginning of the activity. This is represented with a black circle.
  • End node - represents the final step in the activity. It's modeled with an outlined black circle.

Activity Diagram Examples

We start by laying out examples visually. When you look at the diagram, see if you can figure out what each part means. The whole point of having a standardized approach is to make things simple, straight-forward, and intuitive. This page will cover several examples, go over the notations, and explain what each part of the diagram does.

Activity Diagram Airline Reservation System

The first example shows the process of a reserving a flight. First, you enter the dates. Once you submit your desired flight plan, you can enter your personal information and at the same time the system could be searching availability. The system flow then joins back into one and you can select the specific flight on the dates you want to fly. This activity diagram gives you two different paths dependent on whether you are using reward points. After entering payment information, the system performs two processes at the same time and then sends out a confirmation email.

airline reservation activity diagram

Activity Diagram for Course Registration System

The second activity diagram shows a typical event or class registration process for a client. This diagram uses notes to give more details about the initial and final states. After filling out the registration form, the client submits the form to a validation loop that is represented as a decision in the flow. If the information is correct, the system creates an account for the client and lets the client know about the creation of the account.

course registration example

Activity Diagram for Login

This last example diagram shows a simple login process. When you enter a name and password, the system checks to see if the unique pairing is correct. If it is, the system allows you to login. If not, you're prompted to re-enter your information.

login activity diagram example

Activity Diagram Symbols and Notation

Now that you've seen some examples, let's break down an activity diagram into its individual elements.

  • initial state A black circle is the standard notation for an initial state before an activity takes place. It can either stand alone or you can use a note to further elucidate the starting point.
  • end state The black circle that looks like a selected radio button is the UML symbol for the end state of an activity. As shown in two examples above, notes can also be used to explain an end state.
  • activity The activity symbols are the basic building blocks of an activity diagram and usually have a short description of the activity they represent.
  • arrow Arrows represent the direction flow of the flow chart. The arrow points in the direction of progressing activities.
  • join A join combines two concurrent activities back into a flow where only one activity is happening at a time.
  • fork A fork splits one activity flow into two concurrent activities.
  • condition Condition text is placed next to a decision marker to let you know under what condition an activity flow should split off in that direction.
  • decision A marker shaped like a diamond is the standard symbol for a decision. There are always at least two paths coming out of a decision and the condition text lets you know which options are mutually exclusive.
  • final flow The final flow marker shows the ending point for a process in a flow. The difference between a final flow node and the end state node is that the latter represents the end of all flows in an activity.
  • note The shape used for notes.

Activity Diagram Examples

Lucidchart is a top choice for UML diagramming. Collaborate and create when you start an account for free today!

Sign up