Package com.axelor.workflow.exec
Record Class WorkflowResult
java.lang.Object
java.lang.Record
com.axelor.workflow.exec.WorkflowResult
- Record Components:
node- where the walk stoppedpark- what it is waiting on, when it stopped short of an enddeclaredFailure- the name of a failure the definition raised on purpose; null for any othercause- the defect behind a failure, kept so whoever finally fails the run can log it; null for any other
public record WorkflowResult(WorkflowResult.Status status, String node, String errorMessage, ParkInfo park, WorkflowResult.DeclaredFailure declaredFailure, Throwable cause)
extends Record
How one walk of a workflow graph ended.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordA failure the definition raised on purpose;codeis null when it named none.static enum -
Constructor Summary
ConstructorsConstructorDescriptionWorkflowResult(WorkflowResult.Status status, String node, String errorMessage, ParkInfo park, WorkflowResult.DeclaredFailure declaredFailure, Throwable cause) Creates an instance of aWorkflowResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncause()Returns the value of thecauserecord component.static WorkflowResultReturns the value of thedeclaredFailurerecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theerrorMessagerecord component.static WorkflowResultfinal inthashCode()Returns a hash code value for this object.node()Returns the value of thenoderecord component.park()Returns the value of theparkrecord component.static WorkflowResultstatus()Returns the value of thestatusrecord component.booleanWhether the walk reached an end, a terminate end included.static WorkflowResultterminated(String node) final StringtoString()Returns a string representation of this record class.static WorkflowResultstatic WorkflowResult
-
Constructor Details
-
WorkflowResult
public WorkflowResult(WorkflowResult.Status status, String node, String errorMessage, ParkInfo park, WorkflowResult.DeclaredFailure declaredFailure, Throwable cause) Creates an instance of aWorkflowResultrecord class.- Parameters:
status- the value for thestatusrecord componentnode- the value for thenoderecord componenterrorMessage- the value for theerrorMessagerecord componentpark- the value for theparkrecord componentdeclaredFailure- the value for thedeclaredFailurerecord componentcause- the value for thecauserecord component
-
-
Method Details
-
succeeded
public boolean succeeded()Whether the walk reached an end, a terminate end included. -
completed
-
terminated
-
failed
-
skipped
-
waiting
-
waiting
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
status
Returns the value of thestatusrecord component.- Returns:
- the value of the
statusrecord component
-
node
Returns the value of thenoderecord component.- Returns:
- the value of the
noderecord component
-
errorMessage
Returns the value of theerrorMessagerecord component.- Returns:
- the value of the
errorMessagerecord component
-
park
Returns the value of theparkrecord component.- Returns:
- the value of the
parkrecord component
-
declaredFailure
Returns the value of thedeclaredFailurerecord component.- Returns:
- the value of the
declaredFailurerecord component
-
cause
Returns the value of thecauserecord component.- Returns:
- the value of the
causerecord component
-