Overview
ThenodeExecutionErrorActivity updates the node’s data in the database with execution status information when an error occurs. This ensures that node state reflects the execution failure.
Purpose
- Update node state with error information
- Persist execution status in node data
- Enable error recovery and retry logic
- Maintain node state consistency
When it’s executed
This activity is called during error handling:- On workflow failure: When an error occurs during node execution
- After error logging: Typically called after logging the error
- Before status notification: Executes before notifying users of the failure
Signature
Inputs
| Parameter | Type | Description |
|---|---|---|
nodeId | string | ID of the node that encountered an error |
nodeData | any | Current node data object to update |
executionStatus | string | Execution status string (typically "FAILED") |
Outputs
Returnsvoid. The activity completes when the node data is successfully updated.
Implementation details
The activity updates theflows_nodes table, merging the execution status into the node’s data JSON field:
executionStatus into the existing nodeData object, preserving other node configuration while adding the error status.
Example usage in workflow
Execution status values
| Status | Description | When used |
|---|---|---|
FAILED | Node execution failed | When an error occurs during execution |
PENDING | Node execution pending | Not typically used by this activity |
COMPLETED | Node execution completed | Not typically used by this activity |
Data structure
The activity merges the execution status into the node data:Error handling
The activity may throw an error if:- Database connection fails
- The update query fails
- The node ID doesn’t exist
- JSON serialization fails
Integration with error flow
This activity is part of the error handling sequence:Log error
generateExecutionLogsActivity creates an error log entryNotify user
notifyStatusActivity sends failure notification