Every business runs on workflows. Very few run on workflow engines. The gap between those two sentences is filled by email threads, spreadsheet status columns, calendar reminders, and one person who knows where everything stands — an engine made of habit, and it works right up until the volume, the team, or the auditor arrives.

You already have a workflow engine. The only question is whether it is software, or whether it is Deepa remembering things.

This article is the canonical reference the rest of our operations and industry writing links back to. It covers what a workflow engine actually is, the small model underneath every one of them, and the five hard parts — failure, distribution, humans, time, and change — that decide whether yours survives contact with production.

The Question That Exposes the Missing Engine

There is a one-question test for whether a system has a real engine underneath it: ask it "where is this item, and how long has it been there?" — and require the answer to come from a query, not from asking around.

Systems without an engine can usually say what an item's status label is. They cannot say who is meant to act next, what has already happened to it, why it is stuck, or which of its two hundred siblings have been stuck the same way for a week. Those answers live in inboxes and memories — which is to say, they do not live anywhere.

Everything that follows exists to make that one question trivially answerable, because every operational capability a business asks for — dashboards, SLAs, escalations, audit, automation with approval gates — is a derivative of being able to answer it.

Three Words Carry the Whole Model

Strip any workflow product to its skeleton and three concepts remain:

ConceptWhat it isThe discipline it imposes
StateWhere the item is right now — one value from a known, finite setStates are nouns you can point at: Received, Verifying, Awaiting approval. If you cannot list every state, you do not know your own process
TransitionA permitted move between two states, with conditionsTransitions are guarded verbs: approve is only legal from Awaiting approval, and only by someone with the role. Everything not permitted is impossible, not just discouraged
EventThe record that a transition happened — who, when, whyEvents are facts. They are never edited, only appended

The most common failure is not missing this model — it is encoding it as booleans. An item with is_submitted, is_verified, is_approved and is_active has sixteen possible combinations, of which perhaps six mean anything. The other ten are states nobody designed, and production will find every one of them. One state column from one enumerated set is not a style preference; it is what makes illegal situations unrepresentable.

One Work Item, Drawn Honestly

Here is a client-onboarding flow the way it actually behaves — not the version from the kickoff slide:

A client-onboarding state machine: received, verifying, awaiting approval, provisioning and active on the main path, with a needs-info loop, a rejection terminal, a retry loop for failed provisioning, a dead-letter needs-attention state, and a timer expiring silent requests
The happy path is one row. The system is everything below it.

Read the bottom half. The loop back for incomplete documents, the timer that expires a silent client, the retry track, the dead-letter state a human owns — none of that is an edge case. On real volume, the unhappy paths carry a third of the traffic, and a workflow design that has not drawn them has not been designed yet; it has been sketched. We drew the same lesson in the property-management work-order flow and the patient message lifecycle — the dashed arrows are what separate a workflow from a form.

Transitions Are the Record. State Is a Cache.

Now the single most important architectural decision, the one everything later hangs on: store the transitions, derive the state.

The naive build stores a status column and overwrites it on every change. It works, and it destroys information with every write — when someone asks why an item is where it is, the answer was overwritten three updates ago. The durable build appends one row per transition — item, from-state, to-state, actor, timestamp, reason — and treats the current state as a cached projection of that log.

What that one decision buys, with no further engineering:

  • The audit trail already exists. "Who approved this and when" is a query, not a feature request. For anything compliance-adjacent this is the difference between evidence and anecdote — the same append-only argument as the trust ledger, applied to work instead of money.
  • Cycle analytics come free. Time-in-state, bottleneck detection, SLA reporting — all derivable from timestamps you were storing anyway.
  • Disputes are settleable. When two people remember the handoff differently, the log remembers it once, correctly.
  • Corrections are honest. A mistake is fixed by a new compensating transition, not by editing history — so history stays trustworthy.

Retries Belong in the Model, Not in a try/catch

The first hard part is failure, and the instinct to handle it in code — wrap the call, catch, retry — is exactly wrong at the workflow level, because it makes failure invisible. The item claims to be Provisioning while a loop thrashes silently underneath it.

An engine treats failure as states: an attempt fails, the item moves to Retry scheduled with a backoff timer and an attempt counter; retries exhaust, and it moves to a dead-letter state that a human owns — visible on a queue, aging, escalating. Nothing thrashes invisibly, and "how many items are stuck" is, again, a query.

Two disciplines make retries safe rather than dangerous:

  • Idempotency before repetition. Every action a workflow can retry needs an idempotency key, because a timeout is not a failure — it is an unknown. The call that timed out may have succeeded, and repeating it without a key turns one refund into two. Never let a step be retryable until it is idempotent.
  • Retryable and terminal failures are different states. A network blip earns another attempt; "this account already exists" earns a human. Collapsing them into one error path either hammers a system that already answered, or gives up on one that would have worked.

When the Workflow Leaves Your Database: Sagas

The second hard part arrives the moment one workflow spans systems you do not control. Onboarding a client touches the CRM, the billing provider, and your own infrastructure — three systems, no shared transaction, and no possibility of rolling all of them back together.

A saga across four systems: CRM record and billing account are created, workspace provisioning fails after retries, and compensation runs in reverse — close the billing account, mark the CRM record abandoned — because committed steps in other systems cannot be rolled back
No rollback exists across systems. Compensation is a new forward action that admits what happened.

This pattern has a name — the saga — and one idea: every step that commits gets a compensating action defined before the workflow ships, and on failure the engine runs the compensations in reverse order. Not rollback: the billing account genuinely existed for ninety seconds, and pretending otherwise corrupts every system that noticed. Compensation acknowledges history instead of erasing it.

The test of a saga design is not the forward path. It is whether someone wrote down the answer to "and what do we do if step three fails after step two committed?" for every step — because the engine can only run compensations that exist.

People Are Steps With Deadlines

The third hard part is that most real workflows contain humans, and most workflow code treats the human step as a hole — the item leaves the system, an email goes out, and software's knowledge ends until somebody happens to click something.

An engine models the human exactly like any other step, with three properties machines do not need:

  • Assignment goes to pools, not people. Route approvals to a role — the same nurse-first pool logic as the patient-message triage — because individuals go on holiday and inboxes become graves. A named person claims the task; the pool guarantees someone can.
  • Every human step has an SLA and an escalation. Waiting on a person is a state with a timer, exactly like waiting on an API. Two days silent → remind; four → escalate to the pool's manager; the item never rots in one inbox unnoticed.
  • Decisions are transitions with actors. Approve and reject are recorded moves — who, when, and on what grounds — which is what makes approval gates auditable rather than ceremonial, and what the autonomy ladder depends on when the actor stops being human.

The Clock Is a Participant

Almost every rule above smuggled in a timer — the 14-day expiry, the retry backoff, the approval SLA. That is the fourth hard part: in workflow systems, time is a writer. Deadlines cause transitions, waiting is a real state, and "nothing has happened for N days" is an event exactly as meaningful as a button click.

Practically this means the engine needs a scheduler as a first-class component — durable timers that survive restarts, attached to items, cancelled when the item moves on. Cron scripts scanning tables at midnight are the spreadsheet-era version; they work until the day one scan fails silently and three hundred expiries fire a day late.

Versioning: the Month-Six Problem

The fifth hard part surfaces later, and nobody warns you: the process changes while items are inside it. Legal adds a compliance-review state; there are 240 onboardings in flight under the old definition. What happens to them?

StrategyHow it worksFits when
DrainIn-flight items finish on the old definition; new items start on the new oneShort-lived workflows; the default and the safest
MigrateMap every in-flight item to an equivalent state in the new definition, as an explicit, logged transitionLong-lived workflows where old rules are no longer acceptable (compliance changes)
Dual-runBoth definitions live simultaneously, tagged by versionGradual rollouts and A/B process changes; the most operational overhead

The engine-level requirement is one line: every item records which version of the workflow it runs under. Skip that, and the first process change turns your in-flight items into archaeology.

Status Column, Transition Table, or Engine?

None of the above requires buying anything. It requires choosing the right weight deliberately:

WeightWhat it looks likeRight whenWrong when
Status columnOne enum on the row, transitions enforced in application codeOne simple flow, no humans-in-the-loop, no audit requirementThe moment anyone asks "who changed this and when"
Transition table + queueAppend-only transition log, state as projection, background workers, durable timersThe 80% answer. Most business applications, including most of what we buildDozens of distinct long-running workflows with complex branching
Dedicated engineTemporal, Camunda and kin: definitions as artifacts, replay, versioning and timers handled for youWorkflow IS the product, or sagas span many services with long lifetimesAdopted early, it is infrastructure tax before you know your processes — most teams should earn their way here

The middle row deserves the emphasis. A transition table, a worker, and durable timers — perhaps two weeks of engineering inside an existing application — deliver auditability, retries, SLAs and dead-letter queues without a new platform to operate. Teams over-reach for row three and under-build row two.

The Five Signs You Built It Right

  • "Where is it?" is one query — state, owner, age, and full history for any item, no humans consulted.
  • Illegal states cannot be stored — the set is closed, transitions are guarded, and the boolean explosion never happened.
  • Failure is visible — stuck items sit on aging dead-letter queues that someone owns, not inside silent loops.
  • The audit trail is the data model — not a logging afterthought bolted on for the auditor's visit.
  • The process can change — because every item knows its version, and month six holds no surprises.

This is the machinery underneath everything we write about business automation — field service, e-signature routing, recruitment pipelines, spreadsheet replacement all sit on exactly this foundation, and their articles will point back here rather than re-explaining it. If you are somewhere between the status column and the engine and unsure which weight your operation needs, we are glad to look at your actual workflows with you.

Frequently Asked Questions

What is a workflow engine?

A workflow engine is software that tracks every work item through a known, finite set of states, permits only defined transitions between them, and records each transition as an event: who, when and why. It also has to handle failure, steps across other systems, human tasks, timers and process changes. Without one, that job falls to email threads, spreadsheet status columns, calendar reminders and one person's memory.

Do I need a dedicated workflow engine like Temporal or Camunda?

Usually not at first. For most business applications, an append-only transition table, background workers and durable timers, perhaps two weeks of engineering inside an existing application, deliver auditability, retries, SLAs and dead-letter queues without a new platform to operate. A dedicated engine fits when the workflow is the product, or when sagas span many services with long lifetimes; adopted early, it is infrastructure tax.

Why store workflow transitions instead of a status column?

A status column overwrites the current state on every change, destroying the history of how the item got there. A transition log appends one row per move (item, from-state, to-state, actor, timestamp and reason) and treats the current state as a cached projection. That one decision gives you an audit trail, time-in-state and SLA analytics, disputes that can be settled, and corrections made by compensating transitions.

What is a saga in workflow automation?

A saga handles a workflow that spans systems with no shared transaction, such as a CRM, a billing provider and your own infrastructure. Every step that commits gets a compensating action defined before the workflow ships, and on failure the engine runs the compensations in reverse order. It is not a rollback: compensation is a new forward action that acknowledges what happened instead of erasing it.

How do you change a workflow while items are still in progress?

Every item records which version of the workflow it runs under, and then you choose a strategy. Drain lets in-flight items finish on the old definition while new items start on the new one, the default and the safest. Migrate maps each in-flight item to an equivalent state in the new definition as a logged transition. Dual-run keeps both definitions live, tagged by version, with the most overhead.

Sources