Class StepBuilder
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic class -
Constructor Summary
ConstructorsConstructorDescriptionStepBuilder(String name) Not for direct user construction, instances are created through the workflow DSL -
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,Output>
StepBuilder.CallStepBuilder<Input, Output> Build a step action with a call.Build a step action with a call.<Output> StepBuilder.CallStepBuilder<Void, Output> Build a step action with a call.Deprecated.
-
Constructor Details
-
StepBuilder
Not for direct user construction, instances are created through the workflow DSL
-
-
Method Details
-
step
Deprecated.use methods returningWorkflow.StepEffectinstead. -
call
public <Input,Output> StepBuilder.CallStepBuilder<Input,Output> call(Class<Input> callInputClass, Function<Input, Output> callFactory) Build a step action with a call.The value returned by the call
Functionis 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 the call factory, provided by transition method.Output- Output of the call.- Parameters:
callInputClass- Input class for call factory.callFactory- Factory method for creating a call.- Returns:
- Step builder.
-
call
Build a step action with a call.The value returned by the
Supplieris 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 the call.- Parameters:
callSupplier- Factory method for creating a call.- Returns:
- Step builder.
-
call
Build a step action with a call.The
Runnablepassed to this method is executed and if successful, theandThenmethod is called. In theandThenmethod, we can 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.
- Returns:
- Step builder.
-
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
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 the async call factory, provided by transition method.Output- Output of the 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
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 the async call.- Parameters:
callSupplier- Factory method for creating async call.- Returns:
- Step builder.
-
Workflow.StepEffectinstead.