Overview
ThenotifyStatusActivity sends real-time status updates to users about the execution status of nodes in a workflow. This activity is used throughout the workflow execution lifecycle to keep users informed of progress.
Purpose
- Notify users when node execution starts
- Update users when nodes complete successfully
- Alert users when nodes fail
- Provide real-time feedback on workflow progress
When it’s executed
This activity is called at three key points:- Workflow start: When a node execution begins (status:
PENDING) - Workflow completion: When a node executes successfully (status:
COMPLETED) - Workflow failure: When a node execution fails (status:
FAILED)
Signature
Inputs
| Parameter | Type | Description |
|---|---|---|
nodes | Record<string, { status: string }> | Object mapping node IDs to their status objects. Each status object contains a status field (PENDING, COMPLETED, or FAILED) |
userId | string | ID of the user to notify |
flowId | string | ID of the flow containing the nodes |
Outputs
Returnsvoid. The activity completes when the notification is successfully sent.
Implementation details
The activity uses theNotificationService to send status updates. It formats the payload and calls the notification service’s sendStatusUpdate method, which handles the actual delivery mechanism (WebSocket, HTTP webhook, etc.).
Example usage in workflow
Status values
| Status | Description | When used |
|---|---|---|
PENDING | Node execution has started | At workflow start |
COMPLETED | Node executed successfully | After successful completion |
FAILED | Node execution encountered an error | When an error occurs |