Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

To make a background workflow recoverable, persist its identity, inputs, execution history and completed-step results—not just its final output. On restart, the workflow must be able to distinguish work it can safely reuse from work it must retry. Because a crash can happen after an external action succeeds but before that success is recorded, retries should be treated as potentially repeatable side effects unless the operation is protected by idempotency or a deliberate recovery path.

What must a workflow remember to resume?

A recoverable workflow needs a durable record of enough state to rebuild its next decision after the process that ran it has stopped. Depending on the runtime, that record may be execution history, checkpoints, or application-managed state.

  • A stable workflow identity: Give each logical run an identifier that callers and operators can use to find it again.
  • Resume-ready input: Persist the input or a durable reference to it. Avoid relying on transient process memory or a caller that may not retry with identical data.
  • Completed-step outcomes: Record results needed to skip or reuse work that has already completed.
  • A way to identify remaining work: The runtime or application needs sufficient history to decide which step comes next and which outcomes can be reused.
  • Operationally useful history: Preserve enough information to diagnose failures and correlate executions with logs, while accounting for retention, privacy, payload size and storage cost.

Persisting only the final result leaves a gap: if the process fails partway through, the system may have no reliable way to tell what already happened.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Why replay needs deterministic orchestration

Some runtimes recover by running orchestration code again and consulting recorded history. Azure Durable Functions documents this replay model: checkpoints save execution history and enqueue work; the orchestrator can then be unloaded. When new work arrives, it replays from the beginning and uses history to reuse results from activities that already completed.

For replay to follow the same path, orchestration decisions must be deterministic. If replay reads the current time, generates a new random value, or consults mutable external state directly, it may make a different decision from the original run. Keep I/O and other side effects in activities, and use the framework’s durable operations for interactions that must be recorded and replayed consistently.

In practice, orchestrator code should decide what work to schedule from stable inputs and recorded outcomes. Activity code performs the work that interacts with databases, APIs, queues or other external systems. The exact separation depends on the framework, so follow its rules for which operations are safe during replay.

How duplicate side effects happen

Consider a workflow that charges an account, then records that the charge step completed. The charge may succeed while the worker crashes before recording the result. On recovery, the system sees no completed result and may run the charge again. The same failure window exists whenever an external effect and the workflow’s durable record are not committed as one atomic operation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A retry policy can therefore repeat an action even when the action itself succeeded on an earlier attempt. AWS Durable Execution SDK documentation warns that replay and retry can each run the same operation more than once. Treat a step as potentially repeatable unless the particular operation and runtime establish a stronger guarantee for the effect you care about.

Prefer idempotent operations

Where possible, make repeating the same logical action produce the same final state rather than a second effect. Use a stable business-operation identity and pass it as an idempotency key to a receiving API that supports one. An upsert keyed by a stable identifier can also be safer to repeat than an operation that always creates a new record.

The key must identify the logical action, not just an individual attempt. Generating a new key for every retry defeats deduplication. Keep the key and the workflow identity available throughout recovery, and understand how long the receiving system remembers keys and what it does when a key is reused with different input.

Choose an explicit path for non-repeatable work

If an action cannot safely be repeated and the receiving system offers no deduplication mechanism, decide how recovery should work before deploying the workflow. Options include disabling automatic retries for that step, reconciling the external system’s state before retrying, or routing an ambiguous result to a controlled manual repair process. A terminal failure may also require a compensating action, if the business operation can be safely reversed.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Do not assume that disabling retries alone resolves an uncertain outcome: the system may still need to determine whether the external action happened before the interruption. Define who or what investigates that state and how the workflow proceeds afterward.

How to design a recoverable workflow

  1. Define the logical operation. Choose a stable workflow ID and, for each repeatable external action, a stable business-operation or idempotency key.
  2. Make input durable. Save the data needed to resume, or a durable reference that can retrieve it. Ensure the workflow can still access it after the original request process ends.
  3. Mark the replay boundary. Separate deterministic orchestration decisions from activities that perform I/O or other side effects. Use framework-supported durable time, timers, random values or external interactions where available, rather than making unrecorded choices during replay.
  4. Specify retry behavior per step. Identify transient failures, set retry limits and backoff according to the operation, and decide how permanent failures or exhausted retries are surfaced. Do not apply the same retry policy indiscriminately to every action.
  5. Define the ambiguous-outcome path. For each side effect, ask what happens if the effect succeeds but the workflow fails before recording success. Use idempotency, reconciliation, compensation or controlled repair as appropriate.
  6. Make executions operable. Decide how an operator can locate a workflow, inspect its events, correlate logs, and resume or terminate it. If the selected mode does not retain native execution history, provide explicit logging and correlation.
  7. Test interruption boundaries. Simulate failures before an action, after the external system accepts it, and before the workflow records its result. Verify that recovery neither loses required work nor creates harmful duplicates.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

What platform guarantees and history actually mean

Workflow-level execution guarantees, step retries and exactly-once effects in another system are different claims. A platform may make a guarantee about how it executes a workflow while an external action still has an uncertain outcome at the boundary between that system and the workflow’s history. Check what each guarantee covers, how history is retained, and what operators can inspect before relying on it.

Rank #4
Sale
PowerShell for Sysadmins: Workflow Automation Made Easy
  • Book - powershell for sysadmins: workflow automation made easy
  • Language: english
  • Binding: paperback
Platform or mode Documented execution behavior History and recovery detail
AWS Step Functions Standard Exactly-once workflow execution State is persisted between transitions. Standard execution history data is removed after 90 days, according to the AWS guide.
AWS Step Functions Asynchronous Express At-least-once execution Step Functions itself does not capture Express execution history.
AWS Step Functions Synchronous Express At-most-once execution Step Functions itself does not capture Express execution history.
Azure Durable Functions The cited documentation describes event-sourced orchestration history and deterministic replay; it does not state an exactly-once guarantee for external side effects. Check the selected storage provider and history behavior as part of the design.

The 90-day Standard history period and the mode-specific guarantees are service details, not universal workflow properties. Confirm current AWS documentation and retention behavior for the configuration you plan to use. For either Express mode, plan how you will diagnose and correlate executions if the service does not retain native history.

Azure storage is part of the recovery design

Azure Durable Functions’ Azure Storage provider coordinates tables and queues using eventual-consistency patterns because those services do not provide transactional consistency together. That behavior matters when evaluating recovery and operations; it is not the same storage model as a single transactionally consistent state store. Microsoft identifies Durable Task Scheduler as an alternative managed backend.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Microsoft Learn states that support for the Durable Functions in-process model ends on November 10, 2026, and recommends the isolated worker model. Treat that lifecycle date as relevant when choosing a new implementation or planning a migration.

Questions to settle before choosing a workflow mode

  • What does the guarantee cover? Distinguish execution of the workflow or step from effects in external services.
  • Can the runtime replay completed work? Find out whether history is persisted, inspectable and retained long enough for the recovery and support needs.
  • What can repeat? Identify actions that may run again after a timeout, retry or crash, and whether the receiver supports idempotency keys.
  • How are retries controlled? Check whether they can be configured per step, limited, disabled or handled differently for terminal failures.
  • What does the state backend guarantee? Consider consistency behavior, hosting model and operational implications.
  • Can operators recover an execution? Establish how to find its events, correlate logs, inspect an ambiguous result, and resume or terminate it.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.