From 324498db766e10ceb059acb84ec87c843405be73 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Wed, 13 Nov 2019 18:22:56 +0100 Subject: [PATCH] Debug Task Event Implemented --- .../Workspace/FunctionLibraries/TaskFunctions.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/DesignerSpace/Workspace/FunctionLibraries/TaskFunctions.js b/DesignerSpace/Workspace/FunctionLibraries/TaskFunctions.js index 43acc3873..aec7aebc4 100644 --- a/DesignerSpace/Workspace/FunctionLibraries/TaskFunctions.js +++ b/DesignerSpace/Workspace/FunctionLibraries/TaskFunctions.js @@ -24,13 +24,19 @@ function newTaskFunctions () { process.payload.uiObject.run() } - node.payload.uiObject.run(callBackFunction) - let event = { taskId: node.id, taskName: node.name, definition: JSON.stringify(functionLibraryProtocolNode.getProtocolNode(node, false, true, true, false, false, true, true)) // <- We need to do this workaround in order no to send unescaped charactars to the taskManager. } + + if (node.payload.parentNode === undefined) { + callBackFunction(GLOBAL.DEFAULT_FAIL_RESPONSE) + systemEventHandler.raiseEvent('Task Server', 'Debug Task Started', event) + return + } + + node.payload.uiObject.run(callBackFunction) systemEventHandler.raiseEvent('Task Manager', 'Run Task', event) }