pub struct AuditTrail {
pub workflow_id: Arc<str>,
pub task_id: Arc<str>,
pub timestamp: DateTime<Utc>,
pub changes: Vec<Change>,
pub status: usize,
pub loop_counter: Option<i64>,
pub element_index: Option<usize>,
}Fields§
§workflow_id: Arc<str>§task_id: Arc<str>§timestamp: DateTime<Utc>§changes: Vec<Change>§status: usize§loop_counter: Option<i64>Loop counter value for the sweep that produced this entry, for
workflows carrying a crate::engine::workflow::LoopConfig; None
otherwise.
The counter rather than a sweep ordinal: increment >= 1 makes it
strictly increasing, so it identifies the iteration and carries the
business meaning — in the per-item pattern it is the array index this
entry refers to. Recorded even when the loop leaves its counter
unnamed, since the engine tracks the value either way.
Skipped when None, so a non-looping workflow’s audit JSON is
byte-identical to what it was before loops existed.
element_index: Option<usize>Index of the element this entry records, for a task carrying a
crate::engine::for_each::ForEach; None otherwise. A fan-out
records one entry per element, in element order.
Also None on the single entry an empty or unevaluable over
records, since no element was involved. Skipped when None, so an
ordinary task’s audit JSON is unchanged.