Reactor Subscriptions
Reactor-triggered workflow subscriptions — DB-backed event log + fan-out.
Implements the data layer for CLOACI-I-0100. Two tables:
reactor_firings— append-only log written by the reactor runtime on every fire. Each row carries the same boundary cache the in-process CG traversal consumed.reactor_trigger_subscriptions— one row per (reactor, workflow, tenant) tuple. The poller advanceslast_seen_fired_atas it dispatches workflows from new firings. Watermark advance is the at-least-once contract: if the dispatcher crashes between dispatch and watermark advance, the next poll re-dispatches. Workflow idempotency is the user’s concern (same as cron-triggered workflows).
pub
Derives: Debug, Clone, Queryable
One reactor firing event. Carries the boundary cache payload the in-process CG traversal consumed; subscribers receive the same data as their workflow’s input context.
| Name | Type | Description |
|---|---|---|
id |
UniversalUuid |
|
reactor_name |
String |
|
tenant_id |
String |
|
payload |
Option < UniversalBinary > |
|
fired_at |
UniversalTimestamp |
|
created_at |
UniversalTimestamp |
pub
Derives: Debug, Clone, Queryable
One subscription binding a workflow to a reactor’s firings.
| Name | Type | Description |
|---|---|---|
id |
UniversalUuid |
|
reactor_name |
String |
|
workflow_name |
String |
|
tenant_id |
String |
|
enabled |
UniversalBool |
|
last_seen_fired_at |
Option < UniversalTimestamp > |
|
created_at |
UniversalTimestamp |
|
updated_at |
UniversalTimestamp |
|
predicate_expression |
Option < String > |
CLOACI-T-0602 — optional CEL filter expression. When Some, the |
| scheduler evaluates it against the firing payload before dispatch; | ||
Some(_) && false means “skip + advance watermark”. None |
||
| preserves the original unfiltered behavior (fire on every firing). |
pub
Derives: Clone
Data access layer for reactor subscriptions + firings.
| Name | Type | Description |
|---|---|---|
dal |
& 'a DAL |