java.lang.Object
io.axoniq.framework.workflow.runtime.execution.ReachedSteps
All Implemented Interfaces:
DescribableComponent

@Internal public class ReachedSteps extends Object implements DescribableComponent
Records steps reached by one workflow body invocation for replay-drift detection.

Before a workflow body is invoked, the recorded step names are cleared. Each primitive records the step it reaches, allowing the engine to compare the current invocation with the event-sourced WorkflowState. When a terminal state step was not reached by the current invocation, this class detects replay drift before a new event is emitted.

This is separate from RunningSteps, which tracks active asynchronous executions. A reached step can be terminal, pending, or no longer running, so replay-drift detection must not depend on active execution state.

Since:
5.4.0
Author:
Simon Zambrovski, Stefan Dragisic
  • Constructor Details

    • ReachedSteps

      public ReachedSteps()
  • Method Details

    • describeTo

      public void describeTo(ComponentDescriptor descriptor)
      Description copied from interface: DescribableComponent
      Describe the properties of this DescribableComponent with the given descriptor.

      Components should call the appropriate describeProperty methods on the descriptor to register their properties. The descriptor is responsible for determining how these properties are formatted and structured in the final output.

      Best Practices: As a general rule, all relevant fields of a DescribableComponent implementation should be described in this method. However, developers have discretion to include only the fields that make sense in the context. Not every field may be meaningful for description purposes, especially internal implementation details. Furthermore, components might want to expose different information based on their current state. The final decision on what properties to include lies with the person implementing the describeTo method, who should focus on providing information that is useful for understanding the component's configuration and state.

      Example implementation:

       public void describeTo(ComponentDescriptor descriptor) {
           descriptor.describeProperty("name", this.name);
           descriptor.describeProperty("enabled", this.enabled);
           descriptor.describeProperty("configuration", this.configuration); // A nested component
           descriptor.describeProperty("handlers", this.eventHandlers);      // A collection
       }
       
      Specified by:
      describeTo in interface DescribableComponent
      Parameters:
      descriptor - The component descriptor to describe this DescribableComponentn its properties in.