AMSS Lecture 7: UML Activity Diagrams

Traian Florin Șerbănuță

2025

Agenda

Fundamentals of Activity Diagrams

What Are Activity Diagrams?

Definition

Activity diagrams describe the flow of control and data between actions in a process.

Use Cases

Comparison

Diagram Focus
State Diagram Object lifecycle
Sequence Diagram Message order
Activity Diagram Workflow logic

Core Elements

Example: Order Processing

Decomposing an Action as a subactivity

An action can be implemented as:

Partitions (swim lanes) – who does what?

Which actions one class or organization unit carries out
Which actions one class or organization unit carries out

Interactive Exercise 1: Course Registration Process

Scenario

A student registers for a course.

Steps

  1. Log in
  2. Check prerequisites
  3. If eligible → register for course
  4. Update records & send confirmation (in parallel)

Session 2: Advanced Constructs and Applications

Swimlanes

Purpose: Show which actor or subsystem performs each action.

Notation: Vertical or horizontal lanes representing responsibilities.

Example: Online Purchase Process

Parallel Flows and Synchronization

Fork/Join Example:

Discussion: What happens if one parallel branch fails or is delayed?

Tokens in Activity Diagrams

Purpose of tokens

Types of tokens

Token behavior

Signals

Emiting signals and flowing into signals

One can also send signals

Notes

Data Flow and Object Nodes

Pins: argument passing and transformation

Expansion regions: multiple action invocations

Mapping actions to a collection
Mapping actions to a collection
Shorthand for single action map
Shorthand for single action map

Flow final: stop a flow without ending entire activity

Filter and Map actions to a collection
Filter and Map actions to a collection

Join specifications: conditions attached to a join node

Comparison to Petri Nets

Conceptual similarity

Key differences

Execution correspondence

Why the comparison matters

Interactive Exercise 2: Airport Check-in Process

Create an activity diagram with two swimlanes and one parallel branch.

Actors: Passenger, System

Requirements

Wrap-Up

Concept Description Example
Action Step in process “Process payment”
Decision Conditional branch “Is stock available?”
Fork/Join Parallel execution “Ship + Notify”
Swimlane Role-based grouping “Customer vs. System”

Key Takeaways