Package akka.javasdk.workflow
Class Workflow.WorkflowSettingsBuilder
Object
akka.javasdk.workflow.Workflow.WorkflowSettingsBuilder
-
Constructor Summary
ConstructorsConstructorDescriptionWorkflowSettingsBuilder
(Optional<Duration> defaultStepTimeout, Optional<Workflow.RecoverStrategy<?>> defaultStepRecoverStrategy, Map<String, Workflow.StepSettings> stepSettingsMap) -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Creates the final workflow configuration from this builder.defaultStepRecovery
(Workflow.RecoverStrategy<?> recoverStrategy) Define a default recovery strategy for all steps.defaultStepTimeout
(Duration timeout) Define a default timeout duration for all steps.stepRecovery
(akka.japi.function.Function<W, Workflow.StepEffect> lambda, Workflow.RecoverStrategy<?> recovery) Configure a specific step with a recovery strategy.stepRecovery
(akka.japi.function.Function2<W, I, Workflow.StepEffect> lambda, Workflow.RecoverStrategy<?> recovery) Configure a specific step with a recovery strategy.stepTimeout
(akka.japi.function.Function<W, Workflow.StepEffect> lambda, Duration timeout) Configure a specific step with a timeout.stepTimeout
(akka.japi.function.Function2<W, I, Workflow.StepEffect> lambda, Duration timeout) Configure a specific step with a timeout.
-
Constructor Details
-
WorkflowSettingsBuilder
public WorkflowSettingsBuilder(Optional<Duration> defaultStepTimeout, Optional<Workflow.RecoverStrategy<?>> defaultStepRecoverStrategy, Map<String, Workflow.StepSettings> stepSettingsMap)
-
-
Method Details
-
newBuilder
-
defaultStepTimeout
Define a default timeout duration for all steps. Can be overridden per step. -
defaultStepRecovery
public Workflow.WorkflowSettingsBuilder defaultStepRecovery(Workflow.RecoverStrategy<?> recoverStrategy) Define a default recovery strategy for all steps. Can be overridden per step. -
stepTimeout
public <W> Workflow.WorkflowSettingsBuilder stepTimeout(akka.japi.function.Function<W, Workflow.StepEffect> lambda, Duration timeout) Configure a specific step with a timeout.- Parameters:
lambda
- Reference to the step methodtimeout
- Timeout duration for this step
-
stepTimeout
public <W,I> Workflow.WorkflowSettingsBuilder stepTimeout(akka.japi.function.Function2<W, I, Workflow.StepEffect> lambda, Duration timeout) Configure a specific step with a timeout.- Parameters:
lambda
- Reference to the step methodtimeout
- Timeout duration for this step
-
stepRecovery
public <W> Workflow.WorkflowSettingsBuilder stepRecovery(akka.japi.function.Function<W, Workflow.StepEffect> lambda, Workflow.RecoverStrategy<?> recovery) Configure a specific step with a recovery strategy.- Parameters:
lambda
- Reference to the step methodrecovery
- Recovery strategy for this step
-
stepRecovery
public <W,I> Workflow.WorkflowSettingsBuilder stepRecovery(akka.japi.function.Function2<W, I, Workflow.StepEffect> lambda, Workflow.RecoverStrategy<?> recovery) Configure a specific step with a recovery strategy.- Parameters:
lambda
- Reference to the step methodrecovery
- Recovery strategy for this step
-
build
Creates the final workflow configuration from this builder.- Returns:
- The complete workflow configuration
-