Skip to main content

Module flow

Module flow 

Source
Expand description

Flow definition types and programmatic builder API.

Types are re-exported from stepflow_flow — the canonical definitions shared with the orchestrator. The FlowBuilder provides a convenient API for constructing flows programmatically.

§Quick start

use stepflow_client::{FlowBuilder, ValueExpr};
use stepflow_flow::values::JsonPath;

let mut builder = FlowBuilder::new();
builder.add_step(
    "say_hello",
    "/builtin/eval",
    ValueExpr::object(vec![("message".to_string(), ValueExpr::workflow_input(JsonPath::parse("$.name").unwrap()))]),
);
let flow = builder
    .output(ValueExpr::step_output("say_hello"))
    .build()
    .unwrap();

let json = serde_json::to_value(&flow).unwrap();

Structs§

Component
Identifies a specific plugin and atomic functionality to execute.
ExampleInput
An example input for a workflow that can be used in UI dropdowns.
Flow
A workflow consisting of a sequence of steps and their outputs.
FlowBuilder
Programmatically build a Flow definition.
FlowRef
A wrapper around Arc<Flow> to support poem-openapi traits.
FlowSchema
Consolidated schema information for a flow.
JsonPath
A JSON path represented as a sequence of path parts. This type serializes and deserializes as a string but internally maintains a structured representation for efficient processing.
Step
A step in a workflow that executes a component with specific arguments.
TestCase
A single test case for a workflow.
TestConfig
Configuration for testing a workflow.
ValueRef
A literal value which may be passed to a component.

Enums§

ErrorAction
Error action determines what happens when a step fails.
ValueExpr
A value expression that can contain literal data or references to other values.