Activity Diagram: Pizza Factory System
Main Flow: Place and Fulfill Pizza Order
Start
↓
Customer browses menu
↓
Customer customizes pizza and places order
↓
Check inventory availability
→ [If not available] → Show error and cancel order
→ [If available] → Proceed
↓
Calculate total amount
↓
Make payment via Payment Gateway
→ [If payment fails] → Show error and cancel order
→ [If payment succeeds] → Proceed
↓
Send order to Kitchen Staff
↓
Kitchen prepares pizza
↓
Update order status to “Ready”
↓
Assign Delivery Executive
↓
Delivery Executive picks up order
↓
Order delivered to customer
↓
Update status to “Delivered”
↓
End
How to Explain to Students:
Activity Diagram Basics:
- Start from an initial node (black circle).
- Show activities as rectangles (action states).
- Use diamonds for decision branches (e.g., inventory check, payment result).
- Use arrows to represent transitions.
- End with a solid black circle inside a hollow circle (final node).
Explain Control Flow:
- Emphasize how the flow moves through the system sequentially.
- Decisions (conditions) direct the flow to success or failure paths.
Real-World Mapping:
- Relate each step to what happens in an actual pizza ordering app.
- Use examples like “out of cheese” for failed inventory check.