Record Class FailWorkflowDefinition
java.lang.Object
java.lang.Record
io.axoniq.framework.workflow.dsl.api.FailWorkflowDefinition
- Record Components:
primitiveMetadata- metadata of the primitivecause- failure cause
public record FailWorkflowDefinition(PrimitiveMetadata primitiveMetadata, Throwable cause)
extends Record
Specification for terminating a workflow with failure.
- Since:
- 5.4.0
- Author:
- Simon Zambrovski
-
Constructor Summary
ConstructorsConstructorDescriptionFailWorkflowDefinition(PrimitiveMetadata primitiveMetadata, Throwable cause) Creates an instance of aFailWorkflowDefinitionrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncause()Returns the value of thecauserecord component.Returns a copy of this definition with the provided failure cause.final booleanIndicates whether some other object is "equal to" this one.eventNameCustomizer(EventNameCustomizer eventNameCustomizer) Returns a copy of this definition with the provided event name customizer.final inthashCode()Returns a hash code value for this object.Returns the value of theprimitiveMetadatarecord component.primitiveMetadata(PrimitiveMetadata primitiveMetadata) Returns a copy of this definition with the provided primitive metadata.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
FailWorkflowDefinition
Creates an instance of aFailWorkflowDefinitionrecord class.- Parameters:
primitiveMetadata- the value for theprimitiveMetadatarecord componentcause- the value for thecauserecord component
-
-
Method Details
-
primitiveMetadata
Returns a copy of this definition with the provided primitive metadata.- Parameters:
primitiveMetadata- metadata of the primitive- Returns:
- copied workflow definition with updated metadata
-
eventNameCustomizer
Returns a copy of this definition with the provided event name customizer.- Parameters:
eventNameCustomizer- customizer for published event names- Returns:
- copied workflow definition with updated event naming
-
cause
Returns a copy of this definition with the provided failure cause.- Parameters:
cause- failure cause- Returns:
- copied workflow definition with updated failure cause
-
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). -
primitiveMetadata
Returns the value of theprimitiveMetadatarecord component.- Returns:
- the value of the
primitiveMetadatarecord component
-
cause
Returns the value of thecauserecord component.- Returns:
- the value of the
causerecord component
-