Class StepBuilder
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<Input,Output>
StepBuilder.AsyncCallStepBuilder<Input, Output> asyncCall(Class<Input> callInputClass, Function<Input, CompletionStage<Output>> callFactory) Build a step action with an async call.<Output> StepBuilder.AsyncCallStepBuilder<Void, Output> asyncCall(Supplier<CompletionStage<Output>> callSupplier) Build a step action with an async call.<Input,DefCallInput, DefCallOutput>
StepBuilder.CallStepBuilder<Input, DefCallInput, DefCallOutput> call(Class<Input> callInputClass, Function<Input, DeferredCall<DefCallInput, DefCallOutput>> callFactory) Build a step action with a call to an existing Kalix component viaDeferredCall.<DefCallInput,DefCallOutput>
StepBuilder.CallStepBuilder<Void, DefCallInput, DefCallOutput> call(Supplier<DeferredCall<DefCallInput, DefCallOutput>> callSupplier) Build a step action with a call to an existing Kalix component viaDeferredCall.
-
Constructor Details
-
StepBuilder
-
-
Method Details
-
step
-
call
@ApiMayChange public <Input,DefCallInput, StepBuilder.CallStepBuilder<Input,DefCallOutput> DefCallInput, callDefCallOutput> (Class<Input> callInputClass, Function<Input, DeferredCall<DefCallInput, DefCallOutput>> callFactory) Build a step action with a call to an existing Kalix component viaDeferredCall.The
Functionpassed to this method should return aDeferredCall. TheDeferredCallis then executed by Kalix and its result, if successful, is made available to this workflow via theandThenmethod. In theandThenmethod, we can use the result to update the workflow state and transition to the next step.On failure, the step will be retried according to the default retry strategy or the one defined in the step configuration.
- Type Parameters:
Input- Input for deferred call factory, provided by transition method.DefCallInput- Input for deferred call.DefCallOutput- Output of deferred call.- Parameters:
callInputClass- Input class for call factory.callFactory- Factory method for creating deferred call.- Returns:
- Step builder.
-
call
@ApiMayChange public <DefCallInput,DefCallOutput> StepBuilder.CallStepBuilder<Void,DefCallInput, callDefCallOutput> (Supplier<DeferredCall<DefCallInput, DefCallOutput>> callSupplier) Build a step action with a call to an existing Kalix component viaDeferredCall.The
Supplierfunction passed to this method should return aDeferredCall. TheDeferredCallis then executed by Kalix and its result, if successful, is made available to this workflow via theandThenmethod. In theandThenmethod, we can use the result to update the workflow state and transition to the next step.On failure, the step will be retried according to the default retry strategy or the one defined in the step configuration.
- Type Parameters:
DefCallInput- Input for deferred call.DefCallOutput- Output of deferred call.- Parameters:
callSupplier- Factory method for creating deferred call.- Returns:
- Step builder.
-
asyncCall
@ApiMayChange public <Input,Output> StepBuilder.AsyncCallStepBuilder<Input,Output> asyncCall(Class<Input> callInputClass, Function<Input, CompletionStage<Output>> callFactory) Build a step action with an async call.The
Functionpassed to this method should return aCompletionStage. On successful completion, its result is made available to this workflow via theandThenmethod. In theandThenmethod, we can use the result to update the workflow state and transition to the next step.On failure, the step will be retried according to the default retry strategy or the one defined in the step configuration.
- Type Parameters:
Input- Input for async call factory, provided by transition method.Output- Output of async call.- Parameters:
callInputClass- Input class for call factory.callFactory- Factory method for creating async call.- Returns:
- Step builder.
-
asyncCall
@ApiMayChange public <Output> StepBuilder.AsyncCallStepBuilder<Void,Output> asyncCall(Supplier<CompletionStage<Output>> callSupplier) Build a step action with an async call.The
Supplierfunction passed to this method should return aCompletionStage. On successful completion, its result is made available to this workflow via theandThenmethod. In theandThenmethod, we can use the result to update the workflow state and transition to the next step.On failure, the step will be retried according to the default retry strategy or the one defined in the step configuration.
- Type Parameters:
Output- Output of async call.- Parameters:
callSupplier- Factory method for creating async call.- Returns:
- Step builder.
-