Display node-error only on executing nodes (#2274)

*  Dot not display errors on disconnected nodes

*  Fix some more inconsistencies
This commit is contained in:
Jan
2021-10-06 12:02:31 -05:00
committed by GitHub
parent 9dbf6e5f6d
commit f7148bdd77
5 changed files with 70 additions and 10 deletions

View File

@@ -231,13 +231,29 @@ export class Workflow {
* @returns {(IWorfklowIssues | null)}
* @memberof Workflow
*/
checkReadyForExecution(): IWorfklowIssues | null {
checkReadyForExecution(inputData: {
startNode?: string;
destinationNode?: string;
}): IWorfklowIssues | null {
let node: INode;
let nodeType: INodeType | undefined;
let nodeIssues: INodeIssues | null = null;
const workflowIssues: IWorfklowIssues = {};
for (const nodeName of Object.keys(this.nodes)) {
let checkNodes: string[] = [];
if (inputData.destinationNode) {
// If a destination node is given we have to check all the nodes
// leading up to it
checkNodes = this.getParentNodes(inputData.destinationNode);
checkNodes.push(inputData.destinationNode);
} else if (inputData.startNode) {
// If a start node is given we have to check all nodes which
// come after it
checkNodes = this.getChildNodes(inputData.startNode);
checkNodes.push(inputData.startNode);
}
for (const nodeName of checkNodes) {
nodeIssues = null;
node = this.nodes[nodeName];