Package akka.javasdk.workflow
Interface Workflow.StepEffect.PersistenceEffectBuilder
- Enclosing interface:
Workflow.StepEffect
public static interface Workflow.StepEffect.PersistenceEffectBuilder
-
Method Summary
Modifier and TypeMethodDescriptionFinish and delete the workflow execution.thenDelete(String reason) Finish and delete the workflow execution with a reason description.thenEnd()Finish the workflow execution.Finish the workflow execution with a reason description.Pause the workflow execution and wait for an external input, e.g.thenPause(Workflow.PauseSettings pauseSettings) Pause the workflow execution with advanced configuration options.Pause the workflow execution with a reason description and wait for an external input, e.g.thenTransitionTo(akka.japi.function.Function<W, Workflow.StepEffect> methodRef) Defines the next step to which the workflow should transition to.<W,I> Workflow.WithInput <I, Workflow.StepEffect> thenTransitionTo(akka.japi.function.Function2<W, I, Workflow.StepEffect> methodRef) Defines the next step to which the workflow should transition to.
-
Method Details
-
thenPause
Workflow.StepEffect thenPause()Pause the workflow execution and wait for an external input, e.g. via command handler. -
thenPause
Pause the workflow execution with a reason description and wait for an external input, e.g. via command handler. -
thenPause
Pause the workflow execution with advanced configuration options.This method allows pausing the workflow with a timeout and a handler that will be invoked when the timeout expires. The pause can also include an optional reason description.
Use the
Workflow.pauseSetting(Duration)method to start building theWorkflow.PauseSettings.- Parameters:
pauseSettings- Configuration for the pause including timeout duration and handler
-
thenTransitionTo
<W> Workflow.StepEffect thenTransitionTo(akka.japi.function.Function<W, Workflow.StepEffect> methodRef) Defines the next step to which the workflow should transition to.The step is identified by a method reference that accepts no input parameters.
- Type Parameters:
W- The workflow type containing the step method- Parameters:
methodRef- Reference to the step method- Returns:
- A step effect
-
thenTransitionTo
<W,I> Workflow.WithInput<I,Workflow.StepEffect> thenTransitionTo(akka.japi.function.Function2<W, I, Workflow.StepEffect> methodRef) Defines the next step to which the workflow should transition to.The step is identified by a method reference that accepts an input parameter.
- Type Parameters:
W- The workflow type containing the step methodI- The input parameter type for the step- Parameters:
methodRef- Reference to the step method- Returns:
- A builder to provide the input parameter
-
thenEnd
Workflow.StepEffect thenEnd()Finish the workflow execution. After transition toend, no more transitions are allowed. -
thenEnd
Finish the workflow execution with a reason description. After transition toend, no more transitions are allowed. -
thenDelete
Workflow.StepEffect thenDelete()Finish and delete the workflow execution. After transition todelete, no more transitions are allowed. The actual workflow state deletion is done with a configurable delay to allow downstream consumers to observe that fact. -
thenDelete
Finish and delete the workflow execution with a reason description. After transition todelete, no more transitions are allowed. The actual workflow state deletion is done with a configurable delay to allow downstream consumers to observe that fact.
-