From 37ad57d4c7ebd8341c7e3e4d569827769ecd60f2 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sat, 16 Nov 2019 09:27:01 +0100 Subject: [PATCH] Error Messages Improved --- DesignerSpace/Workspace/FunctionLibraries/SessionFunctions.js | 3 +++ 1 file changed, 3 insertions(+) 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 }