hard
Design a Workflow Engine
Design a workflow execution engine. Include workflow definition with steps and conditions, sequential and parallel execution, state management, error handling with rollback, and workflow instance tracking.
Suggested time: 45 minutes
Loading the workspace...
About this problem
A workflow engine orchestrates multi-step processes where each step may succeed, fail, branch, or require rollback. The challenge is managing state transitions safely, especially when steps have side effects that must be compensated on failure.
What your design needs to cover
Define Workflows as Step Sequences
Execute Workflow Instances with State Tracking
Support Triggers to Start Workflows
Rollback on Step Failure
Key challenges the editorial covers
Learn from other designs
Related problems
Design an Email Client (hard)
Design a Calendar System (hard)
Design a Middleware Chain (hard)