Class StepExecutionId

java.lang.Object
io.superdurable.dex.StepExecutionId

public final class StepExecutionId extends Object
Selects one execution of a Step within a Flow.

Use this identifier with operations such as Client.skipTimer(String, StepExecutionId, TimerId) and Client.waitForStepCompletion(String, StepExecutionId, WaitForStepCompletionOptions). Execution numbers begin at one for each Step type.

StepExecutionId execution = StepExecutionId.of("ChargeCard", 2);
client.waitForStepCompletion(
        "order-123",
        execution,
        WaitForStepCompletionOptions.newBuilder()
                .requestId("wait-order-123-charge-2")
                .requestTimeout(Duration.ofMinutes(1))
                .build());
  • Method Details

    • of

      public static StepExecutionId of(String stepType)
      Selects the first execution of a Step type.
      Parameters:
      stepType - the Step type; must not be blank
      Returns:
      the first Step execution identifier
    • of

      public static StepExecutionId of(String stepType, int executionNumber)
      Selects an explicit execution number of a Step type.
      Parameters:
      stepType - the Step type; must not be blank
      executionNumber - the one-based execution number
      Returns:
      the selected Step execution identifier