Class StepIndeterminateException
- All Implemented Interfaces:
Serializable
A step's external side effect runs before its COMPLETED event commits. If the worker crashes in that window,
the durable STARTED record survives but the action's result does not, and the engine cannot tell whether the
side effect completed. Re-running it would make the effect run twice (at-least-once); to keep effects
at-most-once the engine refuses to re-run the attempt and instead resolves the step through the
regular error flow with this cause — its outcome is
indeterminate (the effect ran zero or one times). For a step without a retry policy this
surfaces as a FAILED step; with a retry policy it surfaces as a RETRYING attempt.
A subtype of StepFailedException: callers that want to handle any step-level failure can catch the parent;
callers that need to distinguish "in-flight at a crash, not re-run" specifically can catch this type. Distinct from
StepTimedOutException (the step exceeded its timeout) and StepCancellationException (explicit
cancellation): here the action was deliberately not re-executed to preserve the at-most-once guarantee.
- Since:
- 5.4.0
- Author:
- Stefan Dragisic
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionStepIndeterminateException(String stepName) Constructs aStepIndeterminateExceptionfor the given step.StepIndeterminateException(String message, @Nullable Throwable cause) Constructs aStepIndeterminateExceptionwith a custom message. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
StepIndeterminateException
Constructs aStepIndeterminateExceptionfor the given step.- Parameters:
stepName- the step whose in-flight attempt was interrupted by a crash and not re-run
-
StepIndeterminateException
Constructs aStepIndeterminateExceptionwith a custom message.- Parameters:
message- the detail message describing the indeterminate stepcause- the underlying cause, ornullif none
-