---
title: "Essential components of an activity diagram"
subject: "Object Oriented Analysis and Design"
chapter: 2
key: "semester_6/object_oriented_analysis_and_design:activity-diagram-components"
source: https://www.bctengineer.com/q/semester_6/object_oriented_analysis_and_design/activity-diagram-components
site: BCT Engineering
---

# Essential components of an activity diagram

Object Oriented Analysis and Design · Chapter 2: Object Oriented Analysis

- Asked in: 2070 Magh, 7 marks
- Video: [Activity Diagram - Step by Step Guide with Example](https://www.youtube.com/watch?v=knM8BGY9yVI) — Master2Teach
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_6/object_oriented_analysis_and_design/activity-diagram-components
- Whole chapter: https://www.bctengineer.com/md/semester_6/object_oriented_analysis_and_design/chapter-2

## Question

Prepare the list of essential components to be identified in building an activity diagram. Illustrate with an example of your own choice.

## Short answer

Essential components of an activity diagram: initial node, actions (rounded rectangles), control flow arrows, decision/merge diamonds with guards, fork/join bars for parallelism, swimlanes for responsibility, object flows, and final node. For a library book issue, actions like scanning card, validating member, checking availability, issuing book, and parallel update/print use decisions and fork-join.

## Answer

An **activity diagram** models a workflow or the logic of an operation as a flow of activities. The essential components to identify are:

| Component | Notation | Meaning |
|---|---|---|
| Initial node | filled circle | Start of the flow |
| Activity/action | rounded rectangle | A step of work |
| Transition (control flow) | arrow | Order from one action to the next |
| Decision / merge | diamond with guards [ ] | Branch on a condition; bring alternative flows back together |
| Fork / join | thick bar | Start / synchronise parallel flows |
| Final node | filled circle inside a ring (bull's eye) | End of the activity |
| Swimlane (partition) | vertical lanes | Who is responsible |
| Object flow / object node | rectangle | Data passed between actions |
| Signal send/receive | pentagon shapes | Events sent or awaited |
| Note | folded rectangle | Comment |

**Steps to build one:** (1) identify the activities from the use case or process, (2) identify their order, (3) find decisions and their guards, (4) find the parallel work, (5) assign swimlanes if responsibility matters, (6) add the start and end.

#### Example: processing a library book issue

```text
            (start)
               |
        [ Scan member card ]
               |
          < member valid? >
        [no] /      \ [yes]
  [Reject request]  [ Scan book ]
        |                |
        |          < book available? >
        |        [no] /      \ [yes]
        |   [Offer reservation] [Issue book]
        |          |               |
        |          |         ======fork======
        |          |          |            |
        |          |   [Update record] [Print slip]
        |          |          |            |
        |          |         ======join======
        |          |               |
        +----------+------(merge)---+
                         |
                      (end)
```

This example shows the initial node, actions, two decisions with guards, a merge, a fork-join for parallel work, and the final node.

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. Which pair is correctly matched?
   A. Initial node - filled circle; final node - circle with a dot
   B. Initial node - diamond; final - bar
   C. Initial - bar; final - diamond
   D. Initial node - rectangle; final - triangle
   Answer: A. Start is a filled circle; end is a circle containing a dot. (Key point: Initial and final nodes)

2. A swimlane (partition) shows:
   A. Who is responsible for each action
   B. Object states
   C. Parallel flows
   D. Guards
   Answer: A. Lanes assign responsibility. (Key point: Swimlane)

3. Which is a correct step when building an activity diagram?
   A. Find decisions and their guards, and the parallel work
   B. Choose the database
   C. Draw class diagrams first
   D. Write code
   Answer: A. Identify activities, order, decisions, parallelism, swimlanes, start and end. (Key point: Steps to build)

4. In the library example, the fork-join is used for:
   A. Rejecting the request
   B. Updating the record and printing the slip in parallel
   C. Checking member validity
   D. Offering reservation
   Answer: B. After issuing the book, two actions run concurrently. (Key point: Fork-join in example)

## Related in Object Oriented Analysis and Design

- [Problem statement and UML building blocks](https://www.bctengineer.com/question.md?key=semester_6%2Fobject_oriented_analysis_and_design%3Aresult-management-problem-statement-uml-blocks) — Object Oriented Analysis and Design, chapter 2
- [ATM withdrawal sequence diagram](https://www.bctengineer.com/question.md?key=semester_6%2Fobject_oriented_analysis_and_design%3Aatm-withdrawal-sequence-diagram) — Object Oriented Analysis and Design, chapter 2
- [XYZ Marina class diagram](https://www.bctengineer.com/question.md?key=semester_6%2Fobject_oriented_analysis_and_design%3Amarina-class-diagram) — Object Oriented Analysis and Design, chapter 2
- [Bottle recycling machine state diagram](https://www.bctengineer.com/question.md?key=semester_6%2Fobject_oriented_analysis_and_design%3Abottle-recycling-state-diagram) — Object Oriented Analysis and Design, chapter 2
- [Money transfer sequence diagram questions](https://www.bctengineer.com/question.md?key=semester_6%2Fobject_oriented_analysis_and_design%3Amoney-transfer-sequence-diagram) — Object Oriented Analysis and Design, chapter 2
- [Event management system summary and class diagram](https://www.bctengineer.com/question.md?key=semester_6%2Fobject_oriented_analysis_and_design%3Aoems-executive-summary-class-diagram) — Object Oriented Analysis and Design, chapter 2

## Related in other subjects

- [Essential components of a static relay](https://www.bctengineer.com/question.md?key=semester_6%2Fswitchgear_and_protection%3Astatic-relay-essential-components) — Switchgear and Protection, chapter 8, asked 5×
- [Essential components of a DAQ system](https://www.bctengineer.com/question.md?key=semester_5%2Finstrumentation_ii%3Adaq-components) — Instrumentation II, chapter 5, asked 3×
- [Moisture movement through building components](https://www.bctengineer.com/question.md?key=semester_6%2Fbuilding_technology%3Amoisture-movement) — Building Technology, chapter 1, asked 7×
- [Combined plant components and T-s diagram](https://www.bctengineer.com/question.md?key=semester_7%2Fpower_plant_equipment%3Acombined-components-ts) — Power Plant Equipment, chapter 8, asked 4×
