Class Workflow<S>

Object
kalix.javasdk.workflow.AbstractWorkflow<S>
kalix.javasdk.workflow.Workflow<S>
Type Parameters:
S - The type of the state for this workflow.

@ApiMayChange public abstract class Workflow<S> 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.

  • Constructor Details

    • Workflow

      public Workflow()
  • Method Details

    • step

      public StepBuilder step(String name)
      Start a step definition with a given step name.
      Parameters:
      name - Step name.
      Returns:
      Step builder.