1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
//! Transport-agnostic Aion workflow engine with durability, replay, timers, and supervision.
//!
//! The engine embeds beamr, loads `.aion` packages, owns workflow lifecycle and
//! process residency, records and replays durable history, and exposes seams for
//! activities, events, signals, queries, and server transports.
//!
//! # Example
//!
//! ```no_run
//! # async fn example() -> Result<(), Box<dyn std::error::Error>> {
//! use std::sync::Arc;
//!
//! use aion::EngineBuilder;
//! use aion_store::{EventStore, InMemoryStore};
//!
//! let store: Arc<dyn EventStore> = Arc::new(InMemoryStore::default());
//! let engine = EngineBuilder::new()
//! .store_arc(store)
//! .in_memory_visibility()
//! .build()
//! .await?;
//! # let _ = engine;
//! # Ok(())
//! # }
//! ```
//!
//! # Cargo features
//!
//! - `beamr_query_reentry_fixed` (off by default): compiles the
//! batch-orchestrator example e2e tests (`tests/example_query_reentry.rs`)
//! that drive live queries through the Gleam SDK's query pump while a
//! parent is parked in `child.await`. The engine-side query protocol is
//! fully functional, but the example's child-result decode path hit
//! beamr 0.4.9 VM gaps in `gleam_json`/`gleam_stdlib`; enable the feature
//! once the upstream beamr fixes land and the pin is bumped.
//!
//! NOTE: the crate is now pinned to beamr 0.6.4. The gap this gate guards
//! against was identified on 0.4.9 and may have been fixed upstream, so the
//! gate needs re-validation against 0.6.4 and may now be stale.
/// Activity dispatch bridge and error propagation helpers.
/// Child-workflow spawn support.
/// Durable command recording, replay, and recovery support.
/// Engine builder, runtime APIs, and delegated seams.
/// Handle type exposed by embedded engine seams.
/// Engine and routing error types.
/// Workflow lifecycle start, transition, visibility, and termination helpers.
/// `.aion` package loading into runtime modules.
/// Live event publication: publish-after-commit store wrapper and publisher.
/// Query dispatch services and mailbox support.
/// Active workflow registry and handle residency tracking.
/// BEAM runtime configuration, handles, NIFs, and workflow process support.
/// Schedule evaluation and cron parsing support.
/// Signal routing and resume handoff support.
/// Supervision tree models for engines, workflow types, and workflow instances.
/// Timer creation, recovery, and wake-up services.
pub use ;
pub use ActiveWorkflowRecoverySeamImpl;
pub use ;
pub use EngineHandle;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;