Package akka.javasdk.workflow
Class StepBuilder.CallStepBuilder<Input,DefCallInput,DefCallOutput>
Object
akka.javasdk.workflow.StepBuilder.CallStepBuilder<Input,DefCallInput,DefCallOutput>
- Enclosing class:
StepBuilder
-
Constructor Summary
ConstructorDescriptionCallStepBuilder
(String name, Class<Input> callInputClass, Function<Input, DeferredCall<DefCallInput, DefCallOutput>> callFunc) -
Method Summary
Modifier and TypeMethodDescriptionandThen
(Class<DefCallOutput> transitionInputClass, Function<DefCallOutput, Workflow.Effect.TransitionalEffect<Void>> transitionFunc) Transition to the next step based on the result of the step call.
-
Constructor Details
-
CallStepBuilder
public CallStepBuilder(String name, Class<Input> callInputClass, Function<Input, DeferredCall<DefCallInput, DefCallOutput>> callFunc)
-
-
Method Details
-
andThen
public Workflow.CallStep<Input,DefCallInput, andThenDefCallOutput, ?> (Class<DefCallOutput> transitionInputClass, Function<DefCallOutput, 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
-