Process Instance with reference Parent

This commit is contained in:
Luis Fernando Molina committed 2019-11-05 16:27:47 +01:00
1 parent 58eab44f03
commit 5c3b669150
4 files changed
+84 -6

No files matched your search

@@ -40,6 +40,10 @@ function newReferenceAttachDetach () {
completeDetachment(node)
return
}
case 'Process Instance': {
completeDetachment(node)
return
}
}
}
@@ -77,6 +81,10 @@ function newReferenceAttachDetach () {
completeAttachment(node, attachToNode)
}
break
case 'Process Instance': {
completeAttachment(node, attachToNode)
}
break
}
}
@@ -560,6 +560,15 @@ function newUiObjectsFromNodes () {
return
}
case 'Process Instance': {
let referenceParent
if (mapOfReferenceChildren !== undefined) {
if (node.savedPayload.referenceParent !== undefined) {
if (node.savedPayload.referenceParent.id !== undefined) {
mapOfReferenceChildren.set(node.id, node)
referenceParent = node.savedPayload.referenceParent
}
}
}
if (parentNode !== undefined) {
switch (parentNode.type) {
case 'Sensor Bot Instance': {
@@ -580,6 +589,11 @@ function newUiObjectsFromNodes () {
if (node.session !== undefined) {
createUiObjectFromNode(node.session, node, node)
}
if (referenceParent !== undefined) {
node.savedPayload = {
referenceParent: referenceParent
}
}
return
}
case 'Backtesting Session': {
@@ -748,6 +762,14 @@ function newUiObjectsFromNodes () {
return
}
case 'Process Definition': {
let referenceChildren
if (mapOfReferenceParents !== undefined) {
if (node.savedPayload.referenceChildren !== undefined) {
referenceChildren = []
mapOfReferenceParents.set(node.id, node)
referenceChildren = node.savedPayload.referenceChildren
}
}
createUiObject(node.type, node.name, node, parentNode, chainParent, node.type)
if (node.statusReport !== undefined) {
createUiObjectFromNode(node.statusReport, node, node)
@@ -776,6 +798,11 @@ function newUiObjectsFromNodes () {
let dataDependency = node.dataDependencies[m]
createUiObjectFromNode(dataDependency, node, node)
}
if (referenceChildren !== undefined) {
node.savedPayload = {
referenceChildren: referenceChildren
}
}
return
}
case 'Status Report': {
@@ -1063,7 +1090,8 @@ function newUiObjectsFromNodes () {
code: '{}',
outputDatasets: [],
statusDependencies: [],
dataDependencies: []
dataDependencies: [],
referenceChildren: []
}
if (node.processes === undefined) {
node.processes = []