A workflow deployment should preserve pending requests and their original meaning. New code must not lose approvals, reinterpret old payloads, or replay completed effects because the previous process’s memory disappeared.
Pending work has its own lifecycle
Pending work includes queued operations, waiting approvals, retries, scheduled occurrences, and uncertain external effects. These can outlive the application version that created them.
For a proposed deployment plan, inventory durable states and contract versions before rollout. Define whether old workers drain, new workers adapt existing records, or certain tasks require controlled migration. Preserve logical operation identity across every strategy.
Do not assume a successful schema migration establishes safe business behaviour. A stored status may retain its type while its meaning changes. Compatibility fixtures should cover old state interpreted by the new release.
Rehearse a fictional approval deployment
Version one creates approval proposals with a specific customer field map. Version two renames a required field and changes execution validation. A request approved before deployment remains waiting in the database.
The new worker must use a tested adapter or a safe unsupported-state path. It should not guess the missing field or execute a different update. The reviewer’s decision remains bound to the original proposal meaning.
| Pending state | Deployment check |
|---|---|
| Waiting approval | Proposal and decision semantics preserved |
| Queued write | Operation identity and current intent retained |
| Retry scheduled | Attempt budget does not reset accidentally |
| Unknown remote effect | Reconciliation remains required |
| Completed step in partial workflow | No blind replay of prior effect |
Test deployment during each state using fictional records and controlled restarts. Assert both final business state and the absence of duplicated external effects.
Make rollback assumptions explicit
Returning to an older application can be unsafe after a data migration or new-state creation. Define supported rollback or containment options and verify compatibility. Do not promise that redeploying old code reverses changes already made to customer records.
Preserving compatibility adds engineering work and may require temporary adapters. Keep their removal conditions observable and avoid indefinite hidden support for obsolete semantics. A small durable state model is easier to migrate than unstructured execution history.
This deployment design is proposed. The voice integration case study describes relevant backend and cloud work. Pair it with contract versioning.
Pending-work deployment FAQ
Should the queue be cleared before every deployment?
Not as a generic solution. Preserve or deliberately dispose of business work under an explicit authorised plan.
Can new workers process old tasks automatically?
Only when their contracts and state semantics are compatible or intentionally adapted.
What proves deployment safety?
Controlled in-progress fixtures, verified authoritative outcomes, durable ownership, and tested containment for incompatible states.