Design a Multi-Tenant Configurable Approval Workflow Engine
Last updated: November 29, 2026
Quick Overview
Design the engine that runs purchase request workflows for thousands of customer companies, each with its own admin-configured steps: conditional branches, parallel approvals (legal and security at once), SLA reminders, delegation when an approver is out, and edits to a workflow while requests are in flight.
ZipHQ
November 29, 20260
0
0 solved
Design the engine that runs purchase request workflows for thousands of customer companies, each with its own admin-configured steps: conditional branches, parallel approvals (legal and security at once), SLA reminders, delegation when an approver is out, and edits to a workflow while requests are in flight.
This is the heart of Zip's intake-to-procure product, so a system design round in this style expects you to reason about durable state machines, per-tenant configuration and auditability. Interviewers look for correctness under concurrency and change, not just boxes on a whiteboard.
What the Interviewer Expects
- Separate the workflow definition (versioned config) from workflow instances (runtime state)
- Model execution as a durable state machine with explicit step states
- Handle parallel branches and joins correctly, including rejection in one branch
- Make step transitions idempotent and event driven, with an append-only audit log
- Pin in-flight requests to the definition version they started on, with a migration story
- Address tenant isolation and noisy neighbors
Key Topics to Cover
How to Approach This
- Start by clarifying functional and non-functional requirements with the interviewer.
- Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
- Draw a high-level architecture first, then deep dive into 1-2 critical components.
- Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
- Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
- An admin deletes a step while 300 requests sit at that step. What happens?
- How do you guarantee an approval clicked in Slack and in email at the same time is applied once?
- How would you let customers write custom code steps safely?
- How would you simulate a draft workflow against last month's requests before publishing?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice System Design ProblemsSample Answer
Requirements
Functional: admins define workflows as a graph of steps (approval, form, integration call, wait) with conditions; requesters submit; approvers act from web, email or Slack; reminders and escalations f...
High-Level Design
A Definition service stores workflows as immutable versions (DAG of steps plus condition expressions compiled at publish). A Runtime service owns workflow_instance and step_instance rows i...