Skip to main content

Crate ironflow_engine

Crate ironflow_engine 

Source
Expand description

§ironflow-engine

Workflow orchestration engine for ironflow. Supports two workflow styles:

Both can run inline or be enqueued for a background worker.

§Dynamic workflow example

use ironflow_engine::prelude::*;
use std::future::Future;
use std::pin::Pin;

struct DeployWorkflow;

impl WorkflowHandler for DeployWorkflow {
    fn name(&self) -> &str { "deploy" }
    fn execute<'a>(&'a self, ctx: &'a mut WorkflowContext) -> HandlerFuture<'a> {
        Box::pin(async move {
            let build = ctx.shell("build", ShellConfig::new("cargo build")).await?;
            ctx.agent("review", AgentStepConfig::new(
                &format!("Review: {}", build.output["stdout"])
            )).await?;
            Ok(())
        })
    }
}

Modules§

config
Serializable step configurations — one per operation type.
context
WorkflowContext — execution context for dynamic workflows.
engine
The core Engine — orchestrates workflow execution and persistence.
error
Engine error types.
executor
Step executor — reconstructs operations from configs and runs them.
fsm
Finite State Machines for workflow run and step lifecycles.
handler
WorkflowHandler trait — dynamic workflows with context chaining.
prelude
Convenience re-exports.
workflow
Workflow definition and builder.