A6Intermediate
State Machine Design
30 minWhen encountering new business processes
Format: Draw a state transition diagram for a given business process.
Scenario 1: E-Commerce Order States
What states might an order go through? Draw all possible state transitions.
Hint: It's not just "Unpaid → Paid → Shipped → Delivered"
Also consider: cancellation, refund, partial refund, timeout, exception...
Scenario 2: Content Moderation Flow
After a user submits content (post/comment), what states does the content go through?
Consider: auto-moderation, manual review, appeal, re-review...
Scenario 3: User Account Lifecycle
From registration to account deletion, what states does a user account have?
Consider: unverified, active, dormant, banned, under appeal, deleted...
Self-Assessment Criteria:
- Are the transition conditions between each state clear?
- Are there any "infinite loops" or "dead states" (states you can enter but never leave)?
- Does each state transition need to be recorded? (Audit trail)
- Are edge cases handled?
Self-Assessment Criteria
0/4What You Will Learn
Finite state machine thinking — most business logic is essentially state transitions.