diff --git a/DesignerSpace/Workspace/FunctionLibraries/SessionFunctions.js b/DesignerSpace/Workspace/FunctionLibraries/SessionFunctions.js index ce13dc6bf..453fe61e7 100644 --- a/DesignerSpace/Workspace/FunctionLibraries/SessionFunctions.js +++ b/DesignerSpace/Workspace/FunctionLibraries/SessionFunctions.js @@ -9,16 +9,19 @@ function newSessionFunctions () { 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) { + node.payload.uiObject.setErrorMessage('Session needs a Process Instance parent to be able to run.') callBackFunction(GLOBAL.DEFAULT_FAIL_RESPONSE) return } if (node.payload.parentNode.payload.uiObject.isRunning !== true) { + node.payload.uiObject.setErrorMessage('Session needs a Process Instance parent to be running to be able to run.') callBackFunction(GLOBAL.DEFAULT_FAIL_RESPONSE) return } if (node.payload.referenceParent === undefined) { + node.payload.uiObject.setErrorMessage('Parent Process Instance need to reference a Process Definition.') callBackFunction(GLOBAL.DEFAULT_FAIL_RESPONSE) return }