Bug Fixed when trying to run a session with no process runing

This commit is contained in:
Luis Fernando Molina committed 2019-10-04 19:44:24 +02:00
1 parent b592436bf1
commit 19df7c6835
2 files changed
+15

No files matched your search

@@ -7,6 +7,17 @@ function newSessionFunctions () {
return thisObject
function runSession (node, functionLibraryProtocolNode, callBackFunction) {
/* We can not run a sessionif its parent process is not running. Less if it does not have a parent. */
if (node.payload.parentNode === undefined) {
callBackFunction(GLOBAL.DEFAULT_FAIL_RESPONSE)
return
}
if (node.payload.parentNode.payload.uiObject.isRunning !== true) {
callBackFunction(GLOBAL.DEFAULT_FAIL_RESPONSE)
return
}
node.payload.uiObject.run(callBackFunction)
let key = node.name + '-' + node.type + '-' + node.id