Class StepBuilder.CallStepBuilder<CallInput,CallOutput>
- Enclosing class:
StepBuilder
-
Method Summary
Modifier and TypeMethodDescriptionandThen
(Class<CallOutput> transitionInputClass, Function<CallOutput, Workflow.Effect.TransitionalEffect<Void>> transitionFunc) Transition to the next step based on the result of the step call.andThen
(Supplier<Workflow.Effect.TransitionalEffect<Void>> transitionFunc) Transition to the next step after the step call completes.
-
Method Details
-
andThen
public Workflow.CallStep<CallInput,CallOutput, andThen?> (Class<CallOutput> transitionInputClass, Function<CallOutput, Workflow.Effect.TransitionalEffect<Void>> transitionFunc) Transition to the next step based on the result of the step call.The
Function
passed to this method should receive the return type of the step call and return anWorkflow.Effect.TransitionalEffect
describing the next step to transition to.When defining the Effect, you can update the workflow state and indicate the next step to transition to. This can be another step, or a pause or end of the workflow.
When transition to another step, you can also pass an input parameter to the next step.
- Parameters:
transitionInputClass
- Input class for transition.transitionFunc
- Function that transform the action result to aWorkflow.Effect.TransitionalEffect
- Returns:
- CallStep
-
andThen
public Workflow.CallStep<CallInput,CallOutput, andThen?> (Supplier<Workflow.Effect.TransitionalEffect<Void>> transitionFunc) Transition to the next step after the step call completes.The
Supplier
passed to this method should return anWorkflow.Effect.TransitionalEffect
describing the next step to transition to. Note that the output of the call is not passed to this function.When defining the Effect, you can update the workflow state and indicate the next step to transition to. This can be another step, or a pause or end of the workflow.
When transition to another step, you can also pass an input parameter to the next step.
- Parameters:
transitionFunc
- Supplier ofWorkflow.Effect.TransitionalEffect
- Returns:
- CallStep
-