Skip to main content

Module flow

Module flow 

Source
Expand description

Workflow step and context traits for saga-pattern workflows.

Deprecated. Nothing used these types: an in-memory instance with no persistence, wait, timer or compensation. A workflow a schema declares with config.executor: engine runs through crate::workflow: the generated spec and definition, and a WorkflowEngine over Postgres. This module stays for one minor release so code that names it still builds, and is removed after it.

Phase 0 generic base for the flow.rs generator (Category C).

Every generated {Name}Workflow used to re-define the same structural boilerplate. This module provides the single generic version so that generated files collapse to type aliases:

ⓘ
use backbone_core::flow::{
    FlowError, FlowStatus, FlowInstance, FlowExecutor,
    WorkflowStep, WorkflowContext,
};
use crate::application::workflows::order_processing_workflow::OrderProcessingFlowStep;

pub type OrderProcessingFlowError    = FlowError;
pub type OrderProcessingFlowStatus   = FlowStatus;
pub type OrderProcessingFlowInstance = FlowInstance<OrderProcessingFlowStep>;

pub struct OrderProcessingFlowExecutor<H>(FlowExecutor<H>);
// impl execute_step() — the only unique part — stays in the generated file

Structs§

FlowExecutorDeprecated
Generic executor shell — holds the handler, provides cancel/fail helpers.
FlowInstanceDeprecated
Generic workflow instance parametrised over the step enum S.

Enums§

FlowErrorDeprecated
Common workflow execution error — identical for every workflow.
FlowStatusDeprecated
Workflow execution status — identical for every workflow.

Traits§

WorkflowContextDeprecated
Workflow execution context for an entity E.
WorkflowStepDeprecated
A named step within a workflow.