Relocating Procedures from Process to Product

This commit is contained in:
Luis Fernando Molina committed 2019-11-12 11:29:51 +01:00
1 parent e7d25357e9
commit b243b93199
9 files changed
+74 -51

No files matched your search

@@ -430,18 +430,6 @@ function newNodeChildren () {
response.childIndex = response.childrenCount
}
}
if (parentNode.calculations !== undefined) {
response.childrenCount++
if (parentNode.calculations.id === childNode.id) {
response.childIndex = response.childrenCount
}
}
if (parentNode.dataBuilding !== undefined) {
response.childrenCount++
if (parentNode.dataBuilding.id === childNode.id) {
response.childIndex = response.childrenCount
}
}
return response
}
@@ -625,6 +613,19 @@ function newNodeChildren () {
}
}
}
if (parentNode.calculations !== undefined) {
response.childrenCount++
if (parentNode.calculations.id === childNode.id) {
response.childIndex = response.childrenCount
}
}
if (parentNode.dataBuilding !== undefined) {
response.childrenCount++
if (parentNode.dataBuilding.id === childNode.id) {
response.childIndex = response.childrenCount
}
}
return response
}
@@ -595,14 +595,6 @@ function newNodeDeleter () {
deleteExecutionFinishedEvent(node.executionFinishedEvent, rootNodes)
}
if (node.calculations !== undefined) {
deleteCalculationsProcedure(node.calculations, rootNodes)
}
if (node.dataBuilding !== undefined) {
deleteDataBuildingProcedure(node.dataBuilding, rootNodes)
}
completeDeletion(node, rootNodes)
destroyUiObject(node)
cleanNode(node)
@@ -823,6 +815,14 @@ function newNodeDeleter () {
}
}
if (node.calculations !== undefined) {
deleteCalculationsProcedure(node.calculations, rootNodes)
}
if (node.dataBuilding !== undefined) {
deleteDataBuildingProcedure(node.dataBuilding, rootNodes)
}
completeDeletion(node, rootNodes)
destroyUiObject(node)
cleanNode(node)
@@ -844,14 +844,6 @@ function newOnFocus () {
if (child !== undefined) {
return child
}
child = getNodeThatIsOnFocus(node.calculations)
if (child !== undefined) {
return child
}
child = getNodeThatIsOnFocus(node.dataBuilding)
if (child !== undefined) {
return child
}
if (node.payload.uiObject.isOnFocus === true) {
return node
} else {
@@ -1002,6 +994,14 @@ function newOnFocus () {
return child
}
}
child = getNodeThatIsOnFocus(node.calculations)
if (child !== undefined) {
return child
}
child = getNodeThatIsOnFocus(node.dataBuilding)
if (child !== undefined) {
return child
}
if (node.payload.uiObject.isOnFocus === true) {
return node
} else {
@@ -1241,8 +1241,6 @@ function newProtocolNode () {
object.statusReport = getProtocolNode(node.statusReport, removePersonalData, parseCode, includeIds, includePayload, includeReferences, followReferenceParent, includeParent, followAncestors, excludeChildren, excludeType)
object.executionStartedEvent = getProtocolNode(node.executionStartedEvent, removePersonalData, parseCode, includeIds, includePayload, includeReferences, followReferenceParent, includeParent, followAncestors, excludeChildren, excludeType)
object.executionFinishedEvent = getProtocolNode(node.executionFinishedEvent, removePersonalData, parseCode, includeIds, includePayload, includeReferences, followReferenceParent, includeParent, followAncestors, excludeChildren, excludeType)
object.calculations = getProtocolNode(node.calculations, removePersonalData, parseCode, includeIds, includePayload, includeReferences, followReferenceParent, includeParent, followAncestors, excludeChildren, excludeType)
object.dataBuilding = getProtocolNode(node.dataBuilding, removePersonalData, parseCode, includeIds, includePayload, includeReferences, followReferenceParent, includeParent, followAncestors, excludeChildren, excludeType)
}
return object
}
@@ -1497,6 +1495,8 @@ function newProtocolNode () {
}
}
object.record = getProtocolNode(node.record, removePersonalData, parseCode, includeIds, includePayload, includeReferences, followReferenceParent, includeParent, followAncestors, excludeChildren, excludeType)
object.calculations = getProtocolNode(node.calculations, removePersonalData, parseCode, includeIds, includePayload, includeReferences, followReferenceParent, includeParent, followAncestors, excludeChildren, excludeType)
object.dataBuilding = getProtocolNode(node.dataBuilding, removePersonalData, parseCode, includeIds, includePayload, includeReferences, followReferenceParent, includeParent, followAncestors, excludeChildren, excludeType)
}
if (followAncestors) {
excludeChildren = true
@@ -828,14 +828,6 @@ function newShortcutKeys () {
if (child !== undefined) {
return child
}
child = getNodeByShortcutKey(node.calculations, searchingKey)
if (child !== undefined) {
return child
}
child = getNodeByShortcutKey(node.dataBuilding, searchingKey)
if (child !== undefined) {
return child
}
if (node.payload.uiObject.shortcutKey === searchingKey) {
return node
} else {
@@ -979,6 +971,14 @@ function newShortcutKeys () {
return child
}
}
child = getNodeByShortcutKey(node.calculations, searchingKey)
if (child !== undefined) {
return child
}
child = getNodeByShortcutKey(node.dataBuilding, searchingKey)
if (child !== undefined) {
return child
}
if (node.payload.uiObject.shortcutKey === searchingKey) {
return node
} else {
@@ -8,6 +8,7 @@ function newUiObjectsFromNodes () {
addTradingBot: addTradingBot,
addProcessDefinition: addProcessDefinition,
addMissingProcessDefinitionItems: addMissingProcessDefinitionItems,
addMissingProductDefinitionItems: addMissingProductDefinitionItems,
addProcessOutput: addProcessOutput,
addProcessDependencies: addProcessDependencies,
addStatusReport: addStatusReport,
@@ -788,12 +789,6 @@ function newUiObjectsFromNodes () {
if (node.executionFinishedEvent !== undefined) {
createUiObjectFromNode(node.executionFinishedEvent, node, node)
}
if (node.calculations !== undefined) {
createUiObjectFromNode(node.calculations, node, node)
}
if (node.dataBuilding !== undefined) {
createUiObjectFromNode(node.dataBuilding, node, node)
}
if (referenceChildren !== undefined) {
node.savedPayload = {
referenceChildren: referenceChildren
@@ -970,6 +965,12 @@ function newUiObjectsFromNodes () {
let dataset = node.datasets[m]
createUiObjectFromNode(dataset, node, node)
}
if (node.calculations !== undefined) {
createUiObjectFromNode(node.calculations, node, node)
}
if (node.dataBuilding !== undefined) {
createUiObjectFromNode(node.dataBuilding, node, node)
}
return
}
case 'Record Definition': {
@@ -1121,6 +1122,9 @@ function newUiObjectsFromNodes () {
addStatusReport(node)
addExecutionStartedEvent(node)
addExecutionFinishedEvent(node)
}
function addMissingProductDefinitionItems (node) {
addCalculationsProcedure(node)
addDataBuildingProcedure(node)
}
+5
View File
@@ -346,6 +346,11 @@ function newWorkspace () {
functionLibraryUiObjectsFromNodes.addMissingProcessDefinitionItems(payload.node)
}
break
case 'Add Missing Product Definition Items':
{
functionLibraryUiObjectsFromNodes.addMissingProductDefinitionItems(payload.node)
}
break
case 'Add Process Output':
{
functionLibraryUiObjectsFromNodes.addProcessOutput(payload.node)
+2 -2
View File
@@ -249,11 +249,11 @@ function newUiObject () {
compatibleSubType = undefined
break
case 'Calculations Procedure':
compatibleType = '->' + 'Process Definition' + '->'
compatibleType = '->' + 'Product Definition' + '->'
compatibleSubType = undefined
break
case 'Data Building Procedure':
compatibleType = '->' + 'Process Definition' + '->'
compatibleType = '->' + 'Product Definition' + '->'
compatibleSubType = undefined
break
case 'Procedure Initialization':
+18 -5
View File
@@ -1273,7 +1273,7 @@ function newUiObjectConstructor () {
rawRadius: 8,
targetRadius: 0,
currentRadius: 0,
angle: -45,
angle: -60,
dontShowAtFullscreen: true
}
)
@@ -1287,7 +1287,7 @@ function newUiObjectConstructor () {
rawRadius: 8,
targetRadius: 0,
currentRadius: 0,
angle: -20
angle: -30
}
)
menuItemsInitialValues.push(
@@ -1300,9 +1300,22 @@ function newUiObjectConstructor () {
rawRadius: 8,
targetRadius: 0,
currentRadius: 0,
angle: 0
angle: -10
}
)
menuItemsInitialValues.push(
{
action: 'Add Missing Product Definition Items',
actionFunction: payload.onMenuItemClick,
label: 'Add Missing Items',
visible: true,
relatedUiObject: 'Calculations Procedure',
rawRadius: 8,
targetRadius: 0,
currentRadius: 0,
angle: 10
}
)
menuItemsInitialValues.push(
{
action: 'Delete Product Definition',
@@ -1316,7 +1329,7 @@ function newUiObjectConstructor () {
rawRadius: 8,
targetRadius: 0,
currentRadius: 0,
angle: 20
angle: 30
}
)
menuItemsInitialValues.push(
@@ -1330,7 +1343,7 @@ function newUiObjectConstructor () {
rawRadius: 8,
targetRadius: 0,
currentRadius: 0,
angle: 45
angle: 60
}
)
break