What can workflow replay explain after a failure?
Workflow replay can reconstruct decisions from recorded inputs and events when the relevant code and behavior remain compatible. It cannot recover evidence that was never stored or safely repeat uncontrolled external effects. Define the replay boundary, preserve versions and compare reconstructed state with known records before using it to explain a failure.
Keep these in mind
- Workflow history and full business reality are different.
- Compatible code and recorded external outcomes matter.
- Replay must not silently repeat live side effects.
Define the history being replayed
A workflow engine may record task starts, outcomes and timers. An application event log may record accepted business changes. Those histories serve different purposes.
The Temporal event-history documentation explains recorded workflow events and durable execution. It does not imply every external business fact is captured.
State what the history includes before promising time travel. Missing source messages and manual actions remain missing unless another record preserves them.
Keep event replay separate from model reexecution
A model call made today may produce different output from the historical call. Repeating it is a new experiment, not necessarily a reconstruction.
Preserve accepted outputs or other evidence needed for the original decision path. Record the relevant transformation and configuration versions.
Fowler’s event-sourcing discussion describes reconstructing state from events. External interactions need deliberate handling during that reconstruction.
A worked inventory investigation
Consider an illustrative history with an accepted reservation for 20 units. A cancellation follows, but the stock projection still shows those units committed.
Replay can test whether the cancellation event reached the projection and which rule processed it. The investigation compares history with the current accepted records.
If a staff member also moved stock manually without recording it, replay cannot infer that physical event. A separate stock check remains necessary.
Choose what happens to external effects
Historical execution may include messages, supplier calls or payment requests. Those actions should not repeat simply because support replays the workflow.
Use isolated substitutes or recorded results where the design allows. Keep any deliberate new action separately authorized.
| Historical component | Replay treatment | Reason |
|---|---|---|
| Accepted domain event | Reprocess with compatible interpretation | Reconstruct relevant state. |
| Model output | Use preserved historical result | Avoid treating a new generation as history. |
| External notification | Disable live delivery or use recorded result | Prevent duplicate customer messages. |
| Manual unrecorded action | Mark as evidence gap | Avoid inventing missing events. |
| Changed business rule | Use versioned behavior or explicit migration | Explain differences in interpretation. |
Test the explanation against checkpoints
Choose known points where state was independently checked. Compare the reconstructed state at those points before trusting later conclusions.
Record differences and identify missing evidence. Do not overwrite production state merely because one replay result appears plausible.
A counterfactual replay using new rules can be useful, but label it as a simulation. It answers a different question from historical reconstruction.
- Define which history and state the investigation covers.
- Collect relevant code, rule and source versions.
- Isolate replay from live external effects.
- Compare reconstruction with independently checked records.
- Document gaps and distinguish simulation from historical explanation.
Keep the support workflow understandable
Provide a readable timeline showing relevant events and their references. A raw technical log may not explain the customer consequence.
Control access because historical data can contain sensitive records no longer visible in normal views. Retention applies to replay archives too.
Measure whether investigations reach supported conclusions, not simply whether the replay command completes. Missing evidence should remain an explicit result.
Replay is valuable when its boundaries are honest. It can explain recorded execution without claiming perfect knowledge of everything that happened in the business.
Compare historical replay with a counterfactual experiment explicitly. Running revised rules can test a proposed fix, but it does not reproduce the original decision.
Label both code versions and preserve the comparison inputs. Where the external response was never recorded, mark that gap. An investigation should distinguish an observed failure mechanism from a plausible explanation produced by a newer implementation.
Common questions
Can replay reproduce every model response?
Not necessarily. New model calls can differ. Historical reconstruction may require preserved outputs and the relevant execution context.
Should replay automatically repair production data?
Only through a separate controlled correction process. First verify the result, evidence and effect of the proposed repair.
Sources & further reading
Primary references for the facts and frameworks discussed. Original worked examples are illustrative and separate from research results.
- Events and Event History, Temporal documentation ↗
Supports workflow event history and durable-execution concepts, not complete business capture.
- Event Sourcing, Martin Fowler ↗
Supports reconstruction and external-interaction considerations. The inventory case is illustrative.
Published by the team building Daltn. Comparisons are first-party analysis, not independent reviews. Our editorial approach.



