How would you design a workflow automation platform?
Practice this questionShort explanation:
A workflow platform stores a definition of steps and executes separate runs of that definition over time. Because runs can wait, retry or survive a restart, their progress must be durable rather than only held in a process. A queue and worker layer lets execution capacity grow separately from the request API.
Key points:
-
Ask about step types, duration, branching and external actions.
-
API → workflow/run database → queue → workers; persist each step's state.
-
Use unique step IDs, safe retries, timeouts and an audit trail; mark failed runs clearly.
-
Model WorkflowDefinition, WorkflowRun and StepRun with status, attempt count and a stable operation ID.
-
Choose a policy for editing definitions while old runs exist, and monitor oldest pending work rather than only queue size.
Interview point:
- Walk through a worker crash immediately after an external action succeeds and explain how the next attempt avoids a duplicate effect.