Package kalix.javasdk.workflow
Class ProtoWorkflow<S extends com.google.protobuf.GeneratedMessageV3>
Object
kalix.javasdk.workflow.AbstractWorkflow<S>
kalix.javasdk.workflow.ProtoWorkflow<S>
- Type Parameters:
S
- The type of the state for this workflow.
@ApiMayChange
public abstract class ProtoWorkflow<S extends com.google.protobuf.GeneratedMessageV3>
extends AbstractWorkflow<S>
Workflows are stateful components and are defined by a set of steps and transitions between them.
You can use workflows to implement business processes that span multiple services.
When implementing a workflow, you define a state type and a set of steps. Each step defines a call to be executed and the transition to the next step based on the result of the call. The workflow state can be updated after each successful step execution.
Kalix keeps track of the state of the workflow and the current step. If the workflow is stopped for any reason, it can be resumed from the last known state and step.
Workflow methods that handle incoming commands should return an AbstractWorkflow.Effect
describing the
next processing actions.
-
Nested Class Summary
Nested classes/interfaces inherited from class kalix.javasdk.workflow.AbstractWorkflow
AbstractWorkflow.AsyncCallStep<CallInput,
CallOutput, FailoverInput>, AbstractWorkflow.CallStep<CallInput, DefCallInput, DefCallOutput, FailoverInput>, AbstractWorkflow.Effect<T>, AbstractWorkflow.RecoverStrategy<T>, AbstractWorkflow.Step, AbstractWorkflow.StepConfig, AbstractWorkflow.WorkflowDef<S> -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionStart a step definition with a given step name.Methods inherited from class kalix.javasdk.workflow.AbstractWorkflow
_internalSetCommandContext, _internalSetCurrentState, _internalSetTimerScheduler, commandContext, currentState, definition, effects, emptyState, maxRetries, timers, workflow
-
Constructor Details
-
ProtoWorkflow
public ProtoWorkflow()
-
-
Method Details
-
step
Start a step definition with a given step name.- Parameters:
name
- Step name.- Returns:
- Step builder.
-