ironflow-engine
Workflow orchestration engine for ironflow. Supports two workflow styles:
- Static (
WorkflowDef): serializable step sequences, no chaining. - Dynamic (
WorkflowHandler): Rust-native handlers where steps receive aWorkflowContextand can chain outputs.
Both can run inline or be enqueued for a background worker.
Custom operations
Implement Operation to define custom step types
(e.g. GitLab, Gmail, Slack) that integrate into the workflow lifecycle.
Call WorkflowContext::operation()
inside a handler to execute them with full step tracking.
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(())
})
}
}