Expand description
Pure domain model and shared vocabulary for Aion durable workflows.
This leaf crate defines the stable identifiers, payload carrier, history events, workflow filters, schedule settings, search attributes, statuses, and error taxonomy used by every other Aion component.
§Example
use aion_core::{Payload, WorkflowId};
use serde_json::json;
let workflow_id = WorkflowId::new_v4();
let payload = Payload::from_json(&json!({ "workflow_id": workflow_id.to_string() }))?;
assert_eq!(payload.to_json()?["workflow_id"], workflow_id.to_string());Re-exports§
pub use error::ActivityError;pub use error::ActivityErrorKind;pub use error::WorkflowError;pub use event::Event;pub use event::EventEnvelope;pub use event::WithTimeoutOutcome;pub use filter::WorkflowFilter;pub use filter::WorkflowSummary;pub use ids::ActivityId;pub use ids::IdError;pub use ids::PackageVersion;pub use ids::RunId;pub use ids::TimerId;pub use ids::WorkflowId;pub use payload::ContentType;pub use payload::Payload;pub use payload::PayloadError;pub use schedule::CatchUpPolicy;pub use schedule::OverlapPolicy;pub use schedule::ScheduleConfig;pub use schedule::ScheduleId;pub use schedule::TriggerSpec;pub use search::SearchAttributeError;pub use search::SearchAttributeSchema;pub use search::SearchAttributeType;pub use search::SearchAttributeValue;pub use search::search_attributes_from_events;pub use status::WorkflowStatus;pub use status::status_from_events;
Modules§
- error
- Error types shared by workflow engines, callers, and activities. Error types shared by workflow and activity histories.
- event
- Durable workflow history events and envelopes. Workflow history events and their deterministic recording envelope.
- filter
- Workflow visibility filters and summaries. Workflow query filters and lightweight workflow summaries.
- ids
- Strongly typed identifiers for workflows, runs, activities, timers, and schedules. Strongly typed identifiers for workflows, activities, timers, and runs.
- payload
- Type-erased payload bytes with explicit content-type metadata. Opaque serialized payloads carried through histories and errors.
- schedule
- Schedule configuration, trigger, and catch-up policy models. Schedule identifiers, trigger specifications, and persisted schedule configuration.
- search
- Search-attribute schemas and values used by visibility queries. Typed search attributes used by workflow visibility projections.
- status
- Workflow lifecycle status derivation. Workflow status projection from authoritative event history.