Record Class WaitForStepDefinition

java.lang.Object
java.lang.Record
io.axoniq.framework.workflow.dsl.api.WaitForStepDefinition
Record Components:
primitiveMetadata - metadata of the primitive
eventCondition - condition for event receipt
payloadMapping - mapping of payloads
timing - timing configuration

public record WaitForStepDefinition(PrimitiveMetadata primitiveMetadata, EventCondition eventCondition, PayloadMapping payloadMapping, Timing timing) extends Record
Specification for waiting for an event within a workflow.
Since:
5.4.0
Author:
Simon Zambrovski
  • Constructor Details

  • Method Details

    • primitiveMetadata

      public WaitForStepDefinition 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 WaitForStepDefinition 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 WaitForStepDefinition 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
    • eventCondition

      public WaitForStepDefinition eventCondition(EventCondition eventCondition)
      Returns a copy of this definition with the provided event condition.
      Parameters:
      eventCondition - condition for event receipt
      Returns:
      copied step definition with updated event condition
    • payloadMapping

      public WaitForStepDefinition 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
    • resultPayloadReducer

      public WaitForStepDefinition 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 event result
      Returns:
      copied step definition with updated result payload reducer
    • timing

      public WaitForStepDefinition 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 WaitForStepDefinition 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 WaitForStepDefinition 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
    • 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
    • eventCondition

      public EventCondition eventCondition()
      Returns the value of the eventCondition record component.
      Returns:
      the value of the eventCondition 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