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§
- Briefing
Budget - How much of a workflow’s guidance reaches the model, per case.
- Confirmation
Subject - What a confirmation the policy engine raised is about, in the domain’s own words.
- Domain
Enumeration - Every value one subject accepts, and nothing else.
- Enumerated
Value - One value a field accepts, as the workflow names it to a user.
- Interaction
Requirement - What a user-owned phase requires from the user (I6).
- Obligation
Act - The act that answers an obligation: its operation, the values the obligation fixes, and the values the answer gives.
- Obligation
Id - Stable identifier of an obligation: the canonical JSON of its value.
- Question
Reference - A field or concept a question may be about, as a workflow names it:
proposed.company.registered_address. - Start
Precondition - What must already be true of another case before this workflow may be started.
- State
Field - One value a case holds, as the stage that ANSWERS may state it.
- Workflow
Notice - An informational, non-blocking element of a view.
- Workflow
View - The pure projection of a case (spec §8.1).
Enums§
- Phase
Ownership - Who must act for the case to leave its current phase.
- Start
Behaviour - What starting this workflow means when the account already has a case of it.
- Writing
Stage - Which of the two writing stages a briefing is addressed to.
Traits§
- Case
Loader - The read-only half of
WorkflowExecutor: loading a case, and nothing else (spec §8.2). - Workflow
Definition - A workflow: pure projection plus deterministic compilation and policy (spec §8.2).
- Workflow
Executor - Loads and mutates cases of one workflow (spec §8.2).
Type Aliases§
- ViewOf
- Shorthand for the view type of a definition.