Activity diagram: UML symbols, examples and how to draw one

The UML symbols, fork and join, swimlanes, a checkout example you can copy, and when a flowchart is enough.

A UML activity diagram is a diagram of a process: the actions in order, the decisions that branch it, parallel work and, in swimlanes, who does each step. It reads like a flowchart plus two things: bars that split the flow into parallel paths and join them again, and object nodes for things passed between steps. To draw one, mark the start and end, add the actions, then decisions, forks, joins and lanes.

Annotated UML activity diagram of a pull request review, with all ten parts numbered from the initial node to the activity final node. The parts are listed in the text version below.

Figure 1Parts of an activity diagram. A pull request review with all ten parts labelled. The decision sends the work down one path; the fork sends it down both at once.

What is a UML activity diagram?Copied!Link to this section

A UML activity diagram is the behavior diagram the Unified Modeling Language uses for workflows. Wikipedia defines activity diagrams as “graphical representations of workflows of stepwise activities and actions with support for choice, iteration, and concurrency” (Wikipedia). Choice is a decision, iteration is a loop, and concurrency means two or more things happening at the same time.

Teams use activity diagrams to walk through a use case step by step, to agree on a business workflow such as an approval, to describe the logic inside one operation, and to model a process before anyone automates it. The notation is defined by UML 2.5.1, the Object Management Group’s current version of the standard (December 2017). For the other 13 UML diagram types, see what are UML diagrams?

What are the symbols of an activity diagram?Copied!Link to this section

The symbols of an activity diagram are the initial node, control flow, action, object node, decision, guard, merge, fork, join and activity final node, the ten parts in Figure 1, plus the flow final node and swimlanes. Each has one meaning, set by the UML standard:

Symbol

Drawn as

Means

Initial node

A filled circle

Where the activity starts

Control flow

An arrow

The order the actions run in

Action

A rounded rectangle (a pill)

One step, named with a verb

Object node

A rectangle

A thing passed between actions, such as an order

Decision

A diamond, one flow in, several out

Exactly one outgoing path is taken

Guard

[condition] on an outgoing flow

When that path is taken; [else] catches the rest

Merge

A diamond, several flows in, one out

Alternative paths rejoin, with no waiting

Fork

A thick bar, one flow in, several out

Every outgoing path starts at once

Join

A thick bar, several flows in, one out

Waits until every incoming path arrives

Activity final

A filled circle inside a ring

The whole activity stops

Flow final

A circle with an X

One path stops, the others go on

Swimlane

A named row or column

Who or what does the actions inside it

The standard says “Actions are notated as round-cornered rectangles” (UML 2.5.1, section 16.2.4.1), and Wikipedia calls the same shape a stadium (“stadia represent actions”), so a pill works for both. Fork and join bars run across the flow: flat when it runs down the page, upright when it runs across, as in Figure 2. UML also has symbols for sending and receiving a signal and for waiting a set time, which most work diagrams can do without.

In an activity diagram the conditions go on the guards, so each path says exactly when it’s taken. A question inside the diamond is optional, like the “In stock?” in the activity diagram template.

What do fork and join mean in an activity diagram?Copied!Link to this section

A fork is a thick bar that splits one flow into paths that run at the same time, and a join is a bar that waits until every one of those paths has finished before the flow goes on. The UML standard says a fork “splits a flow into multiple concurrent flows” and a join “synchronizes multiple flows” (UML 2.5.1, section 15.3.3).

Draw parallel work when the order of the steps doesn’t matter, because at work it changes three things:

  • Time. In the checkout example below, the payment service and the warehouse each take their own time. Run in parallel, the customer waits for the slower of the two, not for both added together.
  • Failure. When one side succeeds and the other fails, someone has to undo the half that worked: release the stock, or cancel the card authorization. So before you draw a fork, ask what happens when one side fails: the answer is usually a decision after the join and a step that does the undoing, like Cancel order in the checkout example below.
  • Ownership. Two teams can build their side without waiting for each other, as long as both agree on what the join waits for.

A merge can’t stand in for a join. A merge passes on every flow that reaches it (“There is no synchronization of flows or joining of tokens”, says UML 2.5.1, section 15.3.3.5), so after a fork the next step would run once per path.

What is the difference between a fork and a decision?Copied!Link to this section

A decision takes exactly one of its outgoing paths, the one whose guard is true. A fork takes all of them at once. Both have one flow in and several out, so the shape tells them apart: a diamond for either-or, a thick bar for both at once. The same goes for a merge (a diamond) and a join (a bar) on the way back.

What is a swimlane in an activity diagram?Copied!Link to this section

A swimlane is a named row or column of an activity diagram that holds the actions one person, team or system does. UML calls it an activity partition, and the standard says this notation “is colloquially known as a swimlane” (UML 2.5.1, section 15.6.4). Every arrow that crosses into another lane is a handoff.

Swimlanes say who does the work and change nothing else: “ActivityPartitions do not affect the token flow of the model”. In product and engineering work the lanes are often systems rather than people, such as the store app, the payment service and the warehouse. Figure 1 has no lanes so every part has room for its label; the checkout below has four.

A swimlane diagram without forks or object nodes is a flowchart with lanes. The guide to mapping a process covers those, and the swimlane diagram template starts you with the lanes drawn.

Activity diagram example: checkout with swimlanesCopied!Link to this section

This activity diagram example is an online store’s checkout across four swimlanes: the customer, the store app, the payment service and the warehouse. The store app creates the order, then card authorization and stock reservation run in parallel. If both succeed, the order is confirmed; if either fails, it’s cancelled.

UML activity diagram of an online checkout in four swimlanes, customer, store app, payment service and warehouse, with card authorization and stock reservation running in parallel between a fork and a join. The steps are listed in the text version below.

Figure 2Activity diagram example: checkout with swimlanes. Authorize card and Reserve stock run between a fork and a join, so the customer waits for the slower call instead of both in a row. The decision comes after the join, so it always sees both results.

Two details make this an activity diagram rather than a flowchart: the fork says the store app doesn’t wait for the payment before reserving stock, and the Order object node says what both services receive. On the [else] path, Cancel order is where the store app undoes whatever worked: the stock reservation when the card was declined, the card authorization when the stock ran out.

What is the difference between a flowchart and an activity diagram?Copied!Link to this section

A flowchart shows the steps and decisions of a process in order. An activity diagram is UML’s stricter version: it adds fork and join bars for work that runs at the same time and object nodes for the things passed between steps, and a standard defines its notation. Both can use swimlanes. Wikipedia puts the gap in one line: “Typical flowchart techniques lack constructs for expressing concurrency” (Wikipedia).

The two notations differ in six places:

Flowchart

Activity diagram

Steps

Rectangles

Rounded rectangles (actions)

Start and end

Ovals

A filled circle, and a filled circle inside a ring

Decisions

A question in the diamond, Yes and No on the connectors

Conditions in [guards]; a question in the diamond is optional

Parallel work

Drawn in some order, or explained in a note

Fork and join bars

Things passed between steps

A parallelogram for input or output

Object nodes on the flow

Notation

Common conventions

Defined by the UML standard

For the flowchart side, see flowchart symbols and their meanings.

When is a flowchart enough?Copied!Link to this section

A flowchart is enough when the steps happen one after another: one person’s procedure, a support script, a sign-up form. Add lanes when the handoffs matter. Reach for an activity diagram only when the process has work that runs in parallel, or when what passes between steps matters. A reader who doesn’t know UML will read a fork bar as a thick line.

Decision diagram that matches what a diagram needs to show to an activity diagram, a swimlane diagram, a flowchart, a sequence diagram or a state machine diagram. The answers are listed in the text version below.

Figure 3Flowchart or activity diagram: which do you need? Go down the list and take the first answer that fits. Only the first answer, parallel work or things passed between steps, needs the activity diagram's notation.

When the question is which service calls which, and in what order, the sequence diagram guide has the notation and an example.

How do you make an activity diagram?Copied!Link to this section

To make an activity diagram, decide where the process starts and ends, list the actions in order, add the decisions with their guards, the forks and joins for parallel work, the object nodes and the swimlanes, then walk one real case through it.

Find the start, the end and the stepsCopied!Link to this section

  1. Name what starts the activity and what ends it, and draw the initial node and the activity final node.
  2. List the actions in order, each named with a verb and at the same level of detail.
  3. Connect them with control flows.

Add decisions and parallel workCopied!Link to this section

  1. Add a decision wherever the path splits, with a guard on every outgoing flow. Use [else] for the leftover case, so nothing falls through.
  2. For each pair of steps in a row, ask whether the second needs the first. If it doesn’t, put them between a fork and a join.
  3. Close every decision with a merge and every fork with a join before the flow goes on.
  4. Add an object node where what passes between steps matters, such as an order or an invoice.

Add swimlanes and check itCopied!Link to this section

  1. Add a lane for each person, team or system that does a step, and move each action into its owner’s lane.
  2. Walk one real case through it, such as one order with a declined card. It should never get stuck at a join or take two paths out of a decision.
  3. Review it with the owner of each lane: every arrow that crosses into their lane is a handoff they have to agree on.

In Whimsical, press S for diagram shapes: a pill for each action, a diamond for decisions and merges, and a rectangle dragged thin and filled for the fork and join bars. Draw the activity final node as a small filled circle on a larger transparent one, grouped, and double-click a connector to write its guard. The activity diagram template already has three lanes and a legend of the main symbols.

What does a good activity diagram label look like?Copied!Link to this section

A good activity diagram label names an action with a verb and what it acts on, names an object node with a noun, and puts the condition of a guard in square brackets. Who does the step belongs to the lane, not the label. Here are four labels the way they often get drawn, and the way Figure 2 draws them:

Payment

Action: Authorize card

Warehouse checks the items and holds them

Action: Reserve stock

Yes and No

Guards: [authorized and reserved] and [else]

Send order details

Object node: Order

Can AI draw an activity diagram?Copied!Link to this section

Yes. An AI assistant can turn a written process, a ticket or a runbook into a first activity diagram in seconds, and it’s good at naming the actions. We’d check every fork before sharing it: a model can’t know which of your services really run in parallel unless the description says so, and a wrong fork looks as confident as a right one.

With the Whimsical MCP, AI tools such as Claude, ChatGPT and Cursor can draw the activity diagram straight onto a board, where you move steps and fix labels by hand (all integrations). This prompt asks for the same notation as Figure 2:

Draw a UML activity diagram of the process below on a new Whimsical board. Start with a filled circle and end with a filled circle inside a ring. Draw each action as a rounded box named with a verb, such as "Authorize card", and each thing passed between actions as a rectangle named with a noun, such as "Order". Put the condition for every path out of a decision in square brackets, and use [else] for the rest. Put steps that run at the same time between a fork bar and a join bar, and close every decision with a merge diamond. Add one swimlane per person, team or system, and put each action in its owner's lane. If you can't tell whether two steps can run at the same time, draw them in order and list it as an open question. Process: [paste a description, a ticket or a runbook]

Frequently asked questionsCopied!Link to this section

How do you read an activity diagram?

Read an activity diagram from the filled circle and follow the arrows. At a diamond, take the one path whose guard is true. At a bar with several paths out, follow them all at once, and wait for every one at the bar where they meet. The lane says who does each step.

How do you show a loop in an activity diagram?

Draw a loop as a decision whose guard sends the flow back to an earlier point, into a merge diamond just before the step that repeats. In the pull request review, a [changes requested] guard after the review would lead back to a merge above it, and an [approved] guard would carry on to the deploy.

What is the difference between a flow final node and an activity final node?

An activity final node, a filled circle inside a ring, stops the whole activity, including any parallel paths still running. A flow final node, a circle with an X, ends only the path that reaches it, and the others go on: the UML standard says it “has no effect on other flows in the Activity” (UML 2.5.1).

What is the difference between an activity diagram and a state diagram?

An activity diagram follows the flow of work through a process. A state machine diagram, or state diagram, follows one thing through its lifecycle: its states and the events that move it between them. For the checkout, a state diagram would show an order going from placed to paid to shipped, or cancelled.

What are the four types of diagrams in UML?

UML defines 14 diagram types, not four: seven structure diagrams and seven behavior diagrams (Wikipedia). Four of the behavior diagrams form a subset called interaction diagrams: sequence, communication, interaction overview and timing. The activity diagram is a behavior diagram but not an interaction diagram. What are UML diagrams? covers all 14.

Start from the activity diagram template

An order fulfillment flow in three swimlanes, with a stock decision, a fork for packing and payment, and a legend of the main symbols.

Open the activity diagram template

Related articles