diff --git a/packages/core/src/WorkflowExecute.ts b/packages/core/src/WorkflowExecute.ts index b25275f96f..5600bad445 100644 --- a/packages/core/src/WorkflowExecute.ts +++ b/packages/core/src/WorkflowExecute.ts @@ -192,6 +192,9 @@ export class WorkflowExecute { for (const connections of incomingNodeConnections.main) { for (let inputIndex = 0; inputIndex < connections.length; inputIndex++) { connection = connections[inputIndex]; + + if (workflow.getNode(connection.node)?.disabled) continue; + incomingData.push( // eslint-disable-next-line @typescript-eslint/no-non-null-assertion runData[connection.node][runIndex].data![connection.type][connection.index]!, @@ -257,7 +260,10 @@ export class WorkflowExecute { // Only run the parent nodes and no others let runNodeFilter: string[] | undefined; // eslint-disable-next-line prefer-const - runNodeFilter = workflow.getParentNodes(destinationNode); + runNodeFilter = workflow + .getParentNodes(destinationNode) + .filter((parentNodeName) => !workflow.getNode(parentNodeName)?.disabled); + runNodeFilter.push(destinationNode); this.runExecutionData = { diff --git a/packages/editor-ui/src/components/mixins/workflowRun.ts b/packages/editor-ui/src/components/mixins/workflowRun.ts index a85a1c2fc7..49cbbb35ea 100644 --- a/packages/editor-ui/src/components/mixins/workflowRun.ts +++ b/packages/editor-ui/src/components/mixins/workflowRun.ts @@ -151,7 +151,9 @@ export const workflowRun = mixins( // node for each of the branches const parentNodes = workflow.getParentNodes(directParentNode, 'main'); - // Add also the direct parent to be checked + // Add also the enabled direct parent to be checked + if (workflow.nodes[directParentNode].disabled) continue; + parentNodes.push(directParentNode); for (const parentNode of parentNodes) {