Status Dependencies can be refenreced now

This commit is contained in:
Luis Fernando Molina committed 2019-11-01 13:46:54 +01:00
1 parent 5a13d18ea0
commit 4d6a245907
3 files changed
+69 -2

No files matched your search

@@ -32,6 +32,14 @@ function newReferenceAttachDetach () {
completeDetachment(node)
return
}
case 'Status Dependency': {
completeDetachment(node)
return
}
case 'Execution Started Event': {
completeDetachment(node)
return
}
}
}
@@ -61,6 +69,14 @@ function newReferenceAttachDetach () {
completeAttachment(node, attachToNode)
}
break
case 'Status Dependency': {
completeAttachment(node, attachToNode)
}
break
case 'Execution Started Event': {
completeAttachment(node, attachToNode)
}
break
}
}
@@ -775,11 +775,37 @@ function newUiObjectsFromNodes () {
return
}
case 'Status Report': {
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 (referenceChildren !== undefined) {
node.savedPayload = {
referenceChildren: referenceChildren
}
}
return
}
case 'Execution Finished Event': {
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 (referenceChildren !== undefined) {
node.savedPayload = {
referenceChildren: referenceChildren
}
}
return
}
case 'Calculations Procedure': {
@@ -835,7 +861,21 @@ function newUiObjectsFromNodes () {
return
}
case 'Status Dependency': {
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
}
}
}
createUiObject(node.type, node.name, node, parentNode, chainParent, node.type)
if (referenceParent !== undefined) {
node.savedPayload = {
referenceParent: referenceParent
}
}
return
}
case 'Data Dependency': {
@@ -1023,7 +1063,8 @@ function newUiObjectsFromNodes () {
if (node.statusReport === undefined) {
node.statusReport = {
type: 'Status Report',
name: 'New Status Report'
name: 'New Status Report',
referenceChildren: []
}
createUiObject(node.statusReport.type, node.statusReport.name, node.statusReport, node, node)
}
@@ -1034,7 +1075,8 @@ function newUiObjectsFromNodes () {
if (node.executionFinishedEvent === undefined) {
node.executionFinishedEvent = {
type: 'Execution Finished Event',
name: 'New Execution Finished Event'
name: 'New Execution Finished Event',
referenceChildren: []
}
createUiObject(node.executionFinishedEvent.type, node.executionFinishedEvent.name, node.executionFinishedEvent, node, node)
}
+9
View File
@@ -512,6 +512,7 @@ function newUiObject () {
if (compatibleType.indexOf('->' + nearbyNode.type + '->') >= 0) {
/* Discard objects with busy coonection ports */
if (thisObject.payload.node.type === 'Status Report' && nearbyNode.statusReport !== undefined) { continue }
if (thisObject.payload.node.type === 'Execution Finished Event' && nearbyNode.executionStartedEvent !== undefined) { continue }
if (thisObject.payload.node.type === 'Execution Finished Event' && nearbyNode.executionFinishedEvent !== undefined) { continue }
if (thisObject.payload.node.type === 'Calculations Procedure' && nearbyNode.calculations !== undefined) { continue }
if (thisObject.payload.node.type === 'Data Building Procedure' && nearbyNode.dataBuilding !== undefined) { continue }
@@ -686,6 +687,14 @@ function newUiObject () {
compatibleType = '->' + 'Dataset Definition' + '->'
compatibleSubType = undefined
break
case 'Status Dependency':
compatibleType = '->' + 'Status Report' + '->'
compatibleSubType = undefined
break
case 'Execution Started Event':
compatibleType = '->' + 'Execution Finished Event' + '->'
compatibleSubType = undefined
break
default:
return
}