Expand description
§Actflow
Actflow is a lightweight, event-driven workflow engine written in Rust. It is designed to be embedded in applications to orchestrate complex business logic.
§Core Features
- Event-Driven Architecture: Built on a robust event bus for high decoupling and scalability
- Async Execution: Powered by
tokiofor high-concurrency workflow execution - Pluggable Storage: Supports in-memory storage (testing) and PostgreSQL (production)
- Flexible Workflow Definition: Define workflows using JSON with various node types
§Quick Start
ⓘ
use actflow::{EngineBuilder, WorkflowModel};
let engine = EngineBuilder::new().build().unwrap();
engine.launch();
// Deploy and run workflow
let workflow = WorkflowModel::from_json(json_str)?;
engine.deploy(&workflow)?;
let process = engine.build_process(&workflow.id)?;
engine.run_process(process)?;Structs§
- Channel
Event - Builder for registering event handlers with filtering.
- Channel
Options - Options for filtering events by process ID and node ID.
- Edge
Model - Represents a directed edge connecting two nodes in a workflow.
- Engine
- The main workflow engine.
- Engine
Builder - Event
- Generic event wrapper.
- Log
- Log entry emitted during node execution.
- Message
- Event message containing process and node context.
- Node
Model - Represents a node in a workflow definition.
- Workflow
Aborted Event - Event emitted when a workflow is aborted.
- Workflow
Failed Event - Event emitted when a workflow fails.
- Workflow
Model - Represents a complete workflow definition.
- Workflow
Paused Event - Event emitted when a workflow is paused.
- Workflow
Start Event - Event emitted when a workflow starts.
Enums§
- Actflow
Error - Unified error type for all Actflow operations.
- Error
Reason - Reason for a node execution error.
- Graph
Event - Top-level event type for workflow graph events.
- Node
Event - Events emitted during node execution.
- Workflow
Event - Events emitted during workflow execution.
Type Aliases§
- Result
- Result type alias for Actflow operations.