diff --git a/packages/cli/src/workflows/workflow-execution.service.ts b/packages/cli/src/workflows/workflow-execution.service.ts index 3b384f4c53..bccd5c1f13 100644 --- a/packages/cli/src/workflows/workflow-execution.service.ts +++ b/packages/cli/src/workflows/workflow-execution.service.ts @@ -147,6 +147,12 @@ export class WorkflowExecutionService { triggerToStartFrom, }; + const hasRunData = (node: INode) => runData !== undefined && !!runData[node.name]; + + if (pinnedTrigger && !hasRunData(pinnedTrigger)) { + data.startNodes = [{ name: pinnedTrigger.name, sourceData: null }]; + } + /** * Historically, manual executions in scaling mode ran in the main process, * so some execution details were never persisted in the database. @@ -160,7 +166,7 @@ export class WorkflowExecutionService { ) { data.executionData = { startData: { - startNodes, + startNodes: data.startNodes, destinationNode, }, resultData: { @@ -176,12 +182,6 @@ export class WorkflowExecutionService { }; } - const hasRunData = (node: INode) => runData !== undefined && !!runData[node.name]; - - if (pinnedTrigger && !hasRunData(pinnedTrigger)) { - data.startNodes = [{ name: pinnedTrigger.name, sourceData: null }]; - } - const executionId = await this.workflowRunner.run(data); return {