Get new posts by email:
Powered by follow.it

10 Practical Examples of Activity Diagrams in Software Engineering

Activity Diagram in Software Engineering showing UML workflow symbols, start and end nodes, activities, decisions, conditions, and process flow.

In Unified Modeling Language (UML) and software engineering, an Activity Diagram is a behavioral diagram that visually maps the step-by-step flow of control, decisions, and parallel activities within a system or business process.

Often described as an advanced or standardized flowchart, an activity diagram helps Business Analysts, System Architects, and Software Engineers model complex business workflows, verify logic execution, and communicate system design to non-technical stakeholders.

Activity Diagram in Software Engineering showing UML workflow symbols, start and end nodes, activities, decisions, conditions, and process flow.
Activity Diagram in Software Engineering visually represents the flow of activities, decisions, and actions within a business or system process using UML notation.

Key Components & Symbols of a UML Activity Diagram

Before building activity diagrams, it is essential to understand standard UML notations:

UML SymbolNameDescription / Function
Solid Black CircleInitial Node (Start)Marks the starting point of the activity flow.
Rounded RectangleAction / Activity NodeRepresents a specific task, step, or operation performed.
DiamondDecision NodeEvaluates a condition with guard conditions (e.g., [Valid] or [Invalid]).
Horizontal / Vertical BarFork NodeSplits a single incoming flow into multiple parallel concurrent flows.
Horizontal / Vertical BarJoin NodeCombines multiple parallel concurrent flows back into a single flow.
Encircled Solid CircleFinal Node (End)Marks the termination of the entire workflow execution.
Columns / SwimlanesSwimlanesGroup activities by responsible actors (e.g., User, System, Payment Gateway).

10 Real-World Examples of Activity Diagrams

1. User Login Authentication Workflow

  • Overview: Models user identity validation and security credentials verification.

  • Flow Steps:

    1. User enters username and password $\rightarrow$ Click Submit.

    2. System validates credentials against database.

    3. Decision Node: If credentials match $\rightarrow$ Grant dashboard access; If invalid $\rightarrow$ Display error message and increment failed attempt counter.

User_Login_Authentication_Workflow
User_Login_Authentication_Workflow

2. E-Commerce Shopping Cart Checkout

  • Overview: Illustrates purchasing logic from cart review to payment confirmation.

  • Flow Steps:

    1. User clicks Proceed to Checkout.

    2. System calculates subtotal, taxes, and shipping fees.

    3. User enters shipping address and selects payment method.

    4. Payment Gateway processes transaction.

    5. System generates order receipt and sends email confirmation.

E_Commerce_Shopping_Cart_Checkout
E_Commerce_Shopping_Cart_Checkout

3. ATM Cash Withdrawal Process

  • Overview: Models transaction verification and hardware interactions at an automated teller machine.

  • Flow Steps:

    1. User inserts card $\rightarrow$ System reads card data.

    2. User inputs 4-digit PIN $\rightarrow$ System validates PIN with bank server.

    3. User requests withdrawal amount.

    4. Decision Node: Check account balance.

      • If Balance $\ge$ Amount: Dispense cash $\rightarrow$ Print receipt.

      • If Balance < Amount: Display insufficient funds alert $\rightarrow$ Eject card.

ATM_Cash_Withdrawal_Process
ATM_Cash_Withdrawal_Process

4. Password Reset Procedure

  • Overview: Illustrates self-service account recovery via secure email tokens.

  • Flow Steps:

    1. User submits registered email address.

    2. System generates temporary secure token $\rightarrow$ Sends reset link via email.

    3. User clicks link and submits new password.

    4. System evaluates password strength rules.

    5. Password updated in database $\rightarrow$ User notified of success.

Password_Reset_Procedure
Password_Reset_Procedure

5. Hotel Room Booking System

  • Overview: Manages reservation logic, room availability checks, and payment holds.

  • Flow Steps:

    1. Customer inputs check-in dates and guest count.

    2. System queries database for available room inventory.

    3. Customer selects room tier and enters credit card details.

    4. System reserves room slot and processes pre-authorization charge.

Hotel_Room_Booking_System
Hotel_Room_Booking_System

6. Online Food Delivery Order Fulfillment

  • Overview: Uses Swimlanes (Customer, Restaurant, Delivery Driver) to show cross-functional execution.

  • Flow Steps:

    1. Customer: Places food order on mobile app.

    2. Restaurant: Accepts order and begins food preparation.

    3. Fork Node (Parallel Execution):

      • Restaurant notifies kitchen staff.

      • App dispatches nearest delivery driver to restaurant location.

    4. Join Node: Driver picks up prepared food parcel $\rightarrow$ Delivers to customer location.

Online_Food_Delivery_Order_Fulfillment
Online_Food_Delivery_Order_Fulfillment

7. Document Approval Workflow in an Enterprise System

  • Overview: Illustrates multi-level managerial review routing.

  • Flow Steps:

    1. Employee submits document or expense claim.

    2. Direct Manager receives notification and reviews content.

    3. Decision Node: If approved and amount > $5,000 $\rightarrow$ Route to Finance VP; If approved and amount $\le$ $5,000 $\rightarrow$ Auto-approve for reimbursement.

Document_Approval_Workflow
Document_Approval_Workflow

8. Customer Support Ticket Lifecycle

  • Overview: Maps support ticket creation, escalation, and resolution tracking.

  • Flow Steps:

    1. Customer submits support request via portal.

    2. Automated triage engine assigns ticket priority level (Low, Medium, High).

    3. Agent investigates problem $\rightarrow$ Applies resolution fix.

    4. Customer confirms issue resolution $\rightarrow$ Ticket status updated to Closed.

Customer_Support_Ticket_Lifecycle
Customer_Support_Ticket_Lifecycle

9. Patient Registration in a Hospital Portal

  • Overview: Tracks healthcare intake, insurance verification, and record creation.

  • Flow Steps:

    1. Patient submits personal information and medical history.

    2. System performs real-time insurance policy verification API call.

    3. Medical record number (MRN) generated and linked to doctor appointment schedule.

Patient_Registration_Hospital_Portal
Patient_Registration_Hospital_Portal

10. Software Bug Reporting & Tracking Workflow

  • Overview: Maps how QA teams log defects and track engineering resolutions.

  • Flow Steps:

    1. QA Engineer logs defect details and steps to reproduce.

    2. Lead Developer assigns issue to backend engineer.

    3. Engineer fixes codebase $\rightarrow$ Commits code fix to test environment.

    4. QA re-tests feature $\rightarrow$ If passed, mark as Closed; If failed, Re-open.

Software_Bug_Reporting_Tracking_Workflow
Software_Bug_Reporting_Tracking_Workflow

Best Practices for Drawing Activity Diagrams

When creating activity diagrams in tools like Lucidchart, Draw.io, Enterprise Architect, or Visio:

  • Use Swimlanes for Clarity: Group activities by actor or system component to eliminate ambiguity about who performs which action.

  • Keep Guard Conditions Explicit: Ensure decision paths out of diamonds always feature unambiguous labels like [Valid] or [Invalid].

  • Balance Granularity: Avoid modeling micro-code execution steps; focus on business-level tasks and functional logic flows.

  • Ensure Single Initial Node: Maintain a single starting point to keep system execution paths straightforward for developers and stakeholders.

Important Articles

  1. What is uml Diagram ?
  2. What is Class Diagram
  3. BPMN Tools
  4. What is Use Case?
  5. What is Use Case Diagram with Example

Frequently Asked Questions (FAQ)

What is the main difference between a flowchart and an activity diagram?

While both depict processes visually, an activity diagram is an official UML standard that explicitly supports parallel/concurrent execution flows (using Fork and Join nodes) and cross-functional role mapping (using Swimlanes), which standard flowcharts lack.

When should a Business Analyst draw an activity diagram?

Business Analysts draw activity diagrams during the Requirements Analysis phase to model complex business workflows, refine use cases, and validate logic steps before developers write code specifications.

What is a guard condition in a UML activity diagram?

A guard condition is a boolean statement attached to an output branch of a decision node (e.g., [Age >= 18]). The workflow can only proceed down that path if the guard condition evaluates to true.

🎁 Become a Better Business Analyst

Join 1,200+ Business Analysts learning every week.

Get instant access to:

📘 FREE Business Analyst Templates
🎯 Interview Preparation Guides
🚀 Agile & Scrum Tutorials
🤖 AI for Business Analysts
📈 Career Growth Tips

Loading

100% Free • No Spam • Unsubscribe Anytime

Pallavi

Author: Pallavi

Experienced Business Analyst, SME (Subject Matter Expert), and Educator specializing in Agile and Scrum methodologies, requirement gathering, BRD/FRD documentation, User Stories, and Business Process Management.

Leave a Reply

Your email address will not be published. Required fields are marked *