Preparing your design workspace

Loading the problem and your saved attempt…

Design a Workflow Orchestrator Domain

Model versioned workflow definitions, dependency-aware runs, task attempts, retries, cancellation, and resumable state.

For this exercise, assume that an operator starts a versioned workflow, runnable tasks are leased to workers, failures retry by policy, and the run reaches one durable terminal state.

The design must support register an immutable workflow definition; start an idempotent workflow run; lease and complete ready tasks; retry, cancel, or inspect a run. Preserve this invariant: a task runs only after dependencies succeed, a lease generation accepts one completion, and terminal run state is monotonic.

Treat cyclic definition, duplicate start, expired lease, stale completion, retry exhaustion, and cancellation race as explicit outcomes. Keep unrelated product features, infrastructure, and persistence implementation outside the first version unless a checkpoint asks for them.