Bug Fixed when trying to run a session with no process runing
This commit is contained in:
1 parent
b592436bf1
commit
19df7c6835
2 files changed
+15
No files matched your search
@@ -19,6 +19,7 @@ function newStrategyPart () {
|
||||
circularProgressBar: undefined,
|
||||
isExecuting: undefined,
|
||||
isDefault: undefined,
|
||||
isRunning: undefined,
|
||||
setAsDefault: setAsDefault,
|
||||
run: run,
|
||||
stop: stop,
|
||||
@@ -618,6 +619,8 @@ function newStrategyPart () {
|
||||
type: 'Secondary Action Already Executed'
|
||||
}
|
||||
stop(callBackFunction, event)
|
||||
|
||||
thisObject.isRunning = true
|
||||
}
|
||||
|
||||
function stop (callBackFunction, event) {
|
||||
@@ -634,6 +637,7 @@ function newStrategyPart () {
|
||||
thisObject.circularProgressBar.finalize()
|
||||
thisObject.circularProgressBar = undefined
|
||||
}
|
||||
thisObject.isRunning = false
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in new issue
Block a user