#[workflow]Expand description
Define a workflow as a module containing #[task] functions.
Applied to a pub mod containing #[task] functions. Auto-discovers tasks,
validates dependencies, and generates registration code based on delivery mode:
- Embedded (default):
inventory::submit!auto-registration consumed bycloacina::Runtime::seed_from_inventory - Packaged (
features = ["packaged"]): FFI exports for.cloacinapackages
§Example
ⓘ
#[workflow(name = "my_pipeline", description = "Process data")]
pub mod my_pipeline {
use super::*;
#[task(id = "fetch", dependencies = [])]
pub async fn fetch(ctx: &mut Context<Value>) -> Result<(), TaskError> { Ok(()) }
#[task(id = "process", dependencies = ["fetch"])]
pub async fn process(ctx: &mut Context<Value>) -> Result<(), TaskError> { Ok(()) }
}