Skip to main content

Module flow

Module flow 

Source
Expand description

Flow Map V2: the deterministic workflow projector (spec §8).

A WorkflowDefinition projects persisted state into a WorkflowView: exactly one lifecycle phase, zero or more parameterized obligations, at most one blocking InteractionRequirement, informational notices and an outcome that is present only when the workflow is complete. Projection is pure (I2): same version + same state ⇒ same view, no I/O.

Execution lives in a separate WorkflowExecutor because applications mutate SQL rows, call services or fold event-sourced aggregates.

registry erases the generics at the boundary so the runtime can host several workflows without knowing their concrete types; invariants checks the §8.4 rules on any view.

Re-exports§

pub use crate::command::CommandBatch;
pub use crate::command::CommandPolicy;
pub use crate::event::Commit;
pub use crate::event::CommittedEvent;
pub use crate::event::EventRedaction;
pub use crate::event::OperationalReceipt;
pub use crate::event::ReceiptEvent;
pub use crate::event::RedactedEvent;
pub use invariants::check_erased_view;
pub use invariants::check_view;
pub use registry::CaseLoaderHandle;
pub use registry::ErasedCaseLoader;
pub use registry::ErasedExecutor;
pub use registry::ErasedObligation;
pub use registry::ErasedWorkflow;
pub use registry::ErasedWorkflowView;
pub use registry::RegisteredWorkflow;
pub use registry::TypedWorkflowAdapter;
pub use registry::WorkflowDefinitions;
pub use registry::WorkflowReadRegistry;
pub use registry::WorkflowRegistry;
pub use registry::WorkflowRegistryBuilder;

Modules§

invariants
Projection invariants (spec §8.4).
registry
Type erasure and the workflow registry (spec §8.3).

Structs§

BriefingBudget
How much of a workflow’s guidance reaches the model, per case.
ConfirmationSubject
What a confirmation the policy engine raised is about, in the domain’s own words.
DomainEnumeration
Every value one subject accepts, and nothing else.
EnumeratedValue
One value a field accepts, as the workflow names it to a user.
InteractionRequirement
What a user-owned phase requires from the user (I6).
ObligationAct
The act that answers an obligation: its operation, the values the obligation fixes, and the values the answer gives.
ObligationId
Stable identifier of an obligation: the canonical JSON of its value.
QuestionReference
A field or concept a question may be about, as a workflow names it: proposed.company.registered_address.
StartPrecondition
What must already be true of another case before this workflow may be started.
StateField
One value a case holds, as the stage that ANSWERS may state it.
WorkflowNotice
An informational, non-blocking element of a view.
WorkflowView
The pure projection of a case (spec §8.1).

Enums§

PhaseOwnership
Who must act for the case to leave its current phase.
StartBehaviour
What starting this workflow means when the account already has a case of it.
WritingStage
Which of the two writing stages a briefing is addressed to.

Traits§

CaseLoader
The read-only half of WorkflowExecutor: loading a case, and nothing else (spec §8.2).
WorkflowDefinition
A workflow: pure projection plus deterministic compilation and policy (spec §8.2).
WorkflowExecutor
Loads and mutates cases of one workflow (spec §8.2).

Type Aliases§

ViewOf
Shorthand for the view type of a definition.