diff --git a/packages/@n8n/api-types/src/push/execution.ts b/packages/@n8n/api-types/src/push/execution.ts index 78c0b34a36..173f61d654 100644 --- a/packages/@n8n/api-types/src/push/execution.ts +++ b/packages/@n8n/api-types/src/push/execution.ts @@ -12,6 +12,15 @@ type ExecutionStarted = { }; }; +type ExecutionWaiting = { + type: 'executionWaiting'; + data: { + executionId: string; + data: IRun; + retryOf?: string; + }; +}; + type ExecutionFinished = { type: 'executionFinished'; data: { @@ -47,6 +56,7 @@ type NodeExecuteAfter = { export type ExecutionPushMessage = | ExecutionStarted + | ExecutionWaiting | ExecutionFinished | ExecutionRecovered | NodeExecuteBefore diff --git a/packages/cli/src/workflow-execute-additional-data.ts b/packages/cli/src/workflow-execute-additional-data.ts index 2031c4b5da..80b311a423 100644 --- a/packages/cli/src/workflow-execute-additional-data.ts +++ b/packages/cli/src/workflow-execute-additional-data.ts @@ -347,9 +347,11 @@ function hookFunctionsPush(): IWorkflowExecuteHooks { executionId, workflowId, }); - // TODO: Look at this again + + const pushType = + fullRunData.status === 'waiting' ? 'executionWaiting' : 'executionFinished'; pushInstance.send( - 'executionFinished', + pushType, { executionId, data: pushRunData, diff --git a/packages/editor-ui/src/composables/usePushConnection.ts b/packages/editor-ui/src/composables/usePushConnection.ts index ea9f79d27e..76ad7ed97b 100644 --- a/packages/editor-ui/src/composables/usePushConnection.ts +++ b/packages/editor-ui/src/composables/usePushConnection.ts @@ -499,6 +499,8 @@ export function usePushConnection({ router }: { router: ReturnType