Package akka.javasdk.workflow
Class Workflow.WorkflowDef<S>
Object
akka.javasdk.workflow.Workflow.WorkflowDef<S>
-
Method Summary
Modifier and TypeMethodDescriptionaddStep
(Workflow.Step step) Add step to workflow definition.addStep
(Workflow.Step step, Workflow.RecoverStrategy<?> recoverStrategy) Add step to workflow definition with a dedicatedWorkflow.RecoverStrategy
.defaultStepRecoverStrategy
(Workflow.RecoverStrategy recoverStrategy) Define a default step recovery strategy.defaultStepTimeout
(Duration timeout) Define a default step timeout.failoverTo
(String stepName, Workflow.RecoverStrategy.MaxRetries maxRetries) Define a failover step name after workflow timeout.<I> Workflow.WorkflowDef
<S> failoverTo
(String stepName, I stepInput, Workflow.RecoverStrategy.MaxRetries maxRetries) Define a failover step name after workflow timeout.findByName
(String name) Optional
<?> getSteps()
Define a timeout for the duration of the entire workflow.
-
Method Details
-
findByName
-
addStep
Add step to workflow definition. Step name must be unique.- Parameters:
step
- A workflow step
-
addStep
public Workflow.WorkflowDef<S> addStep(Workflow.Step step, Workflow.RecoverStrategy<?> recoverStrategy) Add step to workflow definition with a dedicatedWorkflow.RecoverStrategy
. Step name must be unique.- Parameters:
step
- A workflow steprecoverStrategy
- A Step recovery strategy
-
timeout
Define a timeout for the duration of the entire workflow. When the timeout expires, the workflow is finished and no transitions are allowed.- Parameters:
timeout
- Timeout duration
-
failoverTo
public Workflow.WorkflowDef<S> failoverTo(String stepName, Workflow.RecoverStrategy.MaxRetries maxRetries) Define a failover step name after workflow timeout. Note that recover strategy for this step can set only the number of max retries.- Parameters:
stepName
- A failover step namemaxRetries
- A recovery strategy for failover step.
-
failoverTo
public <I> Workflow.WorkflowDef<S> failoverTo(String stepName, I stepInput, Workflow.RecoverStrategy.MaxRetries maxRetries) Define a failover step name after workflow timeout. Note that recover strategy for this step can set only the number of max retries.- Parameters:
stepName
- A failover step namestepInput
- A failover step inputmaxRetries
- A recovery strategy for failover step.
-
defaultStepTimeout
Define a default step timeout. If not set, a default value of 5 seconds is used. Can be overridden with step configuration. -
defaultStepRecoverStrategy
Define a default step recovery strategy. Can be overridden with step configuration. -
getWorkflowTimeout
-
getStepTimeout
-
getStepRecoverStrategy
-
getSteps
-
getStepConfigs
-
getFailoverStepName
-
getFailoverStepInput
-
getFailoverMaxRetries
-