|
|
|
@ -48,8 +48,8 @@ require(path.join(process.cwd(), "..", "server", "dist", "database.js")); |
|
|
|
|
allWorkFlowInfo[workflow.id] = { |
|
|
|
|
isValid: invalidPathsWithoutEnding.length == 0 ? true : false, |
|
|
|
|
root: { |
|
|
|
|
// validPaths: tree,
|
|
|
|
|
// invalidPaths: invalidPathsWithoutEnding,
|
|
|
|
|
validPaths: invalidPathsWithoutEnding.length == 0 && tree.length>0?tree: [], |
|
|
|
|
// invalidPaths: invalidPathsWithoutEnding.length == 0?[]:invalidPathsWithoutEnding,
|
|
|
|
|
valid: tree.length, |
|
|
|
|
invalid: invalidPathsWithoutEnding.length, |
|
|
|
|
subFlowList: subFlowParentIds |
|
|
|
@ -57,8 +57,14 @@ require(path.join(process.cwd(), "..", "server", "dist", "database.js")); |
|
|
|
|
subFlow: {} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if(invalidPathsWithoutEnding.length > 0) { |
|
|
|
|
allWorkFlowInfo[workflow.id].isValid = false; |
|
|
|
|
continue workflowsFor; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const subFlowInfo = {} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
subFlowFor: |
|
|
|
|
for await (const subFlowId of subFlowParentIds) { |
|
|
|
|
const processesSubFlow = await getAllProcesses(workflow, { |
|
|
|
@ -85,6 +91,9 @@ require(path.join(process.cwd(), "..", "server", "dist", "database.js")); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const { subTreePath, invalidSubPathsWithoutEnding } = await getProcessPathsSubFlow(processesSubFlow, subFlowId, workflow); |
|
|
|
|
if(invalidSubPathsWithoutEnding.length > 0) { |
|
|
|
|
allWorkFlowInfo[workflow.id].isValid = false; |
|
|
|
|
} |
|
|
|
|
subFlowInfo[subFlowId] = { |
|
|
|
|
valid: subTreePath.length, |
|
|
|
|
invalid: invalidSubPathsWithoutEnding.length, |
|
|
|
@ -92,11 +101,8 @@ require(path.join(process.cwd(), "..", "server", "dist", "database.js")); |
|
|
|
|
// invalidSubTreePath: invalidSubPathsWithoutEnding
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
allWorkFlowInfo[workflow.id]["subFlow"] = subFlowInfo; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
console.log("allWorkFlowInfo", JSON.stringify(allWorkFlowInfo, null, 2)); |
|
|
|
|