Class StepCompletion

java.lang.Object
io.superdurable.dex.StepCompletion

public final class StepCompletion extends Object
Contains one output-bearing Step completion returned by Client.waitForFlow(String).

A Flow may return multiple completions, including multiple executions of the same Step type. Use getStepExecutionId() when execution identity matters. The list order reflects server collection order and is not deterministic for parallel Steps.

  • Method Details

    • getStepType

      public String getStepType()
      Returns the registered Step type that produced this output.
      Returns:
      the durable Step type
    • getStepExecutionId

      public String getStepExecutionId()
      Returns the server identity of the exact Step execution that produced this output.
      Returns:
      the Step execution ID
    • getOutput

      public <T> T getOutput(Class<T> outputType)
      Decodes this Step output as a concrete Java class.

      The value has already been hydrated before waitForFlow returns. This method may be called repeatedly with compatible target classes.

      Type Parameters:
      T - the expected output type
      Parameters:
      outputType - the concrete Java output class
      Returns:
      the decoded Step output
      Throws:
      ValueMappingException - if the value cannot be decoded