# 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](/guide/persistence.md) technology like Postgres. Because the state is stored locally it means any node can consume the state and decide which step should happen next.

&#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://bus.node-ts.com/guide/workflows.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
