Record Class ExecuteStepDefinition

java.lang.Object
java.lang.Record
io.axoniq.framework.workflow.dsl.api.ExecuteStepDefinition
Record Components:
primitiveMetadata - metadata of the primitive
inputPayload - local input payload for the actions
action - action to execute
payloadMapping - mapping of payloads
timing - timing configuration
retryPolicy - 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 Details

  • Method Details

    • primitiveMetadata

      public ExecuteStepDefinition primitiveMetadata(PrimitiveMetadata 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

      public ExecuteStepDefinition stepName(String 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

      public ExecuteStepDefinition eventNameCustomizer(EventNameCustomizer 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

      public ExecuteStepDefinition inputPayload(Map<String,@Nullable Object> 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

      public ExecuteStepDefinition action(PayloadProcessor action)
      Returns a copy of this definition with the provided action.
      Parameters:
      action - action to execute
      Returns:
      copied step definition with updated action
    • payloadMapping

      public ExecuteStepDefinition payloadMapping(PayloadMapping 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

      public ExecuteStepDefinition parameterPayloadReducer(PayloadReducer 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

      public ExecuteStepDefinition resultPayloadReducer(PayloadReducer 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

      public ExecuteStepDefinition timing(Timing timing)
      Returns a copy of this definition with the provided timing configuration.
      Parameters:
      timing - timing configuration
      Returns:
      copied step definition with updated timing
    • timeout

      public ExecuteStepDefinition timeout(Duration timeout)
      Returns a copy of this definition with the provided timeout.
      Parameters:
      timeout - timeout duration
      Returns:
      copied step definition with updated timeout
    • timeout

      public ExecuteStepDefinition timeout(long timeoutSeconds)
      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

      public ExecuteStepDefinition retryPolicy(RetryPolicy 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

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • primitiveMetadata

      public PrimitiveMetadata primitiveMetadata()
      Returns the value of the primitiveMetadata record component.
      Returns:
      the value of the primitiveMetadata record component
    • inputPayload

      public Map<String,@Nullable Object> inputPayload()
      Returns the value of the inputPayload record component.
      Returns:
      the value of the inputPayload record component
    • action

      public PayloadProcessor action()
      Returns the value of the action record component.
      Returns:
      the value of the action record component
    • payloadMapping

      public PayloadMapping payloadMapping()
      Returns the value of the payloadMapping record component.
      Returns:
      the value of the payloadMapping record component
    • timing

      public Timing timing()
      Returns the value of the timing record component.
      Returns:
      the value of the timing record component
    • retryPolicy

      public RetryPolicy retryPolicy()
      Returns the value of the retryPolicy record component.
      Returns:
      the value of the retryPolicy record component