Status Report and Execution Finished Event Implementation part 1

This commit is contained in:
Luis Fernando Molina committed 2019-11-01 11:31:47 +01:00
1 parent 64b238af43
commit 4f9c4bd403
11 files changed
+273

No files matched your search

@@ -61,6 +61,16 @@ function newChainAttachDetach () {
completeDetachment(node, rootNodes)
return
}
case 'Status Report': {
node.payload.parentNode.calculations = undefined
completeDetachment(node, rootNodes)
return
}
case 'Execution Finished Event': {
node.payload.parentNode.calculations = undefined
completeDetachment(node, rootNodes)
return
}
case 'Calculations Procedure': {
node.payload.parentNode.calculations = undefined
completeDetachment(node, rootNodes)
@@ -557,6 +567,20 @@ function newChainAttachDetach () {
completeAttachment(node, rootNodes)
}
break
case 'Status Report': {
node.payload.parentNode = attachToNode
node.payload.chainParent = attachToNode
node.payload.parentNode.calculations = node
completeAttachment(node, rootNodes)
}
break
case 'Execution Finished Event': {
node.payload.parentNode = attachToNode
node.payload.chainParent = attachToNode
node.payload.parentNode.calculations = node
completeAttachment(node, rootNodes)
}
break
case 'Calculations Procedure': {
node.payload.parentNode = attachToNode
node.payload.chainParent = attachToNode
@@ -29,6 +29,12 @@ function newNodeChildren () {
case 'Process Definition': {
return countChildrenProcessDefinition(parentNode, childNode)
}
case 'Status Rerport': {
return countChildrenStatusRerport(parentNode, childNode)
}
case 'Execution Finished Event': {
return countChildrenExecutionFinishedEvent(parentNode, childNode)
}
case 'Calculations Procedure': {
return countChildrenCalculationsProcedure(parentNode, childNode)
}
@@ -428,6 +434,21 @@ function newNodeChildren () {
return response
}
function countChildrenStatusRerport (parentNode, childNode) {
let response = {
childrenCount: 0,
childIndex: undefined
}
return response
}
function countChildrenExecutionFinishedEvent (parentNode, childNode) {
let response = {
childrenCount: 0,
childIndex: undefined
}
return response
}
function countChildrenCalculationsProcedure (parentNode, childNode) {
let response = {
childrenCount: 0,
@@ -8,6 +8,8 @@ function newNodeDeleter () {
deleteIndicatorBot: deleteIndicatorBot,
deleteTradingBot: deleteTradingBot,
deleteProcessDefinition: deleteProcessDefinition,
deleteStatusReport: deleteStatusReport,
deleteExecutionFinishedEvent: deleteExecutionFinishedEvent,
deleteCalculationsProcedure: deleteCalculationsProcedure,
deleteDataBuildingProcedure: deleteDataBuildingProcedure,
deleteProcedureInitialization: deleteProcedureInitialization,
@@ -112,6 +114,14 @@ function newNodeDeleter () {
deleteProcessDefinition(rootNode, rootNodes)
break
}
case 'Status Report': {
deleteStatusReport(rootNode, rootNodes)
break
}
case 'Execution Finished Event': {
deleteExecutionFinishedEvent(rootNode, rootNodes)
break
}
case 'Calculations Procedure': {
deleteCalculationsProcedure(rootNode, rootNodes)
break
@@ -582,6 +592,30 @@ function newNodeDeleter () {
cleanNode(node)
}
function deleteStatusReport (node, rootNodes) {
let payload = node.payload
if (payload.parentNode !== undefined) {
payload.parentNode.statusReport = undefined
}
completeDeletion(node, rootNodes)
destroyUiObject(node)
cleanNode(node)
}
function deleteExecutionFinishedEvent (node, rootNodes) {
let payload = node.payload
if (payload.parentNode !== undefined) {
payload.parentNode.executionFinishedEvent = undefined
}
completeDeletion(node, rootNodes)
destroyUiObject(node)
cleanNode(node)
}
function deleteCalculationsProcedure (node, rootNodes) {
let payload = node.payload
@@ -856,6 +856,20 @@ function newOnFocus () {
return
}
}
case 'Status Report': {
if (node.payload.uiObject.isOnFocus === true) {
return node
} else {
return
}
}
case 'Execution Finished Event': {
if (node.payload.uiObject.isOnFocus === true) {
return node
} else {
return
}
}
case 'Calculations Procedure': {
let child
child = getNodeThatIsOnFocus(node.initialization)
@@ -1209,6 +1209,34 @@ function newProtocolNode () {
}
return object
}
case 'Status Report': {
let object = {
type: node.type,
subType: node.subType,
name: node.name
}
if (includeIds) {
object.id = node.id
}
if (includePayload) {
object.savedPayload = getSavedPayload(node, includeReferences)
}
return object
}
case 'Execution Finished Event': {
let object = {
type: node.type,
subType: node.subType,
name: node.name
}
if (includeIds) {
object.id = node.id
}
if (includePayload) {
object.savedPayload = getSavedPayload(node, includeReferences)
}
return object
}
case 'Calculations Procedure': {
let object = {
type: node.type,
@@ -840,6 +840,20 @@ function newShortcutKeys () {
return
}
}
case 'Status Report': {
if (node.payload.uiObject.shortcutKey === searchingKey) {
return node
} else {
return
}
}
case 'Execution Finished Procedure': {
if (node.payload.uiObject.shortcutKey === searchingKey) {
return node
} else {
return
}
}
case 'Calculations Procedure': {
let child
child = getNodeByShortcutKey(node.initialization, searchingKey)
@@ -7,6 +7,8 @@ function newUiObjectsFromNodes () {
addIndicatorBot: addIndicatorBot,
addTradingBot: addTradingBot,
addProcessDefinition: addProcessDefinition,
addStatusReport: addStatusReport,
addExecutionFinishedEvent: addExecutionFinishedEvent,
addCalculationsProcedure: addCalculationsProcedure,
addDataBuildingProcedure: addDataBuildingProcedure,
addProcedureInitialization: addProcedureInitialization,
@@ -765,6 +767,14 @@ function newUiObjectsFromNodes () {
}
return
}
case 'Status Report': {
createUiObject(node.type, node.name, node, parentNode, chainParent, node.type)
return
}
case 'Execution Finished Event': {
createUiObject(node.type, node.name, node, parentNode, chainParent, node.type)
return
}
case 'Calculations Procedure': {
createUiObject(node.type, node.name, node, parentNode, chainParent, node.type)
if (node.initialization !== undefined) {
@@ -995,6 +1005,28 @@ function newUiObjectsFromNodes () {
return object
}
function addStatusReport (node) {
if (node.statusReport === undefined) {
node.statusReport = {
type: 'Status Report',
name: 'New Status Report'
}
createUiObject(node.calculations.type, node.calculations.name, node.calculations, node, node)
}
return node.calculations
}
function addExecutionFinishedEvent (node) {
if (node.executionFinishedEvent === undefined) {
node.executionFinishedEvent = {
type: 'Execution Finished Event',
name: 'New Execution Finished Event'
}
createUiObject(node.calculations.type, node.calculations.name, node.calculations, node, node)
}
return node.calculations
}
function addCalculationsProcedure (node) {
if (node.calculations === undefined) {
node.calculations = {