Class WorkflowReplayDriftException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
io.axoniq.framework.workflow.runtime.api.execution.context.WorkflowReplayDriftException
- All Implemented Interfaces:
Serializable
Thrown when a workflow's replay reaches an event-emitting primitive that would corrupt an in-flight workflow —
specifically, when state contains terminal steps the current invocation has not yet referenced. That signal means the
old code ran past this point with steps the new code skips; the new primitive's events would diverge from history.
Caught and handled non-terminally by SimpleWorkflowExecution.handleWorkflowException: a warning is logged
and
no terminal workflow event is published, so the workflow stays at its current state and the developer can
recover by reverting the code change or wrapping the new code in ctx.migrateVersion(changeId, n) to fork the
workflow.
- Since:
- 5.4.0
- Author:
- Stefan Dragisic
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionWorkflowReplayDriftException(String workflowId, String aboutToExecute, List<String> orphans) Constructs a drift exception. -
Method Summary
Modifier and TypeMethodDescriptionThe step the current code was about to execute when the drift was detected.orphans()The terminal steps present in history that the current code does not reference — evidence that older code ran past this point.The id of the workflow that could not proceed because of replay drift.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
WorkflowReplayDriftException
Constructs a drift exception.- Parameters:
workflowId- id of the workflow that detected drift.aboutToExecute- step name about to be executed, or"<terminate>"for workflow-level termination.orphans- terminal step names present in history but not referenced by the current invocation — the corruption signal.
-
-
Method Details
-
workflowId
The id of the workflow that could not proceed because of replay drift.- Returns:
- the workflow id.
-
aboutToExecute
The step the current code was about to execute when the drift was detected.- Returns:
- the name of the step about to execute.
-
orphans
The terminal steps present in history that the current code does not reference — evidence that older code ran past this point.- Returns:
- the unreferenced (orphan) terminal step names.
-