Package kalix.javasdk.workflow
Class AbstractWorkflow.WorkflowDef<S>
Object
kalix.javasdk.workflow.AbstractWorkflow.WorkflowDef<S>
- Enclosing class:
- AbstractWorkflow<S>
-
Method Summary
Modifier and TypeMethodDescriptionaddStep
(AbstractWorkflow.Step step) Add step to workflow definition.addStep
(AbstractWorkflow.Step step, AbstractWorkflow.RecoverStrategy<?> recoverStrategy) Add step to workflow definition with a dedicatedAbstractWorkflow.RecoverStrategy
.defaultStepRecoverStrategy
(AbstractWorkflow.RecoverStrategy recoverStrategy) Define a default step recovery strategy.defaultStepTimeout
(Duration timeout) Define a default step timeout.failoverTo
(String stepName, I stepInput, AbstractWorkflow.RecoverStrategy.MaxRetries maxRetries) Define a failover step name after workflow timeout.failoverTo
(String stepName, AbstractWorkflow.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 AbstractWorkflow.WorkflowDef<S> addStep(AbstractWorkflow.Step step, AbstractWorkflow.RecoverStrategy<?> recoverStrategy) Add step to workflow definition with a dedicatedAbstractWorkflow.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 AbstractWorkflow.WorkflowDef<S> failoverTo(String stepName, AbstractWorkflow.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> AbstractWorkflow.WorkflowDef<S> failoverTo(String stepName, I stepInput, AbstractWorkflow.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
public AbstractWorkflow.WorkflowDef<S> defaultStepRecoverStrategy(AbstractWorkflow.RecoverStrategy recoverStrategy) Define a default step recovery strategy. Can be overridden with step configuration. -
getWorkflowTimeout
-
getStepTimeout
-
getStepRecoverStrategy
-
getSteps
-
getStepConfigs
-
getFailoverStepName
-
getFailoverStepInput
-
getFailoverMaxRetries
-