π 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
Wikipedia
πΈ 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