From 5d73b6e48aef2b0b386369b7d1f208845f912da5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Ovejero?= Date: Tue, 8 Nov 2022 09:40:05 +0100 Subject: [PATCH] fix(core): Fix manual execution of pinned trigger on main mode (#4535) :bug: Fix manual execution of pinned trigger on main mode --- packages/cli/src/WorkflowRunner.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/cli/src/WorkflowRunner.ts b/packages/cli/src/WorkflowRunner.ts index d0197608a4..a52d12b726 100644 --- a/packages/cli/src/WorkflowRunner.ts +++ b/packages/cli/src/WorkflowRunner.ts @@ -318,11 +318,19 @@ export class WorkflowRunner { Logger.debug(`Execution ID ${executionId} will run executing all nodes.`, { executionId }); // Execute all nodes + let startNode; + if ( + data.startNodes?.length === 1 && + Object.keys(data.pinData ?? {}).includes(data.startNodes[0]) + ) { + startNode = workflow.getNode(data.startNodes[0]) ?? undefined; + } + // Can execute without webhook so go on const workflowExecute = new WorkflowExecute(additionalData, data.executionMode); workflowExecution = workflowExecute.run( workflow, - undefined, + startNode, data.destinationNode, data.pinData, );