Record Class EventSourcedWorkflowState.StepSnapshot
java.lang.Object
java.lang.Record
io.axoniq.framework.workflow.runtime.execution.EventSourcedWorkflowState.StepSnapshot
- Record Components:
stepName- the name of the stepstatus- the status of the stepresult- the result of the step, if it is neither bytes nor aStepRetryInforawResult- the result of the step, if it is bytesretryInfo- the result of the step, if it is aStepRetryInfoerror- the error of the step, if anytimestamp- the time the step reached its status, in ISO-8601 form so that no converter needs a time module
- Enclosing class:
EventSourcedWorkflowState
public static record EventSourcedWorkflowState.StepSnapshot(String stepName, StepStatus status, @Nullable Object result, byte @Nullable [] rawResult, @Nullable StepRetryInfo retryInfo, @Nullable WorkflowError error, String timestamp)
extends Record
The plain values of a
WorkflowStep, which a converter can write and read.
A step result is kept in the form it has: rawResult for the bytes of a sourced event payload,
retryInfo for a retried step, and result for any other value.
-
Constructor Summary
ConstructorsConstructorDescriptionStepSnapshot(String stepName, StepStatus status, @Nullable Object result, byte @Nullable [] rawResult, @Nullable StepRetryInfo retryInfo, @Nullable WorkflowError error, String timestamp) Creates an instance of aStepSnapshotrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.@Nullable WorkflowErrorerror()Returns the value of theerrorrecord component.final inthashCode()Returns a hash code value for this object.byte @Nullable []Returns the value of therawResultrecord component.@Nullable Objectresult()Returns the value of theresultrecord component.@Nullable StepRetryInfoReturns the value of theretryInforecord component.status()Returns the value of thestatusrecord component.stepName()Returns the value of thestepNamerecord component.Returns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
StepSnapshot
public StepSnapshot(String stepName, StepStatus status, @Nullable Object result, byte @Nullable [] rawResult, @Nullable StepRetryInfo retryInfo, @Nullable WorkflowError error, String timestamp) Creates an instance of aStepSnapshotrecord class.- Parameters:
stepName- the value for thestepNamerecord componentstatus- the value for thestatusrecord componentresult- the value for theresultrecord componentrawResult- the value for therawResultrecord componentretryInfo- the value for theretryInforecord componenterror- the value for theerrorrecord componenttimestamp- the value for thetimestamprecord component
-
-
Method Details
-
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). -
stepName
Returns the value of thestepNamerecord component.- Returns:
- the value of the
stepNamerecord component
-
status
Returns the value of thestatusrecord component.- Returns:
- the value of the
statusrecord component
-
result
Returns the value of theresultrecord component.- Returns:
- the value of the
resultrecord component
-
rawResult
public byte @Nullable [] rawResult()Returns the value of therawResultrecord component.- Returns:
- the value of the
rawResultrecord component
-
retryInfo
Returns the value of theretryInforecord component.- Returns:
- the value of the
retryInforecord component
-
error
Returns the value of theerrorrecord component.- Returns:
- the value of the
errorrecord component
-
timestamp
Returns the value of thetimestamprecord component.- Returns:
- the value of the
timestamprecord component
-