backbone_core/workflow/mod.rs
1//! The workflow engine: declared `schema/workflows` that run.
2//!
3//! A workflow with `config.executor: engine` is an event-started process manager. The schema
4//! generator compiles its steps into a [`WorkflowSpec`] (data, with its conditions and templates
5//! as [`expr`] trees) beside a [`WorkflowDefinition`] that performs what only typed code can; the
6//! [`WorkflowEngine`] runs the spec over Postgres: a persisted instance and step log, durable
7//! waits, timers, retries, compensation, and a deadline.
8//!
9//! - [`expr`]: the closed expression set, and the evaluator.
10//! - [`spec`]: the compiled workflow and the definition trait.
11//! - [`schema`]: the tables, as SQL.
12//! - `engine` (feature `postgres`): the engine itself.
13//!
14//! This module supersedes [`crate::flow`], the in-memory instance and executor shell nothing used.
15
16pub mod expr;
17pub mod schema;
18pub mod spec;
19
20#[cfg(feature = "postgres")]
21pub mod engine;
22
23pub use expr::{Dur, Expr, Funcs, NoFuncs, Scope, Template, Tpl};
24pub use spec::{Call, StepKind, StepSpec, WorkflowDefinition, WorkflowSpec};
25
26#[cfg(feature = "postgres")]
27pub use engine::{
28 BackgroundTasks, EngineConfig, EventReport, InstanceRow, StepRow, SweepReport, Tenant,
29 WorkflowEngine, WorkflowError,
30};