Lecture 24: UML Activity Diagrams
Unit 3: Requirement Analysis and Design (4353202)
Lecture Agenda
- Recap of Sequence Diagrams
- What is an Activity Diagram?
- Components of an Activity Diagram
- Example: Online Order Processing Activity Diagram
- Advantages of Activity Diagrams
- Key Takeaways
Recap of Sequence Diagrams
Sequence Diagrams show time-ordered interactions between objects, depicting the sequence of messages exchanged to achieve a specific functionality. They are excellent for understanding dynamic system behavior.
What is an Activity Diagram?
An Activity Diagram is a behavioral UML diagram that illustrates the flow of control or data in a system. It shows the sequence of activities performed to achieve a goal, highlighting the decisions, parallel processes, and paths within a workflow.
It is similar to a flowchart but specifically designed for object-oriented systems.
Components of an Activity Diagram
- Activity: Represents a single step or action in a process. (Rounded rectangle)
- Initial Node: Represents the starting point of the activity flow. (Solid circle)
- Final Node: Represents the end point of the activity flow. (Bullseye)
- Control Flow (Edge): Represents the transition from one activity to another. (Arrow)
- Decision Node: Represents a point where a decision is made, leading to different paths. (Diamond)
- Merge Node: Represents a point where different paths converge. (Diamond)
- Fork Node: Represents a point where a single flow splits into multiple parallel flows. (Thick horizontal or vertical bar)
- Join Node: Represents a point where multiple parallel flows converge into a single flow. (Thick horizontal or vertical bar)
Example: Online Order Processing Activity Diagram
graph TD
start((start)) --> A[Receive Order]
A --> B{Check Stock}
B -- In Stock --> C[Process Payment]
B -- Out of Stock --> D[Notify Customer Out of Stock]
C --> E[Ship Order]
D --> F[Cancel Order]
E --> G((end))
F --> G
Advantages of Activity Diagrams
- Workflow Visualization: Provides a clear visual representation of business workflows and processes.
- Parallel Activities: Effectively models concurrent and parallel activities using Fork and Join nodes.
- Decision Points: Clearly shows decision points and alternative paths within a process.
- Communication: Easy for both technical and business stakeholders to understand the flow of activities.
- Process Improvement: Helps in identifying bottlenecks and areas for process optimization.
Key Takeaways
- **Activity Diagrams** illustrate the **flow of control or data** within a system.
- They are similar to flowcharts but are specifically designed for **object-oriented systems**.
- They effectively model **sequential, conditional, and parallel activities**.
- Useful for **workflow visualization** and **process improvement**.
Next Unit
Unit 4: Software Project Management
First Lecture: Responsibility of a Software Project Manager
Q & A
Questions & Discussion

