diff --git a/DesignSpace/Workspace/FunctionLibraries/TaskFunctions.js b/DesignSpace/Workspace/FunctionLibraries/TaskFunctions.js index 2927e88c1..96ad84d41 100644 --- a/DesignSpace/Workspace/FunctionLibraries/TaskFunctions.js +++ b/DesignSpace/Workspace/FunctionLibraries/TaskFunctions.js @@ -5,7 +5,9 @@ function newTaskFunctions () { runAllTasks: runAllTasks, stopAllTasks: stopAllTasks, runAllTaskManagers: runAllTaskManagers, - stopAllTaskManagers: stopAllTaskManagers + stopAllTaskManagers: stopAllTaskManagers, + runAllExchangeTasks: runAllExchangeTasks, + stopAllExchangeTasks: stopAllExchangeTasks } return thisObject @@ -110,9 +112,9 @@ function newTaskFunctions () { } } - function runAllTaskManagers (dataMining, functionLibraryProtocolNode) { - for (let i = 0; i < dataMining.taskManagers.length; i++) { - let node = dataMining.taskManagers[i] + function runAllTaskManagers (parent, functionLibraryProtocolNode) { + for (let i = 0; i < parent.taskManagers.length; i++) { + let node = parent.taskManagers[i] let menu = node.payload.uiObject.menu menu.internalClick('Run All Tasks') @@ -120,13 +122,32 @@ function newTaskFunctions () { } } - function stopAllTaskManagers (dataMining, functionLibraryProtocolNode) { - for (let i = 0; i < dataMining.taskManagers.length; i++) { - let node = dataMining.taskManagers[i] + function stopAllTaskManagers (parent, functionLibraryProtocolNode) { + for (let i = 0; i < parent.taskManagers.length; i++) { + let node = parent.taskManagers[i] let menu = node.payload.uiObject.menu menu.internalClick('Stop All Tasks') menu.internalClick('Stop All Tasks') } } + function runAllExchangeTasks (parent, functionLibraryProtocolNode) { + for (let i = 0; i < parent.exchangeTasks.length; i++) { + let node = parent.exchangeTasks[i] + let menu = node.payload.uiObject.menu + + menu.internalClick('Run All Task Managers') + menu.internalClick('Run All Task Managers') + } + } + + function stopAllExchangeTasks (parent, functionLibraryProtocolNode) { + for (let i = 0; i < parent.exchangeTasks.length; i++) { + let node = parent.exchangeTasks[i] + let menu = node.payload.uiObject.menu + + menu.internalClick('Stop All Task Managers') + menu.internalClick('Stop All Task Managers') + } + } } diff --git a/DesignSpace/Workspace/Workspace.js b/DesignSpace/Workspace/Workspace.js index a63c790d8..76abd1fd2 100644 --- a/DesignSpace/Workspace/Workspace.js +++ b/DesignSpace/Workspace/Workspace.js @@ -366,6 +366,16 @@ function newWorkspace () { functionLibraryTaskFunctions.stopAllTaskManagers(payload.node, functionLibraryProtocolNode) } break + case 'Run All Exchange Tasks': + { + functionLibraryTaskFunctions.runAllExchangeTasks(payload.node, functionLibraryProtocolNode) + } + break + case 'Stop All Exchange Tasks': + { + functionLibraryTaskFunctions.stopAllExchangeTasks(payload.node, functionLibraryProtocolNode) + } + break case 'Run Session': { functionLibrarySessionFunctions.runSession(payload.node, functionLibraryProtocolNode, callBackFunction)