Activity Diagram Tutorial

What is an Activity Diagram

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.

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

Try it now
Sign up free

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

Start your Lucidchart trial here. No downloads or plugins required.