@manyos/smileconnect-api 1.46.1 → 1.46.3
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/conf/clients.json
CHANGED
|
@@ -120,7 +120,7 @@ async function deleteTaskFlow(rootRequestInstanceId) {
|
|
|
120
120
|
async function updateTaskFlow(clientConfig, rootForm, rootRequestId, rootRequestInstanceId) {
|
|
121
121
|
await deleteTaskFlow(rootRequestInstanceId)
|
|
122
122
|
let flowBuilderRequest = {
|
|
123
|
-
"Parent Name":
|
|
123
|
+
"Parent Name": rootRequestId,
|
|
124
124
|
"ParentID" : rootRequestInstanceId,
|
|
125
125
|
"Parent Type": "Root Request",
|
|
126
126
|
"zTmpInternalCommand" : "CREATE",
|
|
@@ -133,6 +133,26 @@ async function updateTaskFlow(clientConfig, rootForm, rootRequestId, rootRequest
|
|
|
133
133
|
|
|
134
134
|
flowBuilderRequest = mappingUtil.applyMapping2Remedy(flowBuilderRequest, mappingflow, clientConfig.flowBuilder.constants);
|
|
135
135
|
const taskFlowResult = await arquery.createEntry('TMS:FlowBuilder', flowBuilderRequest, clientConfig.options)
|
|
136
|
+
await activateTaskFlow(clientConfig, rootRequestInstanceId)
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
async function activateTaskFlow(clientConfig, rootRequestInstanceId) {
|
|
140
|
+
const form = 'TMS:Flow'
|
|
141
|
+
const idField = 'Flow ID'
|
|
142
|
+
const flowRequest = {
|
|
143
|
+
"PredecessorStatusReasonSelection": "Success",
|
|
144
|
+
"Predecessor Status" : "Closed",
|
|
145
|
+
"zTmpInternalCommand": "EVALUATE",
|
|
146
|
+
"zTmpInternal" : "True"
|
|
147
|
+
};
|
|
148
|
+
const records = await arquery.executeARQuery(form, undefined,
|
|
149
|
+
`'RootRequestInstanceID'="${rootRequestInstanceId}" AND 'ParentID' = "${rootRequestInstanceId}" AND 'Predecessor Link' = "Start" AND 'Status' = "Pending" AND 'Sequence Mode' = "Yes"`, idField)
|
|
150
|
+
if (records && records.data) {
|
|
151
|
+
for (let x=0; x<records.data.length; x++) {
|
|
152
|
+
const record = records.data[x]
|
|
153
|
+
const updateResult = await arquery.updateEntry(form, record[idField], flowRequest)
|
|
154
|
+
}
|
|
155
|
+
}
|
|
136
156
|
}
|
|
137
157
|
|
|
138
158
|
|
package/docs/releases.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
## API
|
|
4
4
|
|
|
5
|
+
### 1.46.3 - 18.10.21
|
|
6
|
+
Fix issue: Task not activated when phase already active
|
|
7
|
+
Known issues: Tasks might get activated early
|
|
8
|
+
|
|
9
|
+
### 1.46.2 - 14.10.21
|
|
10
|
+
Fix issue: Promise Rejection in scripts prevented
|
|
11
|
+
|
|
5
12
|
### 1.46.1 - 14.10.21
|
|
6
13
|
Update Adapterframework to 1.14.0
|
|
7
14
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@manyos/smileconnect-api",
|
|
3
|
-
"version": "1.46.
|
|
3
|
+
"version": "1.46.3",
|
|
4
4
|
"description": "A proxy and abstraction layer for BMCs IT Service Management Suite",
|
|
5
5
|
"main": "app.js",
|
|
6
6
|
"scripts": {
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"request-promise-native": "^1.0.9",
|
|
38
38
|
"socket.io": "^2.4.1",
|
|
39
39
|
"uuid": "^3.4.0",
|
|
40
|
-
"vm2": "
|
|
40
|
+
"vm2": "3.9.3"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"chai": "^4.3.4",
|