@eo-sdk/client 8.12.0 → 8.12.2

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.
@@ -7,6 +7,5 @@ export declare class ReferenceFinderEntryComponent {
7
7
  selectReference: EventEmitter<any>;
8
8
  get link(): string;
9
9
  constructor();
10
- linkClick(): Window;
11
10
  select(item: ReferenceItem, add?: boolean, selectedAble?: boolean): void;
12
11
  }
@@ -3214,11 +3214,14 @@
3214
3214
  * Getter for the executable Processes. If types are provided, you'll get
3215
3215
  * only the processes that are executable for all of them
3216
3216
  * @param types List of dms object types to fetch executable processes for
3217
+ * @param useCached If the cached data should be returned rather than requesting again
3218
+ * @param additionalData If the additional form data should be also included
3219
+ * @param modelid The process model ID to only return the data for one process
3217
3220
  * @returns List of executable processes
3218
3221
  */
3219
- BpmService.prototype.getExecutableProcesses = function (types, useCached) {
3222
+ BpmService.prototype.getExecutableProcesses = function (types, useCached, additionalData, modelid) {
3220
3223
  if (this.capabilities.hasCapability('bpm')) {
3221
- return (!!this.executableProcesses && useCached) ? rxjs.of(this.executableProcesses) : this.fetchExecutableProcesses(types);
3224
+ return (!!this.executableProcesses && useCached) ? rxjs.of(this.executableProcesses) : this.fetchExecutableProcesses(types, additionalData, modelid);
3222
3225
  }
3223
3226
  else {
3224
3227
  return rxjs.of([]);
@@ -3236,20 +3239,41 @@
3236
3239
  * @returns List of executable processes
3237
3240
  */
3238
3241
  BpmService.prototype.getExecutableProcessesForDmsObjects = function (dmsObjects) {
3239
- return this.getExecutableProcesses(dmsObjects.map(function (o) { return o.typeName; }));
3242
+ return this.getExecutableProcesses(dmsObjects.map(function (o) { return o.typeName; }), false, true);
3240
3243
  };
3241
3244
  /**
3242
3245
  * Fetches executable Processes from the backend.
3243
3246
  * @param types List of dms object types to fetch executable processes for
3247
+ * @param additionalData If the additional form data should be also included
3248
+ * @param modelid The process model ID to only return the data for one process
3244
3249
  * @returns List of executable processes
3245
3250
  */
3246
- BpmService.prototype.fetchExecutableProcesses = function (types) {
3251
+ BpmService.prototype.fetchExecutableProcesses = function (types, additionalData, modelid) {
3247
3252
  var _this = this;
3248
- var uri = '/bpm/process/executable?form=true&fields=true';
3249
- if (types) {
3250
- uri += "&type=" + types.join(',');
3253
+ var uri = '/bpm/process/executable';
3254
+ if (additionalData) {
3255
+ uri += '?form=true&fields=true';
3251
3256
  }
3252
- return this.backend.get(uri).pipe(operators.map(function (res) { return res; }), operators.tap(function (res) { return _this.executableProcesses = res; }));
3257
+ if (types) {
3258
+ uri += (additionalData ? '&' : '?') + ("type=" + types.join(','));
3259
+ }
3260
+ if (modelid) {
3261
+ uri += (additionalData || types ? '&' : '?') + ("modelid=" + modelid);
3262
+ }
3263
+ return this.backend.get(uri).pipe(operators.map(function (res) { return res; }), operators.tap(function (res) {
3264
+ // Extend existing processes with additional data, instead of overwriting all processes
3265
+ if (additionalData) {
3266
+ res.forEach(function (proc) {
3267
+ var existingProcIndex = _this.executableProcesses.findIndex(function (item) { return item.id == proc.id; });
3268
+ if (existingProcIndex == -1)
3269
+ _this.executableProcesses.push(proc);
3270
+ else
3271
+ _this.executableProcesses[existingProcIndex] = proc;
3272
+ });
3273
+ }
3274
+ else
3275
+ _this.executableProcesses = res;
3276
+ }));
3253
3277
  };
3254
3278
  /**
3255
3279
  * Getter for a processes file. The file of a process contains