Package com.axelor.workflow.exec
Class WorkflowFailure
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.axelor.workflow.exec.WorkflowFailure
- All Implemented Interfaces:
Serializable
A node failed. A declared failure was raised on purpose with
fail(), and a
boundary may catch it by its code; an undeclared one is whatever escaped, and only a
boundary without a code catches it. code is the author's name for a declared failure, or
null.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionWorkflowFailure(String nodeId, String message) An undeclared failure: something escaped this node.WorkflowFailure(String nodeId, String message, Throwable cause) An undeclared failure preserving the defect that escaped the node. -
Method Summary
Modifier and TypeMethodDescriptionstatic WorkflowFailureactivity(String nodeId, String message, ActivityEffect effect, boolean declared, Throwable cause) A failure of a node that reaches outside the database, with what it knows of its side effect; that is also written into the message for whoever decides whether to retry.static booleanWhether the walk's transaction can still commit, so a boundary may take over from a failure.static WorkflowFailureA failure the definition raised on purpose, optionally under a name of its own.effect()What the node knew about its side effect, or null when it is not that kind of failure.nodeId()The node that failed.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
WorkflowFailure
An undeclared failure: something escaped this node. -
WorkflowFailure
An undeclared failure preserving the defect that escaped the node.
-
-
Method Details
-
declared
A failure the definition raised on purpose, optionally under a name of its own. -
activity
public static WorkflowFailure activity(String nodeId, String message, ActivityEffect effect, boolean declared, Throwable cause) A failure of a node that reaches outside the database, with what it knows of its side effect; that is also written into the message for whoever decides whether to retry. -
canContinue
public static boolean canContinue()Whether the walk's transaction can still commit, so a boundary may take over from a failure. A failed flush leaves it rollback-only, and whatever the boundary's path wrote would be lost. -
effect
What the node knew about its side effect, or null when it is not that kind of failure. -
nodeId
The node that failed.
-