pub struct ActivityDispatch {
pub namespace: String,
pub task_queue: String,
pub node: Option<String>,
pub workflow_id: WorkflowId,
pub activity_id: ActivityId,
pub name: String,
pub input: String,
pub config: String,
pub attempt: u32,
pub labels: BTreeMap<String, String>,
}Expand description
A fully-resolved activity dispatch crossing the engine→transport seam.
The engine builds this once the durability layer has assigned the
activity its ordinal, so it carries the real owning WorkflowId and
the real per-workflow ActivityId recorded in history — not a
transport-fabricated correlation token. A worker that logs these ids can
therefore be correlated directly against the event store, and a result
re-reported from a previous worker session keys to the exact execution it
belongs to.
input and config are the JSON strings the Gleam SDK sends through the
aion_flow_ffi:dispatch_activity/3 binding; attempt is the one-based
delivery attempt the engine stamps onto the transport (the worker wire’s
ActivityTask.attempt), so consumers distinguish retries without guessing.
Fields§
§namespace: StringNamespace selected for worker matching — the correctness/isolation boundary the activity may dispatch within.
task_queue: StringTask queue (pool/flavour) selected within the namespace. The worker-pool
address is (namespace, task_queue). There is no workflow-level
selection yet, so the engine seam stamps the named "default" pool until
the Gleam SDK selection (NSTQ-4) lands.
node: Option<String>OPTIONAL node affinity (NODE-4): the concrete worker host this dispatch is
pinned to within the (namespace, task_queue) pool. None = no affinity
(any worker in the pool). Resolved once at the schedule seam from the
SDK’s per-activity node selection; there is no workflow-level default.
workflow_id: WorkflowIdReal owning workflow id, recorded in history at WorkflowStarted.
activity_id: ActivityIdReal per-workflow activity ordinal, recorded at ActivityScheduled.
name: StringRegistered activity-type name to match against worker registrations.
input: StringJSON-encoded activity input.
config: StringJSON-encoded dispatch config (retry/timeout/heartbeat policy).
attempt: u32One-based delivery attempt for this dispatch.
labels: BTreeMap<String, String>Human-meaningful display labels the workflow attached to the activity
(for example brief=IP-001, repo=ablative-io/yggdrasil). The engine
never interprets these; they ride to the worker purely so its logs and
the ops console can show what a dispatch is working on. BTreeMap keeps
the rendered order stable.
Trait Implementations§
Source§impl Clone for ActivityDispatch
impl Clone for ActivityDispatch
Source§fn clone(&self) -> ActivityDispatch
fn clone(&self) -> ActivityDispatch
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more