fix(core): Clean run data for dirty nodes properly, including their children (#13821)

This commit is contained in:
Danny Martini
2025-03-11 16:53:51 +01:00
committed by GitHub
parent ca8d249700
commit b3f9cde3fd
5 changed files with 180 additions and 11 deletions

View File

@@ -289,6 +289,27 @@ export class Workflow {
return null;
}
/**
* Returns the nodes with the given names if they exist.
* If a node cannot be found it will be ignored, meaning the returned array
* of nodes can be smaller than the array of names.
*/
getNodes(nodeNames: string[]): INode[] {
const nodes: INode[] = [];
for (const name of nodeNames) {
const node = this.getNode(name);
if (!node) {
console.warn(
`Could not find a node with the name ${name} in the workflow. This was passed in as a dirty node name.`,
);
continue;
}
nodes.push(node);
}
return nodes;
}
/**
* Returns the pinData of the node with the given name if it exists
*