Workflows

Workflows help orchestrate processes in a distributed environment. Oftentimes business processes are a series of steps to be taken. Each step is a command that's sent, with the next step being run after the prior one completes.

This can be difficult in a distributed environment as you can't choose which node will receive events to trigger then next command, and so you can't keep the state of the workflow locally.

In @node-ts/bus, the state of a workflow is stored in a persistence technology like Postgres. Because the state is stored locally it means any node can consume the state and decide which step should happen next.

Last updated