Workflows

Modeling long-running business processes in distributed systems is challenging. Kalix Workflows are high-level descriptions to easily align business requirements with their implementation in code. Workflows simplify orchestration across multiple services with support for failure scenarios and compensating actions, resulting in ease of implementation and increased developer efficiency. Business transactions can be modeled in one central place, and the Kalix Workflow will keep them running smoothly, or roll back if something goes wrong.

Workflows are stateful, durable and have the same consistency guarantees as Kalix Entities. They work seamlessly with other Kalix components like Entities, Actions and Timers. Kalix Workflows can also start other workflows. A child workflow acts as an independent workflow.

Kalix Workflow features

Step Definition

Developers can define the step of a Workflow to be a call to another Kalix component or any other external service. When the call completes, it may update the current workflow state and transition to the next step.

Global Retry

Workflows can have a global retry strategy with a number of retries and a failover step to be executed in case of failure.

Global Timeouts

Workflows not completed by the defined timeout will fail.

Step Retry and Timeouts

Timeouts and Retries are also supported at the level of each step of a workflow.

Pausing Workflows

Workflows can be paused at the end of a step instead of transitioning to another step. This is beneficial when the workflow reaches a point that requires some extra input from another system, a human operator or a scheduled Kalix Timer call.

Saga Patterns and orchestration

Kalix Workflows are based on Saga Patterns, and Kalix supports both choreography-based and orchestrator-based Saga Patterns. Workflows being the support for orchestrator-based Saga Patterns.

Further reading

For more details on how to implement Kalix Workflows, check out the documentation here.