Skip to content

3. Runtimes

Mikołaj Milewski edited this page Nov 12, 2026 · 1 revision

Runtimes

Stateflows is built on the actor model. Every host must configure exactly one runtime to host behaviors and provide execution, event delivery, and scheduling; registering Stateflows services and behavior definitions alone does not start them.

Available runtimes

Runtime Availability Guide Source
Legacy Included in the core package today; in-process and scheduled for removal. Enable explicitly with AddLegacyRuntime(). Installation Registration source
Microsoft Orleans Supported distributed runtime; recommended for new deployments and intended to be the remaining runtime after Legacy is removed. Install Stateflows.Runtimes.Orleans and configure it with AddStateflowsRuntime(). Orleans Runtime guide Project source

Configure one runtime for each host; do not register both Legacy and Orleans in the same host. The Legacy runtime remains available during the transition, but it is not a reason to omit runtime configuration. New applications should use Orleans to avoid depending on the runtime scheduled for removal.

Orleans also supports Activity streaming: nonblocking token admission into one live Activity network, with ordered regular transactions and explicit checkpoints. This is selective interleaving with weaker streaming isolation/durability, not the default run-to-completion actor turn. The Legacy runtime rejects streaming and standalone Activity checkpoints.

Clone this wiki locally