Add "alwaysOutputData" option to nodes

This commit is contained in:
Jan Oberhauser
2020-04-12 19:58:30 +02:00
parent dc10f52db3
commit c7024ca454
3 changed files with 26 additions and 0 deletions

View File

@@ -596,6 +596,17 @@ export class WorkflowExecute {
this.runExecutionData.resultData.lastNodeExecuted = executionData.node.name;
nodeSuccessData = await workflow.runNode(executionData.node, executionData.data, this.runExecutionData, runIndex, this.additionalData, NodeExecuteFunctions, this.mode);
if (nodeSuccessData === null || nodeSuccessData[0][0] === undefined) {
if (executionData.node.alwaysOutputData === true) {
nodeSuccessData = nodeSuccessData || [];
nodeSuccessData[0] = [
{
json: {},
}
];
}
}
if (nodeSuccessData === null) {
// If null gets returned it means that the node did succeed
// but did not have any data. So the branch should end