Record Class ExecuteStepDefinition
java.lang.Object
java.lang.Record
io.axoniq.framework.workflow.dsl.api.ExecuteStepDefinition
- Record Components:
primitiveMetadata- metadata of the primitiveinputPayload- local input payload for the actionsaction- action to executepayloadMapping- mapping of payloadstiming- timing configurationretryPolicy- retry policy for the action
public record ExecuteStepDefinition(PrimitiveMetadata primitiveMetadata, Map<String,@Nullable Object> inputPayload, PayloadProcessor action, PayloadMapping payloadMapping, Timing timing, RetryPolicy retryPolicy)
extends Record
Specification for executing an action within a workflow.
- Since:
- 5.4.0
- Author:
- Simon Zambrovski
-
Constructor Summary
ConstructorsConstructorDescriptionExecuteStepDefinition(PrimitiveMetadata primitiveMetadata, Map<String, @Nullable Object> inputPayload, PayloadProcessor action, PayloadMapping payloadMapping, Timing timing, RetryPolicy retryPolicy) Creates an instance of aExecuteStepDefinitionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionaction()Returns the value of theactionrecord component.action(PayloadProcessor action) Returns a copy of this definition with the provided action.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 theinputPayloadrecord component.inputPayload(Map<String, @Nullable Object> inputPayload) Returns a copy of this definition with the provided step-local input payload.parameterPayloadReducer(PayloadReducer parameterPayloadReducer) Returns a copy of this definition with the provided parameter payload reducer.Returns the value of thepayloadMappingrecord component.payloadMapping(PayloadMapping payloadMapping) Returns a copy of this definition with the provided payload mapping.Returns the value of theprimitiveMetadatarecord component.primitiveMetadata(PrimitiveMetadata primitiveMetadata) Returns a copy of this definition with the provided primitive metadata.resultPayloadReducer(PayloadReducer resultPayloadReducer) Returns a copy of this definition with the provided result payload reducer.Returns the value of theretryPolicyrecord component.retryPolicy(RetryPolicy retryPolicy) Returns a copy of this definition with the provided retry policy.Returns a copy of this definition with the provided step name.timeout(long timeoutSeconds) Returns a copy of this definition with the provided timeout in seconds.Returns a copy of this definition with the provided timeout.timing()Returns the value of thetimingrecord component.Returns a copy of this definition with the provided timing configuration.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ExecuteStepDefinition
public ExecuteStepDefinition(PrimitiveMetadata primitiveMetadata, Map<String, @Nullable Object> inputPayload, PayloadProcessor action, PayloadMapping payloadMapping, Timing timing, RetryPolicy retryPolicy) Creates an instance of aExecuteStepDefinitionrecord class.- Parameters:
primitiveMetadata- the value for theprimitiveMetadatarecord componentinputPayload- the value for theinputPayloadrecord componentaction- the value for theactionrecord componentpayloadMapping- the value for thepayloadMappingrecord componenttiming- the value for thetimingrecord componentretryPolicy- the value for theretryPolicyrecord component
-
-
Method Details
-
primitiveMetadata
Returns a copy of this definition with the provided primitive metadata.- Parameters:
primitiveMetadata- metadata of the primitive- Returns:
- copied step definition with updated metadata
-
stepName
Returns a copy of this definition with the provided step name.- Parameters:
stepName- logical step name- Returns:
- copied step definition with updated step name
-
eventNameCustomizer
Returns a copy of this definition with the provided event name customizer.- Parameters:
eventNameCustomizer- customizer for published event names- Returns:
- copied step definition with updated event naming
-
inputPayload
Returns a copy of this definition with the provided step-local input payload.- Parameters:
inputPayload- local input payload for the action- Returns:
- copied step definition with updated input payload
-
action
Returns a copy of this definition with the provided action.- Parameters:
action- action to execute- Returns:
- copied step definition with updated action
-
payloadMapping
Returns a copy of this definition with the provided payload mapping.- Parameters:
payloadMapping- mapping of payloads- Returns:
- copied step definition with updated payload mapping
-
parameterPayloadReducer
Returns a copy of this definition with the provided parameter payload reducer.- Parameters:
parameterPayloadReducer- reducer that prepares the action input- Returns:
- copied step definition with updated parameter payload reducer
-
resultPayloadReducer
Returns a copy of this definition with the provided result payload reducer.- Parameters:
resultPayloadReducer- reducer that updates the workflow payload from the step result- Returns:
- copied step definition with updated result payload reducer
-
timing
Returns a copy of this definition with the provided timing configuration.- Parameters:
timing- timing configuration- Returns:
- copied step definition with updated timing
-
timeout
Returns a copy of this definition with the provided timeout.- Parameters:
timeout- timeout duration- Returns:
- copied step definition with updated timeout
-
timeout
Returns a copy of this definition with the provided timeout in seconds.- Parameters:
timeoutSeconds- timeout in seconds- Returns:
- copied step definition with updated timeout
-
retryPolicy
Returns a copy of this definition with the provided retry policy.- Parameters:
retryPolicy- retry policy for the action- Returns:
- copied step definition with updated retry policy
-
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
-
inputPayload
Returns the value of theinputPayloadrecord component.- Returns:
- the value of the
inputPayloadrecord component
-
action
Returns the value of theactionrecord component.- Returns:
- the value of the
actionrecord component
-
payloadMapping
Returns the value of thepayloadMappingrecord component.- Returns:
- the value of the
payloadMappingrecord component
-
timing
Returns the value of thetimingrecord component.- Returns:
- the value of the
timingrecord component
-
retryPolicy
Returns the value of theretryPolicyrecord component.- Returns:
- the value of the
retryPolicyrecord component
-