Package kalix.javasdk.workflow
Class ProtoStepBuilder.AsyncCallStepBuilder<CallInput,CallOutput>
Object
kalix.javasdk.workflow.ProtoStepBuilder.AsyncCallStepBuilder<CallInput,CallOutput>
- Enclosing class:
- ProtoStepBuilder
-
Constructor Summary
ConstructorDescriptionAsyncCallStepBuilder
(String name, Class<CallInput> callInputClass, Function<CallInput, CompletionStage<CallOutput>> callFunc) -
Method Summary
Modifier and TypeMethodDescriptionandThen
(Class<CallOutput> transitionInputClass, Function<CallOutput, AbstractWorkflow.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
@ApiMayChange public AbstractWorkflow.AsyncCallStep<CallInput,CallOutput, andThen?> (Class<CallOutput> transitionInputClass, Function<CallOutput, AbstractWorkflow.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 anAbstractWorkflow.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 aAbstractWorkflow.Effect.TransitionalEffect
- Returns:
- AsyncCallStep
-