mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-25 11:31:38 -08:00
🐛 Fix issue with nodes in stack which do actually not get executed
This commit is contained in:
parent
a01a764874
commit
549b26fa3d
|
@ -593,9 +593,15 @@ 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);
|
nodeSuccessData = await workflow.runNode(executionData.node, executionData.data, this.runExecutionData, runIndex, this.additionalData, NodeExecuteFunctions, this.mode);
|
||||||
|
|
||||||
|
if (nodeSuccessData === undefined) {
|
||||||
|
// Node did not get executed
|
||||||
|
nodeSuccessData = null;
|
||||||
|
} else {
|
||||||
|
this.runExecutionData.resultData.lastNodeExecuted = executionData.node.name;
|
||||||
|
}
|
||||||
|
|
||||||
if (nodeSuccessData === null || nodeSuccessData[0][0] === undefined) {
|
if (nodeSuccessData === null || nodeSuccessData[0][0] === undefined) {
|
||||||
if (executionData.node.alwaysOutputData === true) {
|
if (executionData.node.alwaysOutputData === true) {
|
||||||
nodeSuccessData = nodeSuccessData || [];
|
nodeSuccessData = nodeSuccessData || [];
|
||||||
|
|
|
@ -1085,18 +1085,18 @@ export class Workflow {
|
||||||
* @returns {(Promise<INodeExecutionData[][] | null>)}
|
* @returns {(Promise<INodeExecutionData[][] | null>)}
|
||||||
* @memberof Workflow
|
* @memberof Workflow
|
||||||
*/
|
*/
|
||||||
async runNode(node: INode, inputData: ITaskDataConnections, runExecutionData: IRunExecutionData, runIndex: number, additionalData: IWorkflowExecuteAdditionalData, nodeExecuteFunctions: INodeExecuteFunctions, mode: WorkflowExecuteMode): Promise<INodeExecutionData[][] | null> {
|
async runNode(node: INode, inputData: ITaskDataConnections, runExecutionData: IRunExecutionData, runIndex: number, additionalData: IWorkflowExecuteAdditionalData, nodeExecuteFunctions: INodeExecuteFunctions, mode: WorkflowExecuteMode): Promise<INodeExecutionData[][] | null | undefined> {
|
||||||
if (node.disabled === true) {
|
if (node.disabled === true) {
|
||||||
// If node is disabled simply pass the data through
|
// If node is disabled simply pass the data through
|
||||||
// return NodeRunHelpers.
|
// return NodeRunHelpers.
|
||||||
if (inputData.hasOwnProperty('main') && inputData.main.length > 0) {
|
if (inputData.hasOwnProperty('main') && inputData.main.length > 0) {
|
||||||
// If the node is disabled simply return the data from the first main input
|
// If the node is disabled simply return the data from the first main input
|
||||||
if (inputData.main[0] === null) {
|
if (inputData.main[0] === null) {
|
||||||
return null;
|
return undefined;
|
||||||
}
|
}
|
||||||
return [(inputData.main[0] as INodeExecutionData[])];
|
return [(inputData.main[0] as INodeExecutionData[])];
|
||||||
}
|
}
|
||||||
return null;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
const nodeType = this.nodeTypes.getByName(node.type);
|
const nodeType = this.nodeTypes.getByName(node.type);
|
||||||
|
@ -1112,7 +1112,7 @@ export class Workflow {
|
||||||
|
|
||||||
if (connectionInputData.length === 0) {
|
if (connectionInputData.length === 0) {
|
||||||
// No data for node so return
|
// No data for node so return
|
||||||
return null;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (runExecutionData.resultData.lastNodeExecuted === node.name && runExecutionData.resultData.error !== undefined) {
|
if (runExecutionData.resultData.lastNodeExecuted === node.name && runExecutionData.resultData.error !== undefined) {
|
||||||
|
|
Loading…
Reference in a new issue