Skip to main content

Module flow

Module flow 

Source
Expand description

Workflow step and context traits for saga-pattern workflows.

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§

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

Enums§

FlowError
Common workflow execution error — identical for every workflow.
FlowStatus
Workflow execution status — identical for every workflow.

Traits§

WorkflowContext
Workflow execution context for an entity E.
WorkflowStep
A named step within a workflow.