Package akka.javasdk.workflow
Class StepBuilder.AsyncCallStepBuilder<CallInput,CallOutput>
Object
akka.javasdk.workflow.StepBuilder.AsyncCallStepBuilder<CallInput,CallOutput>
- Enclosing class:
StepBuilder
-
Constructor Summary
ConstructorDescriptionAsyncCallStepBuilder
(String name, Class<CallInput> callInputClass, Function<CallInput, CompletionStage<CallOutput>> callFunc) -
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.
-
Constructor Details
-
AsyncCallStepBuilder
public AsyncCallStepBuilder(String name, Class<CallInput> callInputClass, Function<CallInput, CompletionStage<CallOutput>> callFunc)
-
-
Method Details
-
andThen
public Workflow.AsyncCallStep<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:
- AsyncCallStep
-