@manyos/smileconnect-api 1.45.6 → 1.45.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/controller/taskController.js +19 -9
- package/docs/releases.md +1 -1
- package/package.json +1 -1
|
@@ -59,9 +59,13 @@ async function createTask(clientConfig, rootForm, rootRequestId, taskData, creat
|
|
|
59
59
|
|
|
60
60
|
fields.push('TaskName', 'RootRequestInstanceId', 'TaskType', 'Status', 'RootRequestFormName', 'RootRequestMode', 'RootRequestName', 'sequence')
|
|
61
61
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
62
|
+
|
|
63
|
+
for (let x=0; x< allTaskFinal.length; x++) {
|
|
64
|
+
const thisTask = allTaskFinal[x]
|
|
65
|
+
//run preScripts
|
|
66
|
+
if (scripts && scripts.preMapping) {
|
|
67
|
+
await scriptController.runScripts(scripts.preMapping, thisTask, clientConfig.clientId, globalScriptParams);
|
|
68
|
+
}
|
|
65
69
|
}
|
|
66
70
|
|
|
67
71
|
allTaskFinal = mappingUtil.applyMapping2Remedy(allTaskFinal, mapping, clientConfig.task.constants, fields);
|
|
@@ -77,18 +81,24 @@ async function createTask(clientConfig, rootForm, rootRequestId, taskData, creat
|
|
|
77
81
|
thisTask.sequence = thisTask.Sequence || "1";
|
|
78
82
|
});
|
|
79
83
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
84
|
+
for (let x=0; x< allTaskFinal.length; x++) {
|
|
85
|
+
const thisTask = allTaskFinal[x]
|
|
86
|
+
//run postScripts
|
|
87
|
+
if (scripts && scripts.postMapping) {
|
|
88
|
+
await scriptController.runScripts(scripts.postMapping, thisTask, clientConfig.clientId, globalScriptParams);
|
|
89
|
+
}
|
|
83
90
|
}
|
|
84
91
|
|
|
85
92
|
const taskResult = await arquery.createEntry('TMS:Task', allTaskFinal, clientConfig.options)
|
|
86
93
|
const taskId = taskResult['0'];
|
|
87
94
|
globalScriptParams.id2 = taskId;
|
|
88
95
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
96
|
+
for (let x=0; x< allTaskFinal.length; x++) {
|
|
97
|
+
const thisTask = allTaskFinal[x]
|
|
98
|
+
//run afterExecution
|
|
99
|
+
if (scripts && scripts.afterExecution) {
|
|
100
|
+
await scriptController.runScripts(scripts.afterExecution, thisTask, clientConfig.clientId, globalScriptParams);
|
|
101
|
+
}
|
|
92
102
|
}
|
|
93
103
|
|
|
94
104
|
log.debug('Create Task Result', taskResult);
|
package/docs/releases.md
CHANGED