gd-sprest 7.8.6 → 7.8.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/build/lib/list.js +39 -29
- package/build/rest.js +1 -1
- package/dist/gd-sprest.js +1 -1
- package/dist/gd-sprest.min.js +1 -1
- package/package.json +1 -1
package/build/lib/list.js
CHANGED
|
@@ -144,37 +144,47 @@ exports.List.runFlow = function (props) {
|
|
|
144
144
|
function (flow) {
|
|
145
145
|
// Get the flow information
|
|
146
146
|
var flowInfo = JSON.parse(flow.SynchronizationData);
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
147
|
+
if (flowInfo) {
|
|
148
|
+
// Get the flow token
|
|
149
|
+
getFlowToken(flowInfo).then(function (token) {
|
|
150
|
+
// Trigger the flow
|
|
151
|
+
new utils_1.Base({
|
|
152
|
+
accessToken: token,
|
|
153
|
+
requestType: utils_1.RequestType.GraphPost,
|
|
154
|
+
endpoint: flowInfo.properties.flowTriggerUri,
|
|
155
|
+
data: {
|
|
156
|
+
rows: [{
|
|
157
|
+
entity: props.data
|
|
158
|
+
}]
|
|
159
|
+
}
|
|
160
|
+
}).execute(
|
|
161
|
+
// Success
|
|
162
|
+
function () {
|
|
163
|
+
// Resolve the request
|
|
164
|
+
resolve({
|
|
165
|
+
executed: true,
|
|
166
|
+
flowToken: token
|
|
167
|
+
});
|
|
168
|
+
},
|
|
169
|
+
// Error
|
|
170
|
+
function (ex) {
|
|
171
|
+
// Resolve the request
|
|
172
|
+
resolve({
|
|
173
|
+
executed: false,
|
|
174
|
+
errorDetails: ex.response,
|
|
175
|
+
errorMessage: "Error triggering the flow."
|
|
176
|
+
});
|
|
175
177
|
});
|
|
176
178
|
});
|
|
177
|
-
}
|
|
179
|
+
}
|
|
180
|
+
else {
|
|
181
|
+
// Resolve the request
|
|
182
|
+
resolve({
|
|
183
|
+
executed: false,
|
|
184
|
+
errorDetails: "The flow with id " + props.id + " doesn't exist.",
|
|
185
|
+
errorMessage: "Error getting the flow instance."
|
|
186
|
+
});
|
|
187
|
+
}
|
|
178
188
|
},
|
|
179
189
|
// Error
|
|
180
190
|
function (ex) {
|
package/build/rest.js
CHANGED