Class StepBuilder
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
-
Constructor Summary
-
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.
-
Constructor Details
-
StepBuilder
-
-
Method Details
-
step
-
asyncCall
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
Function
passed to this method should return aCompletionStage
. On successful completion, its result is made available to this workflow via theandThen
method. In theandThen
method, 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
public <Output> StepBuilder.AsyncCallStepBuilder<Void,Output> asyncCall(Supplier<CompletionStage<Output>> callSupplier) Build a step action with an async call.The
Supplier
function passed to this method should return aCompletionStage
. On successful completion, its result is made available to this workflow via theandThen
method. In theandThen
method, 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.
-