Flow Studio
Workflow-Level Events
subscribeToWorkflowStream() provides a filtered view of workflow-wide events — completion, failure, and cancellation. These events drive the Observer Panel's Execution Status tab and trigger cleanup in the client.
subscribeToWorkflowStream()
const { subscribeToWorkflowStream } = useExecutionSignalR(executionId);
subscribeToWorkflowStream((event) => {
if (event.type === 'WorkflowExecutionCompleted') {
designerModeStore.setExecutionComplete(event.status);
observerStore.setStatus(event.status);
// Trigger: disconnect SignalR, show Run Again button
}
});
Workflow-Level Event Types
| Event | When Fired | Key Payload Fields |
|---|---|---|
WorkflowExecutionStarted | Execution begins processing first node | executionId, startedAt, totalNodes |
WorkflowExecutionCompleted | All nodes finish (success path) | status, totalDurationMs, completedAt |
WorkflowExecutionFailed | Unhandled error terminates execution | status, failedNodeId, errorMessage |
WorkflowExecutionCancelled | User clicked Cancel | status, cancelledAt, cancelledBy |
WorkflowExecutionPaused | User clicked Pause | status, pausedAt, pausedNodeId |
WorkflowExecutionResumed | User clicked Resume | status, resumedAt |
WorkflowExecutionProgress | Emitted every N nodes (batch progress) | completedNodeCount, totalNodeCount, percentage |
Client Reaction to WorkflowExecutionCompleted
1
Observer Panel Status Updates
Execution Status tab badge changes to Completed (green) or Failed (red). Duration is finalised.
2
Top Toolbar Updates
Pause and Cancel buttons hide. "Run Again" button appears.
3
SignalR Disconnects
The client leaves the execution group and stops the connection. No more events are expected.