---
title: "Flow"
description: "For the Flow concept, read Flow."
canonical_url: "https://docs.superdurable.io/reference/rust/flow/"
source: "docs/reference/rust/flow.mdx"
locale: "en"
---

# Flow

For the Flow concept, read [Flow](https://docs.superdurable.io/concepts/flow.md).

<a id="flow-definition"></a>

## Flow definition

A Flow registers its Steps, its persistence schema, and its RPC handlers.

- **steps** registers one start Step and every other Step type the Flow
  can move to through a Step decision. The start Step input type is also the
  Flow start input type. An empty Step list, or one without a start Step, is
  valid when only RPCs drive the Flow. Those RPCs can later move it into Steps.
- The persistence schema lists every Attribute and Channel used from Steps or
  RPCs. Dex rejects reads and writes to names that are not declared.
- Return an **RpcList** from **rpcs** to bind RPC definitions to handlers.
  **Rpc::new** declares the durable RPC name explicitly.

The Flow type defaults to the Rust type name of the Flow, and the Step type to
the Rust type name of the Step. Implement **flow_type** or **step_type** to set
another name.

<a id="flow-config"></a>

## FlowConfig

**FlowConfig** holds Flow settings that you can change after the Flow starts.
**StartFlowOptions** cannot change after start.

To change the initial configuration of one Flow, set **ConfigOverride** in
**StartFlowOptions**. Dex applies only the fields you set, over the Dex Server
defaults. Omitted fields keep their default values.

| Field                    | Behavior                                                                                                                                                                                                                                                          |
| ------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **ActiveStepSearchMode** | Which active Steps Dex indexes for search: every active Step, only Steps that ran **WaitFor**, or none. The built-in server default indexes none. Set a mode to opt in.                                                                                           |
| **StepDurability**       | Default durability for methods without a Step override. Dex resolves a method override first, then this value, then **SYNC**. Dex fixes the durability of a method call when the call becomes pending, so a change affects only method calls scheduled afterward. |
| **AttributeStoreNames**  | Dex Server Attribute Stores for Attributes that opt in to Attribute sync.                                                                                                                                                                                         |

<a id="update-flow-config-with-a-client"></a>

### Update FlowConfig with a Client

Call **update_flow_config** while the Flow is active. Send only the fields
you want to change. Dex merges them into the existing configuration. This call
does not change which Workers serve the Flow.
