🐛 Fix issue with nodes not getting executed #1351

This commit is contained in:
Jan Oberhauser
2021-01-19 08:47:02 +01:00
parent 4077cabb52
commit 1b8229161d
3 changed files with 856 additions and 6 deletions

View File

@@ -714,7 +714,7 @@ export class WorkflowExecute {
if (workflow.connectionsBySourceNode.hasOwnProperty(executionNode.name)) {
if (workflow.connectionsBySourceNode[executionNode.name].hasOwnProperty('main')) {
let outputIndex: string, connectionData: IConnection;
// Go over all the different
// Iterate over all the outputs
// Add the nodes to be executed
for (outputIndex in workflow.connectionsBySourceNode[executionNode.name]['main']) {
@@ -722,14 +722,14 @@ export class WorkflowExecute {
continue;
}
// Go through all the different outputs of this connection
// Iterate over all the different connections of this output
for (connectionData of workflow.connectionsBySourceNode[executionNode.name]['main'][outputIndex]) {
if (!workflow.nodes.hasOwnProperty(connectionData.node)) {
return Promise.reject(new Error(`The node "${executionNode.name}" connects to not found node "${connectionData.node}"`));
}
if (nodeSuccessData![outputIndex]) {
// Add the node only if it did execute
if (nodeSuccessData![outputIndex] && (nodeSuccessData![outputIndex].length !== 0 || connectionData.index > 0)) {
// Add the node only if it did execute or if connected to second "optional" input
this.addNodeToBeExecuted(workflow, connectionData, parseInt(outputIndex, 10), executionNode.name, nodeSuccessData!, runIndex);
}
}