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 activity_event::ActivityEvent;pub use activity_event::ActivityEventKind;pub use activity_event::MessageRole;pub use activity_event::ProgressDetail;pub use activity_event::StopKind;pub use cluster_event::ClusterCommand;pub use cluster_event::ClusterEvent;pub use cluster_event::ClusterEventMeta;pub use cluster_event::ClusterPeer;pub use cluster_event::ClusterShard;pub use cluster_event::ClusterSnapshot;pub use cluster_event::ClusterStreamError;pub use cluster_event::ClusterWorker;pub use cluster_event::NamespacePlacementWire;pub use cluster_event::WorkerDeathReason;pub use cluster_event::WorkerTransport;pub use describe::DescribeWorkflowResponse;pub use error::ActivityError;pub use error::ActivityErrorKind;pub use error::WorkflowError;pub use event::DEFAULT_TASK_QUEUE;pub use event::Event;pub use event::EventEnvelope;pub use event::START_TIME_TASK_QUEUE_ATTRIBUTE;pub use event::TimerCancelCause;pub use event::WithTimeoutOutcome;pub use event::start_time_task_queue;pub use filter::WorkflowFilter;pub use filter::WorkflowSummary;pub use filter::failure_projection;pub use ids::ActivityId;pub use ids::IdError;pub use ids::PackageVersion;pub use ids::RunId;pub use ids::TimerId;pub use ids::TimerIdKind;pub use ids::WorkflowId;pub use intervention::ApprovalDecision;pub use intervention::InjectPriority;pub use intervention::InterventionCapabilities;pub use intervention::InterventionCommand;pub use intervention::InterventionKind;pub use intervention::InterventionOutcome;pub use intervention::InterventionPrimitive;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::current_lease_terminal;pub use status::run_segment;pub use status::status_from_events;
Modules§
- activity_
event - Agent-observability transcript events for the ops console real-time channel.
The
ActivityEventenvelope for the agent-observability real-time channel. - cluster_
event - Cluster topology and ownership events for the ops console real-time channel (WS3). Cluster topology and ownership events for the ops console real-time channel (WS3).
- describe
- Describe-workflow response projection (summary + event history). Describe-workflow response projection.
- 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.
- intervention
- Harness-neutral mid-run intervention commands for the ops console control channel.
The
InterventionCommandtype — the harness-neutral mid-run control vocabulary. - 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.