Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 17 additions & 4 deletions crates/mofa-foundation/src/workflow/execution_event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,24 @@ pub enum ExecutionEvent {
total_duration_ms: u64,
},

/// Checkpoint created during workflow execution
CheckpointCreated {
label: String,
/// Workflow execution paused (e.g., waiting for human input)
WorkflowPaused {
workflow_id: String,
node_id: String,
reason: String,
paused_at: u64,
},

/// Workflow execution resumed after pause/checkpoint
WorkflowResumed {
workflow_id: String,
resumed_from: String,
resumed_at: u64,
},

/// Checkpoint created during workflow execution
CheckpointCreated { label: String },

/// Retry attempt for a node
NodeRetrying {
node_id: String,
Expand Down Expand Up @@ -245,7 +258,7 @@ mod tests {

let envelope = ExecutionEventEnvelope::new(event);
let serialized = serde_json::to_string_pretty(&envelope).unwrap();

assert!(serialized.contains("WorkflowCompleted"));
assert!(serialized.contains("schema_version"));
}
Expand Down
Loading
Loading