🐛 Fix issue part-workflow execution wait-node being the last

This commit is contained in:
Jan Oberhauser 2021-10-06 11:51:58 -05:00
parent 582f9a1e61
commit 3195e997ba

View file

@ -918,6 +918,19 @@ export class WorkflowExecute {
this.runExecutionData.resultData.runData[executionNode.name].push(taskData);
if (this.runExecutionData.waitTill!) {
await this.executeHook('nodeExecuteAfter', [
executionNode.name,
taskData,
this.runExecutionData,
]);
// Add the node back to the stack that the workflow can start to execute again from that node
this.runExecutionData.executionData!.nodeExecutionStack.unshift(executionData);
break;
}
if (
this.runExecutionData.startData &&
this.runExecutionData.startData.destinationNode &&
@ -935,19 +948,6 @@ export class WorkflowExecute {
continue;
}
if (this.runExecutionData.waitTill!) {
await this.executeHook('nodeExecuteAfter', [
executionNode.name,
taskData,
this.runExecutionData,
]);
// Add the node back to the stack that the workflow can start to execute again from that node
this.runExecutionData.executionData!.nodeExecutionStack.unshift(executionData);
break;
}
// Add the nodes to which the current node has an output connection to that they can
// be executed next
if (workflow.connectionsBySourceNode.hasOwnProperty(executionNode.name)) {