📘 Activity Diagrams (OOAD – UML)
🔹 1. Definition
An Activity Diagram is a UML behavioral diagram that shows the flow of activities or actions in a system.
👉 Simple idea:
It represents step-by-step workflow of a process, like a flowchart but more powerful in OOAD.
🔹 2. Purpose of Activity Diagrams
- Show workflow of a system
- Model business processes
- Describe step-by-step execution
- Help in understanding system behavior
- Useful for analysis and design
🔹 3. Key Idea ⭐
- Focuses on activities (actions/tasks)
- Shows control flow and decision making
- Can represent both simple and complex processes
🔹 4. Basic Notation
| Symbol |
Meaning |
|
|
| ● |
Initial state (Start) |
|
|
| ◎ |
Final state (End) |
|
|
| ▭ |
Activity (Action) |
|
|
| → |
Flow (Transition) |
|
|
| ◇ |
Decision (if/else) |
|
|
|
|
|
Fork/Join (parallel processing) |
🔹 5. Components of Activity Diagram
🔸 5.1 Activity
- Represents a task or action
Example: Login, Process Payment
🔸 5.2 Transition (Flow)
- Shows movement from one activity to another
🔸 5.3 Decision Node
- Represents if-else condition
Example:
Login successful? → Yes / No
🔸 5.4 Initial Node
🔸 5.5 Final Node
🔸 5.6 Fork and Join
- Used for parallel activities
🔹 6. Example (ATM System) ⭐
🔹 Steps:
- Insert Card
- Enter PIN
- Verify PIN
- Choose Transaction
- Withdraw / Check Balance
- End Transaction
🔹 Activity Flow:
● → Insert Card → Enter PIN → Verify PIN
↓
[Decision]
Yes No
↓ ↓
Transaction Exit
↓
◎
🔹 7. Example (Online Shopping)
🔹 Flow:
- Login
- Search Product
- Add to Cart
- Checkout
- Payment
- Order Confirmed
🔹 8. Types of Activity Nodes
🔸 8.1 Simple Activity
🔸 8.2 Composite Activity
🔸 8.3 Concurrent Activity
- Multiple tasks happen simultaneously
🔹 9. Activity Diagram vs Flowchart
| Feature |
Activity Diagram |
Flowchart |
| Standard |
UML standard |
General tool |
| Focus |
Object-oriented system |
Simple process |
| Parallelism |
Supported |
Limited |
| Usage |
Software design |
General logic |
🔹 10. Advantages of Activity Diagrams
- Easy to understand workflows
- Models complex processes clearly
- Supports parallel processing
- Helps in system analysis
- Useful for business modeling
🔹 11. Important Rules / Guidelines
- Start with initial node (●)
- End with final node (◎)
- Use clear and simple activities
- Avoid too many complex branches
- Ensure logical flow
🔹 12. Where Activity Diagrams are Used
- ATM systems
- Online shopping
- Banking systems
- Login processes
- Order processing systems
🔹 13. Likely Exam Questions
- Define activity diagram.
- Explain components of activity diagram.
- Draw activity diagram of ATM system.
- Difference between activity diagram and flowchart.
- What is a decision node?
- Explain fork and join.
- Advantages of activity diagrams.
- Explain login process using activity diagram.
- What are initial and final nodes?
- Role of activity diagrams in OOAD.
🔹 14. Quick Revision Summary 🧠
👉 Trick to Remember:
"ADF" → Activity, Decision, Flow