Class WorkflowStepResults

java.lang.Object
io.axoniq.framework.workflow.runtime.execution.WorkflowStepResults

@Internal public class WorkflowStepResults extends Object
Utility containing WorkflowStepResult factory methods.
Since:
5.4.0
Author:
Simon Zambrovski
  • Method Details

    • completed

      public static WorkflowStepResult completed(String stepName, @Nullable Object payload, EventConverter converter)
      Constructs completed result.
      Parameters:
      payload - payload of the result, might be null.
      Returns:
      completed step result.
    • completed

      public static WorkflowStepResult completed(String stepName)
      Constructs a completed result that carries no payload — for primitives whose recorded value is read from WorkflowState rather than from the result handle (e.g. the migration primitive).
      Returns:
      completed step result.
    • failed

      public static WorkflowStepResult failed(String stepName, Throwable error)
      Constructs failed result.
      Parameters:
      error - failure causing error.
      Returns:
      failed result.
    • canceled

      public static WorkflowStepResult canceled(String stepName)
      Constructs cancelled result.
      Returns:
      cancelled result.
    • timeout

      public static WorkflowStepResult timeout(String stepName, Duration timeout)
      Constructs timed out result.
      Parameters:
      timeout - timeout duration.
      Returns:
      timed out result.