@quantumbpm/sdk 1.3.0 → 2.0.0
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/README.md +57 -34
- package/dist/auth.d.ts +19 -14
- package/dist/auth.js +62 -84
- package/dist/bpmn.d.ts +81 -21
- package/dist/bpmn.js +61 -33
- package/dist/dmn.d.ts +0 -6
- package/dist/dmn.js +1 -15
- package/dist/generated/RawClient.js +2 -2
- package/dist/generated/core/OpenAPI.js +2 -2
- package/dist/generated/index.d.ts +8 -2
- package/dist/generated/index.js +8 -4
- package/dist/generated/models/BpmnActivityState.d.ts +85 -0
- package/dist/generated/models/BpmnActivityState.js +18 -0
- package/dist/generated/models/BpmnElementStatistics.d.ts +36 -0
- package/dist/generated/models/BpmnElementStatistics.js +17 -0
- package/dist/generated/models/BpmnExternalJobPaginatedResponse.d.ts +2 -2
- package/dist/generated/models/BpmnExternalJobPaginatedResponse.js +1 -1
- package/dist/generated/models/BpmnHistoryPage.d.ts +15 -0
- package/dist/generated/models/BpmnHistoryPage.js +3 -0
- package/dist/generated/models/BpmnIncident.d.ts +11 -17
- package/dist/generated/models/BpmnIncident.js +7 -11
- package/dist/generated/models/BpmnIncidentRecord.d.ts +7 -13
- package/dist/generated/models/BpmnIncidentRecord.js +4 -6
- package/dist/generated/models/BpmnIncidentRecordPaginatedResponse.d.ts +2 -2
- package/dist/generated/models/BpmnIncidentRecordPaginatedResponse.js +1 -1
- package/dist/generated/models/BpmnInstance.d.ts +14 -29
- package/dist/generated/models/BpmnInstance.js +1 -17
- package/dist/generated/models/BpmnInstancePaginatedResponse.d.ts +2 -2
- package/dist/generated/models/BpmnInstancePaginatedResponse.js +1 -1
- package/dist/generated/models/BpmnInstanceState.d.ts +31 -14
- package/dist/generated/models/BpmnInstanceState.js +1 -1
- package/dist/generated/models/BpmnInstanceStatus.d.ts +10 -0
- package/dist/generated/models/BpmnInstanceStatus.js +19 -0
- package/dist/generated/models/BpmnProcessDefinition.d.ts +5 -5
- package/dist/generated/models/BpmnProcessDefinition.js +1 -1
- package/dist/generated/models/BpmnProcessVersion.d.ts +9 -9
- package/dist/generated/models/BpmnProcessVersion.js +1 -1
- package/dist/generated/models/BpmnUserTaskPaginatedResponse.d.ts +2 -2
- package/dist/generated/models/BpmnUserTaskPaginatedResponse.js +1 -1
- package/dist/generated/models/CorrelationKeys.d.ts +7 -6
- package/dist/generated/models/CorrelationKeys.js +1 -1
- package/dist/generated/models/CreateDefinitionRequest.d.ts +1 -5
- package/dist/generated/models/CreateDefinitionRequest.js +1 -1
- package/dist/generated/models/CursorPage.d.ts +12 -0
- package/dist/generated/models/CursorPage.js +3 -0
- package/dist/generated/models/DecisionSummary.d.ts +2 -2
- package/dist/generated/models/DecisionSummary.js +1 -1
- package/dist/generated/models/DecisionVersion.d.ts +25 -0
- package/dist/generated/models/DecisionVersion.js +3 -0
- package/dist/generated/models/DecisionVersionList.d.ts +7 -0
- package/dist/generated/models/DecisionVersionList.js +3 -0
- package/dist/generated/models/Definition.d.ts +16 -8
- package/dist/generated/models/Definition.js +1 -1
- package/dist/generated/models/Error.d.ts +4 -4
- package/dist/generated/models/Error.js +3 -3
- package/dist/generated/models/EvaluateStoredRequest.d.ts +5 -6
- package/dist/generated/models/EvaluateStoredRequest.js +1 -1
- package/dist/generated/models/EvaluationResult.d.ts +6 -0
- package/dist/generated/models/EvaluationResult.js +1 -1
- package/dist/generated/models/Execution.d.ts +30 -9
- package/dist/generated/models/Execution.js +1 -1
- package/dist/generated/models/ExternalJob.d.ts +8 -8
- package/dist/generated/models/ExternalJob.js +1 -1
- package/dist/generated/models/StartBpmnInstanceRequest.d.ts +6 -2
- package/dist/generated/models/StartBpmnInstanceRequest.js +1 -1
- package/dist/generated/models/SuspendBpmnInstanceRequest.d.ts +1 -1
- package/dist/generated/models/SuspendBpmnInstanceRequest.js +1 -1
- package/dist/generated/models/UpdateDefinitionRequest.d.ts +1 -5
- package/dist/generated/models/UpdateDefinitionRequest.js +1 -1
- package/dist/generated/models/UserTask.d.ts +15 -11
- package/dist/generated/models/UserTask.js +1 -1
- package/dist/generated/services/BpmnService.d.ts +183 -87
- package/dist/generated/services/BpmnService.js +267 -121
- package/dist/generated/services/DefaultService.d.ts +106 -113
- package/dist/generated/services/DefaultService.js +127 -164
- package/dist/index.d.ts +8 -8
- package/dist/index.js +7 -7
- package/dist/tracing.js +2 -2
- package/dist/workers.d.ts +2 -2
- package/dist/workers.js +4 -3
- package/package.json +2 -4
- package/src/auth.test.ts +128 -0
- package/src/auth.ts +67 -64
- package/src/bpmn.ts +128 -43
- package/src/dmn.ts +0 -19
- package/src/generated/RawClient.ts +1 -1
- package/src/generated/core/OpenAPI.ts +1 -1
- package/src/generated/index.ts +8 -2
- package/src/generated/models/BpmnActivityState.ts +90 -0
- package/src/generated/models/BpmnElementStatistics.ts +41 -0
- package/src/generated/models/BpmnExternalJobPaginatedResponse.ts +2 -2
- package/src/generated/models/BpmnHistoryPage.ts +20 -0
- package/src/generated/models/BpmnIncident.ts +11 -17
- package/src/generated/models/BpmnIncidentRecord.ts +7 -13
- package/src/generated/models/BpmnIncidentRecordPaginatedResponse.ts +2 -2
- package/src/generated/models/BpmnInstance.ts +14 -29
- package/src/generated/models/BpmnInstancePaginatedResponse.ts +2 -2
- package/src/generated/models/BpmnInstanceState.ts +31 -14
- package/src/generated/models/BpmnInstanceStatus.ts +14 -0
- package/src/generated/models/BpmnProcessDefinition.ts +5 -5
- package/src/generated/models/BpmnProcessVersion.ts +9 -9
- package/src/generated/models/BpmnUserTaskPaginatedResponse.ts +2 -2
- package/src/generated/models/CorrelationKeys.ts +7 -6
- package/src/generated/models/CreateDefinitionRequest.ts +1 -5
- package/src/generated/models/CursorPage.ts +17 -0
- package/src/generated/models/DecisionSummary.ts +2 -2
- package/src/generated/models/DecisionVersion.ts +30 -0
- package/src/generated/models/DecisionVersionList.ts +12 -0
- package/src/generated/models/Definition.ts +16 -8
- package/src/generated/models/Error.ts +4 -4
- package/src/generated/models/EvaluateStoredRequest.ts +5 -6
- package/src/generated/models/EvaluationResult.ts +6 -0
- package/src/generated/models/Execution.ts +30 -9
- package/src/generated/models/ExternalJob.ts +8 -8
- package/src/generated/models/StartBpmnInstanceRequest.ts +6 -2
- package/src/generated/models/SuspendBpmnInstanceRequest.ts +1 -1
- package/src/generated/models/UpdateDefinitionRequest.ts +1 -5
- package/src/generated/models/UserTask.ts +15 -11
- package/src/generated/services/BpmnService.ts +320 -137
- package/src/generated/services/DefaultService.ts +147 -192
- package/src/index.test.ts +74 -31
- package/src/index.ts +13 -6
- package/src/tracing.ts +1 -1
- package/src/workers.test.ts +2 -3
- package/src/workers.ts +5 -4
- package/dist/generated/models/CreateProjectRequest.d.ts +0 -9
- package/dist/generated/models/CreateProjectRequest.js +0 -3
- package/src/generated/models/CreateProjectRequest.ts +0 -14
|
@@ -2,9 +2,12 @@
|
|
|
2
2
|
/* istanbul ignore file */
|
|
3
3
|
/* tslint:disable */
|
|
4
4
|
/* eslint-disable */
|
|
5
|
+
import type { BpmnActivityState } from '../models/BpmnActivityState';
|
|
6
|
+
import type { BpmnHistoryPage } from '../models/BpmnHistoryPage';
|
|
5
7
|
import type { BpmnIncidentRecordPaginatedResponse } from '../models/BpmnIncidentRecordPaginatedResponse';
|
|
6
8
|
import type { BpmnInstanceChildrenResponse } from '../models/BpmnInstanceChildrenResponse';
|
|
7
9
|
import type { BpmnProcessSummaryPaginatedResponse } from '../models/BpmnProcessSummaryPaginatedResponse';
|
|
10
|
+
import type { BpmnProcessVersion } from '../models/BpmnProcessVersion';
|
|
8
11
|
import type { BpmnProcessVersionPaginatedResponse } from '../models/BpmnProcessVersionPaginatedResponse';
|
|
9
12
|
import type { BpmnResourceDetail } from '../models/BpmnResourceDetail';
|
|
10
13
|
import type { BpmnResourcePaginatedResponse } from '../models/BpmnResourcePaginatedResponse';
|
|
@@ -58,7 +61,9 @@ export class BpmnService {
|
|
|
58
61
|
* Create a BPMN resource
|
|
59
62
|
* Uploads a new BPMN XML resource as a draft. Drafts can be edited and
|
|
60
63
|
* tested but cannot start production instances until they are deployed.
|
|
61
|
-
*
|
|
64
|
+
* Invalid XML is rejected. XML identical to the latest deployed resource
|
|
65
|
+
* of the same `<definitions id>` is refused with 409, and nothing is
|
|
66
|
+
* saved.
|
|
62
67
|
*
|
|
63
68
|
* @param projectId
|
|
64
69
|
* @param requestBody
|
|
@@ -77,6 +82,9 @@ export class BpmnService {
|
|
|
77
82
|
},
|
|
78
83
|
body: requestBody,
|
|
79
84
|
mediaType: 'application/json',
|
|
85
|
+
errors: {
|
|
86
|
+
409: `Conflict`,
|
|
87
|
+
},
|
|
80
88
|
});
|
|
81
89
|
}
|
|
82
90
|
/**
|
|
@@ -129,7 +137,7 @@ export class BpmnService {
|
|
|
129
137
|
body: requestBody,
|
|
130
138
|
mediaType: 'application/json',
|
|
131
139
|
errors: {
|
|
132
|
-
409: `Conflict
|
|
140
|
+
409: `Conflict`,
|
|
133
141
|
},
|
|
134
142
|
});
|
|
135
143
|
}
|
|
@@ -156,15 +164,18 @@ export class BpmnService {
|
|
|
156
164
|
'resourceID': resourceId,
|
|
157
165
|
},
|
|
158
166
|
errors: {
|
|
159
|
-
409: `Conflict
|
|
167
|
+
409: `Conflict`,
|
|
160
168
|
},
|
|
161
169
|
});
|
|
162
170
|
}
|
|
163
171
|
/**
|
|
164
172
|
* Deploy a BPMN resource
|
|
165
173
|
* Marks all processes inside the resource as executable, making them
|
|
166
|
-
* available to start instances of.
|
|
167
|
-
* deployed resource, upload a new
|
|
174
|
+
* available to start instances of. Each of them gets its next version.
|
|
175
|
+
* Deployment is one-way. To change a deployed resource, upload a new
|
|
176
|
+
* version and deploy that. A resource identical to the latest deployed
|
|
177
|
+
* resource of the same `<definitions id>` is refused with 409, and
|
|
178
|
+
* deploying that latest one again changes nothing.
|
|
168
179
|
*
|
|
169
180
|
* @param projectId
|
|
170
181
|
* @param resourceId
|
|
@@ -186,6 +197,7 @@ export class BpmnService {
|
|
|
186
197
|
400: `Bad Request`,
|
|
187
198
|
401: `Unauthorized`,
|
|
188
199
|
404: `Not Found`,
|
|
200
|
+
409: `Conflict`,
|
|
189
201
|
500: `Internal Server Error`,
|
|
190
202
|
},
|
|
191
203
|
});
|
|
@@ -194,9 +206,19 @@ export class BpmnService {
|
|
|
194
206
|
* Start a test instance from a resource
|
|
195
207
|
* Starts a test instance of a resource, draft or deployed. A draft can
|
|
196
208
|
* only be started this way, which makes it the way to try out an
|
|
197
|
-
* in-progress design before deploying.
|
|
198
|
-
*
|
|
199
|
-
*
|
|
209
|
+
* in-progress design before deploying. A suspended definition does not
|
|
210
|
+
* stop it, since the test run takes no deployed version.
|
|
211
|
+
*
|
|
212
|
+
* A test run runs on the same engine as production but stays apart from
|
|
213
|
+
* it, and so do its call-activity children. It stays a test run for
|
|
214
|
+
* life, also after a migration to a deployed version.
|
|
215
|
+
* - Its job task types, message names and signal names carry the
|
|
216
|
+
* `draft:` prefix. A worker activates `draft:<type>` to work its jobs,
|
|
217
|
+
* and a publish names `draft:<name>` to reach it.
|
|
218
|
+
* - Its user tasks, jobs and incidents list only when `instanceID` names
|
|
219
|
+
* it.
|
|
220
|
+
* - Instance counts, analytics and job queue depth leave it out. The
|
|
221
|
+
* instance list shows it, with `draft` set.
|
|
200
222
|
*
|
|
201
223
|
* @param projectId
|
|
202
224
|
* @param resourceId
|
|
@@ -210,9 +232,9 @@ export class BpmnService {
|
|
|
210
232
|
requestBody: StartBpmnTestInstanceRequest,
|
|
211
233
|
): CancelablePromise<{
|
|
212
234
|
/**
|
|
213
|
-
*
|
|
235
|
+
* Identifier of the new test instance.
|
|
214
236
|
*/
|
|
215
|
-
|
|
237
|
+
instanceID?: string;
|
|
216
238
|
}> {
|
|
217
239
|
return this.httpRequest.request({
|
|
218
240
|
method: 'POST',
|
|
@@ -263,7 +285,7 @@ export class BpmnService {
|
|
|
263
285
|
}
|
|
264
286
|
/**
|
|
265
287
|
* List all versions of a BPMN resource
|
|
266
|
-
* Returns every stored version of a resource identified by the BPMN XML's outer `definitions` id,
|
|
288
|
+
* Returns every stored version of a resource identified by the BPMN XML's outer `definitions` id, newest first.
|
|
267
289
|
* @param projectId
|
|
268
290
|
* @param definitionsId
|
|
269
291
|
* @param page
|
|
@@ -324,23 +346,23 @@ export class BpmnService {
|
|
|
324
346
|
* List child instances of a BPMN instance
|
|
325
347
|
* Returns instances that this instance spawned via CallActivity elements.
|
|
326
348
|
* Useful for navigating into a multi-level process hierarchy (parents
|
|
327
|
-
* can be discovered via `
|
|
349
|
+
* can be discovered via `parentInstanceID` on the child).
|
|
328
350
|
*
|
|
329
351
|
* @param projectId
|
|
330
|
-
* @param
|
|
352
|
+
* @param instanceId
|
|
331
353
|
* @returns BpmnInstanceChildrenResponse OK
|
|
332
354
|
* @throws ApiError
|
|
333
355
|
*/
|
|
334
356
|
public getBpmnInstanceChildren(
|
|
335
357
|
projectId: string,
|
|
336
|
-
|
|
358
|
+
instanceId: string,
|
|
337
359
|
): CancelablePromise<BpmnInstanceChildrenResponse> {
|
|
338
360
|
return this.httpRequest.request({
|
|
339
361
|
method: 'GET',
|
|
340
|
-
url: '/projects/{projectID}/bpmn/instances/{
|
|
362
|
+
url: '/projects/{projectID}/bpmn/instances/{instanceID}/children',
|
|
341
363
|
path: {
|
|
342
364
|
'projectID': projectId,
|
|
343
|
-
'
|
|
365
|
+
'instanceID': instanceId,
|
|
344
366
|
},
|
|
345
367
|
});
|
|
346
368
|
}
|
|
@@ -348,22 +370,22 @@ export class BpmnService {
|
|
|
348
370
|
* Get BPMN instance variables
|
|
349
371
|
* Returns the current variables in the root scope of a running or completed instance.
|
|
350
372
|
* @param projectId
|
|
351
|
-
* @param
|
|
373
|
+
* @param instanceId
|
|
352
374
|
* @returns any OK
|
|
353
375
|
* @throws ApiError
|
|
354
376
|
*/
|
|
355
377
|
public getBpmnInstanceVariables(
|
|
356
378
|
projectId: string,
|
|
357
|
-
|
|
379
|
+
instanceId: string,
|
|
358
380
|
): CancelablePromise<{
|
|
359
381
|
variables?: Record<string, any>;
|
|
360
382
|
}> {
|
|
361
383
|
return this.httpRequest.request({
|
|
362
384
|
method: 'GET',
|
|
363
|
-
url: '/projects/{projectID}/bpmn/instances/{
|
|
385
|
+
url: '/projects/{projectID}/bpmn/instances/{instanceID}/variables',
|
|
364
386
|
path: {
|
|
365
387
|
'projectID': projectId,
|
|
366
|
-
'
|
|
388
|
+
'instanceID': instanceId,
|
|
367
389
|
},
|
|
368
390
|
});
|
|
369
391
|
}
|
|
@@ -375,29 +397,104 @@ export class BpmnService {
|
|
|
375
397
|
* payload are kept; pass `null` to clear a key.
|
|
376
398
|
*
|
|
377
399
|
* @param projectId
|
|
378
|
-
* @param
|
|
400
|
+
* @param instanceId
|
|
379
401
|
* @param requestBody
|
|
380
402
|
* @returns any OK
|
|
381
403
|
* @throws ApiError
|
|
382
404
|
*/
|
|
383
405
|
public updateBpmnInstanceVariables(
|
|
384
406
|
projectId: string,
|
|
385
|
-
|
|
407
|
+
instanceId: string,
|
|
386
408
|
requestBody: {
|
|
387
409
|
variables: Record<string, any>;
|
|
388
410
|
},
|
|
389
411
|
): CancelablePromise<any> {
|
|
390
412
|
return this.httpRequest.request({
|
|
391
413
|
method: 'PUT',
|
|
392
|
-
url: '/projects/{projectID}/bpmn/instances/{
|
|
414
|
+
url: '/projects/{projectID}/bpmn/instances/{instanceID}/variables',
|
|
393
415
|
path: {
|
|
394
416
|
'projectID': projectId,
|
|
395
|
-
'
|
|
417
|
+
'instanceID': instanceId,
|
|
396
418
|
},
|
|
397
419
|
body: requestBody,
|
|
398
420
|
mediaType: 'application/json',
|
|
399
421
|
});
|
|
400
422
|
}
|
|
423
|
+
/**
|
|
424
|
+
* Get a page of a BPMN instance's history
|
|
425
|
+
* A window of an instance's BPMN history, oldest first, for a running or
|
|
426
|
+
* an ended instance. Without a cursor it is the newest entries.
|
|
427
|
+
* `beforeSeq` reads the entries before one, to walk back, and `fromSeq`
|
|
428
|
+
* the entries from one on, to follow a running instance. Every entry
|
|
429
|
+
* carries its `seq`.
|
|
430
|
+
*
|
|
431
|
+
* Page entries leave out `inputs` and `outputs`, so a page costs the same
|
|
432
|
+
* however long the history is. Read one entry's payload from
|
|
433
|
+
* `GetBpmnInstanceHistoryEntry`. The diagram needs no history at all: the
|
|
434
|
+
* instance state's `elementStatistics` and `takenFlows` summarise it.
|
|
435
|
+
*
|
|
436
|
+
* @param projectId
|
|
437
|
+
* @param instanceId
|
|
438
|
+
* @param fromSeq Read the entries from this seq on. Takes precedence over `beforeSeq`.
|
|
439
|
+
* @param beforeSeq Read the newest entries before this seq.
|
|
440
|
+
* @param limit Max entries per page. Clamped server-side to the engine's max page size.
|
|
441
|
+
* @returns BpmnHistoryPage OK
|
|
442
|
+
* @throws ApiError
|
|
443
|
+
*/
|
|
444
|
+
public getBpmnInstanceHistory(
|
|
445
|
+
projectId: string,
|
|
446
|
+
instanceId: string,
|
|
447
|
+
fromSeq?: number,
|
|
448
|
+
beforeSeq?: number,
|
|
449
|
+
limit?: number,
|
|
450
|
+
): CancelablePromise<BpmnHistoryPage> {
|
|
451
|
+
return this.httpRequest.request({
|
|
452
|
+
method: 'GET',
|
|
453
|
+
url: '/projects/{projectID}/bpmn/instances/{instanceID}/history',
|
|
454
|
+
path: {
|
|
455
|
+
'projectID': projectId,
|
|
456
|
+
'instanceID': instanceId,
|
|
457
|
+
},
|
|
458
|
+
query: {
|
|
459
|
+
'fromSeq': fromSeq,
|
|
460
|
+
'beforeSeq': beforeSeq,
|
|
461
|
+
'limit': limit,
|
|
462
|
+
},
|
|
463
|
+
errors: {
|
|
464
|
+
404: `Not Found`,
|
|
465
|
+
},
|
|
466
|
+
});
|
|
467
|
+
}
|
|
468
|
+
/**
|
|
469
|
+
* Get one BPMN history entry with its payload
|
|
470
|
+
* One history entry with its `inputs` and `outputs`. The engine rebuilds
|
|
471
|
+
* them from the variable writes of every entry before it, so the read
|
|
472
|
+
* grows with the entry's position: around 0.3 s at entry 40,000.
|
|
473
|
+
*
|
|
474
|
+
* @param projectId
|
|
475
|
+
* @param instanceId
|
|
476
|
+
* @param seq
|
|
477
|
+
* @returns BpmnActivityState OK
|
|
478
|
+
* @throws ApiError
|
|
479
|
+
*/
|
|
480
|
+
public getBpmnInstanceHistoryEntry(
|
|
481
|
+
projectId: string,
|
|
482
|
+
instanceId: string,
|
|
483
|
+
seq: number,
|
|
484
|
+
): CancelablePromise<BpmnActivityState> {
|
|
485
|
+
return this.httpRequest.request({
|
|
486
|
+
method: 'GET',
|
|
487
|
+
url: '/projects/{projectID}/bpmn/instances/{instanceID}/history/{seq}',
|
|
488
|
+
path: {
|
|
489
|
+
'projectID': projectId,
|
|
490
|
+
'instanceID': instanceId,
|
|
491
|
+
'seq': seq,
|
|
492
|
+
},
|
|
493
|
+
errors: {
|
|
494
|
+
404: `Not Found`,
|
|
495
|
+
},
|
|
496
|
+
});
|
|
497
|
+
}
|
|
401
498
|
/**
|
|
402
499
|
* Resolve an incident and retry the failed activity
|
|
403
500
|
* Marks an incident as resolved and re-runs the activity that produced it.
|
|
@@ -406,7 +503,7 @@ export class BpmnService {
|
|
|
406
503
|
* that triggered a FEEL evaluation error).
|
|
407
504
|
*
|
|
408
505
|
* @param projectId
|
|
409
|
-
* @param
|
|
506
|
+
* @param instanceId
|
|
410
507
|
* @param incidentId
|
|
411
508
|
* @param requestBody
|
|
412
509
|
* @returns any OK
|
|
@@ -414,7 +511,7 @@ export class BpmnService {
|
|
|
414
511
|
*/
|
|
415
512
|
public resolveBpmnIncident(
|
|
416
513
|
projectId: string,
|
|
417
|
-
|
|
514
|
+
instanceId: string,
|
|
418
515
|
incidentId: string,
|
|
419
516
|
requestBody?: {
|
|
420
517
|
variables?: Record<string, any>;
|
|
@@ -422,10 +519,10 @@ export class BpmnService {
|
|
|
422
519
|
): CancelablePromise<any> {
|
|
423
520
|
return this.httpRequest.request({
|
|
424
521
|
method: 'POST',
|
|
425
|
-
url: '/projects/{projectID}/bpmn/instances/{
|
|
522
|
+
url: '/projects/{projectID}/bpmn/instances/{instanceID}/incidents/{incidentID}/resolve',
|
|
426
523
|
path: {
|
|
427
524
|
'projectID': projectId,
|
|
428
|
-
'
|
|
525
|
+
'instanceID': instanceId,
|
|
429
526
|
'incidentID': incidentId,
|
|
430
527
|
},
|
|
431
528
|
body: requestBody,
|
|
@@ -436,37 +533,39 @@ export class BpmnService {
|
|
|
436
533
|
* List BPMN incidents
|
|
437
534
|
* Cross-instance audit listing of incidents in the project. By default
|
|
438
535
|
* returns open incidents first (unresolved), ordered by recency.
|
|
439
|
-
* Filterable by
|
|
536
|
+
* Filterable by process version, error type, status, and time window.
|
|
440
537
|
*
|
|
441
538
|
* Each row carries the parent process metadata (processID, processName)
|
|
442
539
|
* so a single page render needs no follow-up queries against the
|
|
443
540
|
* instances endpoint. Click-through to a specific instance still uses
|
|
444
|
-
* the
|
|
541
|
+
* the instance detail endpoint.
|
|
445
542
|
*
|
|
446
543
|
* @param projectId
|
|
447
|
-
* @param
|
|
448
|
-
* @param
|
|
544
|
+
* @param processId Restrict to incidents on instances of one process, in any version unless `version` names one.
|
|
545
|
+
* @param version Restrict to one version of `processID`. Ignored without `processID`.
|
|
546
|
+
* @param instanceId Restrict to incidents on a single instance - useful for an instance-detail "all incidents ever raised here" view that includes resolved rows. A test run's incidents list only by its instance.
|
|
449
547
|
* @param status Filter by lifecycle status. `open` returns unresolved incidents;
|
|
450
548
|
* `resolved` returns only resolved ones. Omit to return both.
|
|
451
549
|
*
|
|
452
550
|
* @param errorType Restrict to a single error category (matches `BpmnIncidentRecord.errorType`).
|
|
453
551
|
* @param since Earliest `raisedAt` to include (inclusive).
|
|
454
552
|
* @param until Latest `raisedAt` to include (exclusive).
|
|
455
|
-
* @param page
|
|
456
|
-
* @param
|
|
553
|
+
* @param cursor The `nextCursor` of the page before, absent for the first page.
|
|
554
|
+
* @param limit Most incidents per page, 20 by default and 100 at most.
|
|
457
555
|
* @returns BpmnIncidentRecordPaginatedResponse OK
|
|
458
556
|
* @throws ApiError
|
|
459
557
|
*/
|
|
460
558
|
public listBpmnIncidents(
|
|
461
559
|
projectId: string,
|
|
462
|
-
|
|
463
|
-
|
|
560
|
+
processId?: string,
|
|
561
|
+
version?: number,
|
|
562
|
+
instanceId?: string,
|
|
464
563
|
status?: 'open' | 'resolved',
|
|
465
|
-
errorType?: 'BpmnError' | '
|
|
564
|
+
errorType?: 'BpmnError' | 'CompensationError' | 'FeelError' | 'GatewayNoMatch' | 'TimerResolution' | 'LinkNotFound' | 'MigrationError' | 'CallActivityCanceled' | 'ExternalRowRefreshError' | 'JobLockLost' | 'DecisionNotFound' | 'DecisionEvaluationError' | 'ProcessNotFound' | 'ProcessSuspended' | 'Unknown',
|
|
466
565
|
since?: string,
|
|
467
566
|
until?: string,
|
|
468
|
-
|
|
469
|
-
|
|
567
|
+
cursor?: string,
|
|
568
|
+
limit?: number,
|
|
470
569
|
): CancelablePromise<BpmnIncidentRecordPaginatedResponse> {
|
|
471
570
|
return this.httpRequest.request({
|
|
472
571
|
method: 'GET',
|
|
@@ -475,14 +574,15 @@ export class BpmnService {
|
|
|
475
574
|
'projectID': projectId,
|
|
476
575
|
},
|
|
477
576
|
query: {
|
|
478
|
-
'
|
|
479
|
-
'
|
|
577
|
+
'processID': processId,
|
|
578
|
+
'version': version,
|
|
579
|
+
'instanceID': instanceId,
|
|
480
580
|
'status': status,
|
|
481
581
|
'errorType': errorType,
|
|
482
582
|
'since': since,
|
|
483
583
|
'until': until,
|
|
484
|
-
'
|
|
485
|
-
'
|
|
584
|
+
'cursor': cursor,
|
|
585
|
+
'limit': limit,
|
|
486
586
|
},
|
|
487
587
|
});
|
|
488
588
|
}
|
|
@@ -494,22 +594,22 @@ export class BpmnService {
|
|
|
494
594
|
* and target. Validate the migration plan first via `MigrateValidate`.
|
|
495
595
|
*
|
|
496
596
|
* @param projectId
|
|
497
|
-
* @param
|
|
597
|
+
* @param instanceId
|
|
498
598
|
* @param requestBody
|
|
499
599
|
* @returns any OK
|
|
500
600
|
* @throws ApiError
|
|
501
601
|
*/
|
|
502
602
|
public migrateBpmnInstance(
|
|
503
603
|
projectId: string,
|
|
504
|
-
|
|
604
|
+
instanceId: string,
|
|
505
605
|
requestBody: MigrateBpmnInstanceRequest,
|
|
506
606
|
): CancelablePromise<any> {
|
|
507
607
|
return this.httpRequest.request({
|
|
508
608
|
method: 'POST',
|
|
509
|
-
url: '/projects/{projectID}/bpmn/instances/{
|
|
609
|
+
url: '/projects/{projectID}/bpmn/instances/{instanceID}/migrate',
|
|
510
610
|
path: {
|
|
511
611
|
'projectID': projectId,
|
|
512
|
-
'
|
|
612
|
+
'instanceID': instanceId,
|
|
513
613
|
},
|
|
514
614
|
body: requestBody,
|
|
515
615
|
mediaType: 'application/json',
|
|
@@ -523,22 +623,22 @@ export class BpmnService {
|
|
|
523
623
|
* to the user.
|
|
524
624
|
*
|
|
525
625
|
* @param projectId
|
|
526
|
-
* @param
|
|
626
|
+
* @param instanceId
|
|
527
627
|
* @param requestBody
|
|
528
628
|
* @returns MigrationValidationResult OK
|
|
529
629
|
* @throws ApiError
|
|
530
630
|
*/
|
|
531
631
|
public validateBpmnInstanceMigration(
|
|
532
632
|
projectId: string,
|
|
533
|
-
|
|
633
|
+
instanceId: string,
|
|
534
634
|
requestBody: MigrateBpmnInstanceRequest,
|
|
535
635
|
): CancelablePromise<MigrationValidationResult> {
|
|
536
636
|
return this.httpRequest.request({
|
|
537
637
|
method: 'POST',
|
|
538
|
-
url: '/projects/{projectID}/bpmn/instances/{
|
|
638
|
+
url: '/projects/{projectID}/bpmn/instances/{instanceID}/migrate/validate',
|
|
539
639
|
path: {
|
|
540
640
|
'projectID': projectId,
|
|
541
|
-
'
|
|
641
|
+
'instanceID': instanceId,
|
|
542
642
|
},
|
|
543
643
|
body: requestBody,
|
|
544
644
|
mediaType: 'application/json',
|
|
@@ -559,22 +659,22 @@ export class BpmnService {
|
|
|
559
659
|
* A batch is applied whole or not at all.
|
|
560
660
|
*
|
|
561
661
|
* @param projectId
|
|
562
|
-
* @param
|
|
662
|
+
* @param instanceId
|
|
563
663
|
* @param requestBody
|
|
564
664
|
* @returns any OK
|
|
565
665
|
* @throws ApiError
|
|
566
666
|
*/
|
|
567
667
|
public modifyBpmnInstance(
|
|
568
668
|
projectId: string,
|
|
569
|
-
|
|
669
|
+
instanceId: string,
|
|
570
670
|
requestBody: ModifyBpmnInstanceRequest,
|
|
571
671
|
): CancelablePromise<any> {
|
|
572
672
|
return this.httpRequest.request({
|
|
573
673
|
method: 'POST',
|
|
574
|
-
url: '/projects/{projectID}/bpmn/instances/{
|
|
674
|
+
url: '/projects/{projectID}/bpmn/instances/{instanceID}/modify',
|
|
575
675
|
path: {
|
|
576
676
|
'projectID': projectId,
|
|
577
|
-
'
|
|
677
|
+
'instanceID': instanceId,
|
|
578
678
|
},
|
|
579
679
|
body: requestBody,
|
|
580
680
|
mediaType: 'application/json',
|
|
@@ -591,7 +691,7 @@ export class BpmnService {
|
|
|
591
691
|
* can be triggered repeatedly until the ad-hoc subprocess completes.
|
|
592
692
|
*
|
|
593
693
|
* @param projectId
|
|
594
|
-
* @param
|
|
694
|
+
* @param instanceId
|
|
595
695
|
* @param adHocNodeId
|
|
596
696
|
* @param requestBody
|
|
597
697
|
* @returns any OK
|
|
@@ -599,7 +699,7 @@ export class BpmnService {
|
|
|
599
699
|
*/
|
|
600
700
|
public triggerBpmnAdHocNode(
|
|
601
701
|
projectId: string,
|
|
602
|
-
|
|
702
|
+
instanceId: string,
|
|
603
703
|
adHocNodeId: string,
|
|
604
704
|
requestBody: {
|
|
605
705
|
nodeID: string;
|
|
@@ -607,10 +707,10 @@ export class BpmnService {
|
|
|
607
707
|
): CancelablePromise<any> {
|
|
608
708
|
return this.httpRequest.request({
|
|
609
709
|
method: 'POST',
|
|
610
|
-
url: '/projects/{projectID}/bpmn/instances/{
|
|
710
|
+
url: '/projects/{projectID}/bpmn/instances/{instanceID}/adhoc/{adHocNodeID}/trigger',
|
|
611
711
|
path: {
|
|
612
712
|
'projectID': projectId,
|
|
613
|
-
'
|
|
713
|
+
'instanceID': instanceId,
|
|
614
714
|
'adHocNodeID': adHocNodeId,
|
|
615
715
|
},
|
|
616
716
|
body: requestBody,
|
|
@@ -624,7 +724,7 @@ export class BpmnService {
|
|
|
624
724
|
* values, which may cause the subprocess to complete or branch.
|
|
625
725
|
*
|
|
626
726
|
* @param projectId
|
|
627
|
-
* @param
|
|
727
|
+
* @param instanceId
|
|
628
728
|
* @param adHocNodeId
|
|
629
729
|
* @param requestBody
|
|
630
730
|
* @returns any OK
|
|
@@ -632,7 +732,7 @@ export class BpmnService {
|
|
|
632
732
|
*/
|
|
633
733
|
public setBpmnAdHocVariables(
|
|
634
734
|
projectId: string,
|
|
635
|
-
|
|
735
|
+
instanceId: string,
|
|
636
736
|
adHocNodeId: string,
|
|
637
737
|
requestBody: {
|
|
638
738
|
variables?: Record<string, any>;
|
|
@@ -640,10 +740,10 @@ export class BpmnService {
|
|
|
640
740
|
): CancelablePromise<any> {
|
|
641
741
|
return this.httpRequest.request({
|
|
642
742
|
method: 'POST',
|
|
643
|
-
url: '/projects/{projectID}/bpmn/instances/{
|
|
743
|
+
url: '/projects/{projectID}/bpmn/instances/{instanceID}/adhoc/{adHocNodeID}/variables',
|
|
644
744
|
path: {
|
|
645
745
|
'projectID': projectId,
|
|
646
|
-
'
|
|
746
|
+
'instanceID': instanceId,
|
|
647
747
|
'adHocNodeID': adHocNodeId,
|
|
648
748
|
},
|
|
649
749
|
body: requestBody,
|
|
@@ -657,32 +757,32 @@ export class BpmnService {
|
|
|
657
757
|
* flag layers on top. Idempotent - a second call against an already-
|
|
658
758
|
* suspended instance is a no-op.
|
|
659
759
|
*
|
|
660
|
-
* While suspended
|
|
661
|
-
*
|
|
662
|
-
*
|
|
663
|
-
*
|
|
760
|
+
* While suspended, cancel, terminate, resolve-incident and variable
|
|
761
|
+
* update still apply. Anything else that reaches the instance, such as a
|
|
762
|
+
* job completion, a message or a due timer, applies on resume, in the
|
|
763
|
+
* order it arrived.
|
|
664
764
|
*
|
|
665
|
-
* The
|
|
666
|
-
*
|
|
667
|
-
*
|
|
765
|
+
* The suspension (operator, reason, timestamp) is also recorded in the
|
|
766
|
+
* instance's history as a `SuspendInstanceEvent`, so the timeline view on
|
|
767
|
+
* the instance detail page can render the cycle.
|
|
668
768
|
*
|
|
669
769
|
* @param projectId
|
|
670
|
-
* @param
|
|
770
|
+
* @param instanceId
|
|
671
771
|
* @param requestBody
|
|
672
772
|
* @returns void
|
|
673
773
|
* @throws ApiError
|
|
674
774
|
*/
|
|
675
775
|
public suspendBpmnInstance(
|
|
676
776
|
projectId: string,
|
|
677
|
-
|
|
777
|
+
instanceId: string,
|
|
678
778
|
requestBody?: SuspendBpmnInstanceRequest,
|
|
679
779
|
): CancelablePromise<void> {
|
|
680
780
|
return this.httpRequest.request({
|
|
681
781
|
method: 'POST',
|
|
682
|
-
url: '/projects/{projectID}/bpmn/instances/{
|
|
782
|
+
url: '/projects/{projectID}/bpmn/instances/{instanceID}/suspend',
|
|
683
783
|
path: {
|
|
684
784
|
'projectID': projectId,
|
|
685
|
-
'
|
|
785
|
+
'instanceID': instanceId,
|
|
686
786
|
},
|
|
687
787
|
body: requestBody,
|
|
688
788
|
mediaType: 'application/json',
|
|
@@ -695,91 +795,93 @@ export class BpmnService {
|
|
|
695
795
|
* is resumed as well. Idempotent.
|
|
696
796
|
*
|
|
697
797
|
* @param projectId
|
|
698
|
-
* @param
|
|
798
|
+
* @param instanceId
|
|
699
799
|
* @returns void
|
|
700
800
|
* @throws ApiError
|
|
701
801
|
*/
|
|
702
802
|
public resumeBpmnInstance(
|
|
703
803
|
projectId: string,
|
|
704
|
-
|
|
804
|
+
instanceId: string,
|
|
705
805
|
): CancelablePromise<void> {
|
|
706
806
|
return this.httpRequest.request({
|
|
707
807
|
method: 'POST',
|
|
708
|
-
url: '/projects/{projectID}/bpmn/instances/{
|
|
808
|
+
url: '/projects/{projectID}/bpmn/instances/{instanceID}/resume',
|
|
709
809
|
path: {
|
|
710
810
|
'projectID': projectId,
|
|
711
|
-
'
|
|
811
|
+
'instanceID': instanceId,
|
|
712
812
|
},
|
|
713
813
|
});
|
|
714
814
|
}
|
|
715
815
|
/**
|
|
716
|
-
* Suspend
|
|
717
|
-
* Pauses every running instance of one deployed process
|
|
718
|
-
* rejects new instance starts on that
|
|
816
|
+
* Suspend a deployed version of a BPMN process
|
|
817
|
+
* Pauses every running instance of one deployed process version AND
|
|
818
|
+
* rejects new instance starts on that version until it is resumed.
|
|
719
819
|
*
|
|
720
|
-
* The handler acquires a row-level lock on the definition before flipping
|
|
721
|
-
* the flag so a `StartBpmnInstance` racing the suspend can't slip through.
|
|
722
|
-
* It then iterates over every running instance (`status='RUNNING'`) and
|
|
723
|
-
* sends each one a definition-scope suspend signal via the engine API.
|
|
724
820
|
* Instances that were also explicitly instance-suspended stay paused
|
|
725
821
|
* after a definition-scope resume - the operator must clear that scope
|
|
726
822
|
* too.
|
|
727
823
|
*
|
|
728
|
-
* Idempotent.
|
|
729
|
-
*
|
|
730
|
-
* came
|
|
824
|
+
* Idempotent. Suspending again reaches the running instances an earlier
|
|
825
|
+
* call missed. The reason reaches every affected instance's history
|
|
826
|
+
* (`SuspendDefinitionEvent`) so the UI can render where the pause came
|
|
827
|
+
* from.
|
|
731
828
|
*
|
|
732
829
|
* @param projectId
|
|
733
|
-
* @param
|
|
830
|
+
* @param processId
|
|
831
|
+
* @param version
|
|
734
832
|
* @param requestBody
|
|
735
833
|
* @returns void
|
|
736
834
|
* @throws ApiError
|
|
737
835
|
*/
|
|
738
836
|
public suspendBpmnDefinition(
|
|
739
837
|
projectId: string,
|
|
740
|
-
|
|
838
|
+
processId: string,
|
|
839
|
+
version: number,
|
|
741
840
|
requestBody?: SuspendBpmnDefinitionRequest,
|
|
742
841
|
): CancelablePromise<void> {
|
|
743
842
|
return this.httpRequest.request({
|
|
744
843
|
method: 'POST',
|
|
745
|
-
url: '/projects/{projectID}/bpmn/
|
|
844
|
+
url: '/projects/{projectID}/bpmn/processes/{processID}/versions/{version}/suspend',
|
|
746
845
|
path: {
|
|
747
846
|
'projectID': projectId,
|
|
748
|
-
'
|
|
847
|
+
'processID': processId,
|
|
848
|
+
'version': version,
|
|
749
849
|
},
|
|
750
850
|
body: requestBody,
|
|
751
851
|
mediaType: 'application/json',
|
|
752
852
|
errors: {
|
|
753
|
-
404: `
|
|
853
|
+
404: `Process version not found`,
|
|
754
854
|
},
|
|
755
855
|
});
|
|
756
856
|
}
|
|
757
857
|
/**
|
|
758
|
-
* Resume a suspended BPMN
|
|
759
|
-
* Clears the definition-scope suspension and
|
|
760
|
-
*
|
|
761
|
-
*
|
|
762
|
-
*
|
|
763
|
-
* Idempotent.
|
|
858
|
+
* Resume a suspended version of a BPMN process
|
|
859
|
+
* Clears the definition-scope suspension and resumes every running
|
|
860
|
+
* instance of the version. Instances that were also instance-suspended
|
|
861
|
+
* stay paused until their own scope is cleared. New instance starts are
|
|
862
|
+
* accepted again. Idempotent.
|
|
764
863
|
*
|
|
765
864
|
* @param projectId
|
|
766
|
-
* @param
|
|
865
|
+
* @param processId
|
|
866
|
+
* @param version
|
|
767
867
|
* @returns void
|
|
768
868
|
* @throws ApiError
|
|
769
869
|
*/
|
|
770
870
|
public resumeBpmnDefinition(
|
|
771
871
|
projectId: string,
|
|
772
|
-
|
|
872
|
+
processId: string,
|
|
873
|
+
version: number,
|
|
773
874
|
): CancelablePromise<void> {
|
|
774
875
|
return this.httpRequest.request({
|
|
775
876
|
method: 'POST',
|
|
776
|
-
url: '/projects/{projectID}/bpmn/
|
|
877
|
+
url: '/projects/{projectID}/bpmn/processes/{processID}/versions/{version}/resume',
|
|
777
878
|
path: {
|
|
778
879
|
'projectID': projectId,
|
|
779
|
-
'
|
|
880
|
+
'processID': processId,
|
|
881
|
+
'version': version,
|
|
780
882
|
},
|
|
781
883
|
errors: {
|
|
782
|
-
404: `
|
|
884
|
+
404: `Process version not found`,
|
|
783
885
|
},
|
|
784
886
|
});
|
|
785
887
|
}
|
|
@@ -827,6 +929,9 @@ export class BpmnService {
|
|
|
827
929
|
* never fix (e.g. `PAYMENT_DECLINED`). SDK workers send this automatically
|
|
828
930
|
* when a handler throws a typed `BpmnError`.
|
|
829
931
|
*
|
|
932
|
+
* Once the instance has ended, any report on its jobs answers 200 and
|
|
933
|
+
* changes nothing.
|
|
934
|
+
*
|
|
830
935
|
* @param projectId
|
|
831
936
|
* @param executionKey
|
|
832
937
|
* @param requestBody
|
|
@@ -837,13 +942,19 @@ export class BpmnService {
|
|
|
837
942
|
projectId: string,
|
|
838
943
|
executionKey: string,
|
|
839
944
|
requestBody: {
|
|
945
|
+
/**
|
|
946
|
+
* Instance ID returned by the poll response.
|
|
947
|
+
*/
|
|
948
|
+
instanceID: string;
|
|
840
949
|
errorCode: string;
|
|
841
950
|
/**
|
|
842
951
|
* Optional worker identity (the same `clientID` used to poll).
|
|
843
952
|
* When supplied, a worker that no longer holds the job's lock
|
|
844
953
|
* gets 409 and its report is discarded, so a stale report can't
|
|
845
|
-
* requeue or fail the job.
|
|
846
|
-
*
|
|
954
|
+
* requeue or fail the job. Repeating the report this worker last
|
|
955
|
+
* made on the job answers 200 again and changes nothing. Without
|
|
956
|
+
* it, the report applies to an open job no worker holds a live
|
|
957
|
+
* lock on.
|
|
847
958
|
*
|
|
848
959
|
*/
|
|
849
960
|
clientID?: string;
|
|
@@ -872,10 +983,12 @@ export class BpmnService {
|
|
|
872
983
|
body: requestBody,
|
|
873
984
|
mediaType: 'application/json',
|
|
874
985
|
errors: {
|
|
875
|
-
404: `
|
|
876
|
-
409: `This worker no longer holds the job
|
|
877
|
-
|
|
878
|
-
|
|
986
|
+
404: `The instance is running and has no job with this execution key.`,
|
|
987
|
+
409: `The report was discarded. This worker no longer holds the job: its
|
|
988
|
+
lock ran out, another worker holds it, or the job has finished.
|
|
989
|
+
Without a \`clientID\`, a worker holds a live lock on the job, named in
|
|
990
|
+
the message, or the job already ended. The message says when the job
|
|
991
|
+
was cancelled.
|
|
879
992
|
`,
|
|
880
993
|
},
|
|
881
994
|
});
|
|
@@ -898,14 +1011,16 @@ export class BpmnService {
|
|
|
898
1011
|
* Optional worker identity (the same `clientID` used to poll)
|
|
899
1012
|
* applied to every item in the batch - a batch is one worker's
|
|
900
1013
|
* report. When supplied, an item this worker no longer holds
|
|
901
|
-
* comes back with status `error` and its result is discarded
|
|
902
|
-
*
|
|
1014
|
+
* comes back with status `error` and its result is discarded,
|
|
1015
|
+
* and repeating this worker's last report on an item changes
|
|
1016
|
+
* nothing. Without it, an item a worker holds a live lock on, or
|
|
1017
|
+
* one that already ended, comes back with status `error`.
|
|
903
1018
|
*
|
|
904
1019
|
*/
|
|
905
1020
|
clientID?: string;
|
|
906
1021
|
items: Array<{
|
|
907
1022
|
executionKey: string;
|
|
908
|
-
|
|
1023
|
+
instanceID: string;
|
|
909
1024
|
variables?: Record<string, any>;
|
|
910
1025
|
}>;
|
|
911
1026
|
},
|
|
@@ -943,8 +1058,10 @@ export class BpmnService {
|
|
|
943
1058
|
* Optional worker identity (the same `clientID` used to poll)
|
|
944
1059
|
* applied to every item in the batch - a batch is one worker's
|
|
945
1060
|
* report. When supplied, an item this worker no longer holds
|
|
946
|
-
* comes back with status `error` and the job is left untouched
|
|
947
|
-
*
|
|
1061
|
+
* comes back with status `error` and the job is left untouched,
|
|
1062
|
+
* and repeating this worker's last report on an item changes
|
|
1063
|
+
* nothing. Without it, an item a worker holds a live lock on, or
|
|
1064
|
+
* one that already ended, comes back with status `error`.
|
|
948
1065
|
*
|
|
949
1066
|
*/
|
|
950
1067
|
clientID?: string;
|
|
@@ -959,7 +1076,7 @@ export class BpmnService {
|
|
|
959
1076
|
retryable?: boolean;
|
|
960
1077
|
items: Array<{
|
|
961
1078
|
executionKey: string;
|
|
962
|
-
|
|
1079
|
+
instanceID: string;
|
|
963
1080
|
errorCode: string;
|
|
964
1081
|
variables?: Record<string, any>;
|
|
965
1082
|
}>;
|
|
@@ -978,31 +1095,41 @@ export class BpmnService {
|
|
|
978
1095
|
/**
|
|
979
1096
|
* List User Tasks
|
|
980
1097
|
* Paginated list of user tasks for the project, optionally filtered by
|
|
981
|
-
*
|
|
1098
|
+
* instance, status, assignee, candidate user, candidate group or due date.
|
|
982
1099
|
* Requires Executor role on the project.
|
|
983
1100
|
*
|
|
984
1101
|
* @param projectId
|
|
985
|
-
* @param
|
|
1102
|
+
* @param instanceId Only this instance's tasks. A test run's tasks list only by its instance.
|
|
986
1103
|
* @param status
|
|
987
1104
|
* @param assignee
|
|
988
1105
|
* @param candidateUser
|
|
989
1106
|
* @param candidateGroup
|
|
990
1107
|
* @param businessId Exact-match filter on the caller-supplied correlation key.
|
|
991
|
-
* @param
|
|
992
|
-
* @param
|
|
1108
|
+
* @param dueAfter Only tasks due at or after this time.
|
|
1109
|
+
* @param dueBefore Only tasks due before this time. With `status=CREATED` and the current time, the overdue tasks.
|
|
1110
|
+
* @param sort `created` lists the newest first, and is the default. `dueDate` lists
|
|
1111
|
+
* the soonest due first and tasks without a due date last. `priority`
|
|
1112
|
+
* lists the highest priority first. Both list the oldest first among
|
|
1113
|
+
* equals. A cursor continues only a list of the same sort.
|
|
1114
|
+
*
|
|
1115
|
+
* @param cursor The `nextCursor` of the page before, absent for the first page.
|
|
1116
|
+
* @param limit Most tasks per page, 20 by default and 100 at most.
|
|
993
1117
|
* @returns BpmnUserTaskPaginatedResponse OK
|
|
994
1118
|
* @throws ApiError
|
|
995
1119
|
*/
|
|
996
1120
|
public listBpmnUserTasks(
|
|
997
1121
|
projectId: string,
|
|
998
|
-
|
|
1122
|
+
instanceId?: string,
|
|
999
1123
|
status?: 'CREATED' | 'COMPLETED' | 'CANCELED' | 'FAILED',
|
|
1000
1124
|
assignee?: string,
|
|
1001
1125
|
candidateUser?: string,
|
|
1002
1126
|
candidateGroup?: string,
|
|
1003
1127
|
businessId?: string,
|
|
1004
|
-
|
|
1005
|
-
|
|
1128
|
+
dueAfter?: string,
|
|
1129
|
+
dueBefore?: string,
|
|
1130
|
+
sort?: 'created' | 'dueDate' | 'priority',
|
|
1131
|
+
cursor?: string,
|
|
1132
|
+
limit?: number,
|
|
1006
1133
|
): CancelablePromise<BpmnUserTaskPaginatedResponse> {
|
|
1007
1134
|
return this.httpRequest.request({
|
|
1008
1135
|
method: 'GET',
|
|
@@ -1011,14 +1138,17 @@ export class BpmnService {
|
|
|
1011
1138
|
'projectID': projectId,
|
|
1012
1139
|
},
|
|
1013
1140
|
query: {
|
|
1014
|
-
'
|
|
1141
|
+
'instanceID': instanceId,
|
|
1015
1142
|
'status': status,
|
|
1016
1143
|
'assignee': assignee,
|
|
1017
1144
|
'candidateUser': candidateUser,
|
|
1018
1145
|
'candidateGroup': candidateGroup,
|
|
1019
1146
|
'businessId': businessId,
|
|
1020
|
-
'
|
|
1021
|
-
'
|
|
1147
|
+
'dueAfter': dueAfter,
|
|
1148
|
+
'dueBefore': dueBefore,
|
|
1149
|
+
'sort': sort,
|
|
1150
|
+
'cursor': cursor,
|
|
1151
|
+
'limit': limit,
|
|
1022
1152
|
},
|
|
1023
1153
|
});
|
|
1024
1154
|
}
|
|
@@ -1029,15 +1159,25 @@ export class BpmnService {
|
|
|
1029
1159
|
* the caller's identity-provider groups. Requires Viewer role on the project.
|
|
1030
1160
|
*
|
|
1031
1161
|
* @param projectId
|
|
1032
|
-
* @param
|
|
1033
|
-
* @param
|
|
1162
|
+
* @param dueAfter Only tasks due at or after this time.
|
|
1163
|
+
* @param dueBefore Only tasks due before this time. With the current time, the caller's overdue tasks.
|
|
1164
|
+
* @param sort `created` lists the newest first, and is the default. `dueDate` lists
|
|
1165
|
+
* the soonest due first and tasks without a due date last. `priority`
|
|
1166
|
+
* lists the highest priority first. Both list the oldest first among
|
|
1167
|
+
* equals. A cursor continues only a list of the same sort.
|
|
1168
|
+
*
|
|
1169
|
+
* @param cursor The `nextCursor` of the page before, absent for the first page.
|
|
1170
|
+
* @param limit Most tasks per page, 20 by default and 100 at most.
|
|
1034
1171
|
* @returns BpmnUserTaskPaginatedResponse OK
|
|
1035
1172
|
* @throws ApiError
|
|
1036
1173
|
*/
|
|
1037
1174
|
public listBpmnUserTasksForCaller(
|
|
1038
1175
|
projectId: string,
|
|
1039
|
-
|
|
1040
|
-
|
|
1176
|
+
dueAfter?: string,
|
|
1177
|
+
dueBefore?: string,
|
|
1178
|
+
sort?: 'created' | 'dueDate' | 'priority',
|
|
1179
|
+
cursor?: string,
|
|
1180
|
+
limit?: number,
|
|
1041
1181
|
): CancelablePromise<BpmnUserTaskPaginatedResponse> {
|
|
1042
1182
|
return this.httpRequest.request({
|
|
1043
1183
|
method: 'GET',
|
|
@@ -1046,8 +1186,11 @@ export class BpmnService {
|
|
|
1046
1186
|
'projectID': projectId,
|
|
1047
1187
|
},
|
|
1048
1188
|
query: {
|
|
1049
|
-
'
|
|
1050
|
-
'
|
|
1189
|
+
'dueAfter': dueAfter,
|
|
1190
|
+
'dueBefore': dueBefore,
|
|
1191
|
+
'sort': sort,
|
|
1192
|
+
'cursor': cursor,
|
|
1193
|
+
'limit': limit,
|
|
1051
1194
|
},
|
|
1052
1195
|
});
|
|
1053
1196
|
}
|
|
@@ -1195,7 +1338,7 @@ export class BpmnService {
|
|
|
1195
1338
|
* Publish a BPMN message
|
|
1196
1339
|
* Publishes a message into the project. Each message is delivered to at
|
|
1197
1340
|
* most one waiting catch event whose subscription matches `messageName`
|
|
1198
|
-
* and whose correlation
|
|
1341
|
+
* and whose correlation value equals `correlationKeys`. If no
|
|
1199
1342
|
* subscriber is currently waiting the message is buffered up to its TTL
|
|
1200
1343
|
* and delivered to the first matching subscriber that registers.
|
|
1201
1344
|
*
|
|
@@ -1303,11 +1446,11 @@ export class BpmnService {
|
|
|
1303
1446
|
* @param projectId
|
|
1304
1447
|
* @param page
|
|
1305
1448
|
* @param pageSize
|
|
1306
|
-
* @param q Optional case-insensitive
|
|
1449
|
+
* @param q Optional case-insensitive substring match against process id or process name.
|
|
1307
1450
|
* @param createdAfter Bounds the totalCount aggregate to instances created at or after this
|
|
1308
|
-
* timestamp. Strongly recommended for monitoring views -
|
|
1309
|
-
*
|
|
1310
|
-
*
|
|
1451
|
+
* timestamp. Strongly recommended for monitoring views - ended
|
|
1452
|
+
* instances stay until retention deletes them, and unfiltered totals
|
|
1453
|
+
* scan every kept instance per definition. runningCount ignores this filter (it is always
|
|
1311
1454
|
* point-in-time).
|
|
1312
1455
|
*
|
|
1313
1456
|
* @param suspended Filter by paused versions. `true` → only processes with at least one
|
|
@@ -1392,4 +1535,44 @@ export class BpmnService {
|
|
|
1392
1535
|
},
|
|
1393
1536
|
});
|
|
1394
1537
|
}
|
|
1538
|
+
/**
|
|
1539
|
+
* Get one deployed version of a BPMN process
|
|
1540
|
+
* Returns the single deployed version identified by (processID, version)
|
|
1541
|
+
* with its instance counts and suspension state, wherever it falls in the
|
|
1542
|
+
* pages of `ListBpmnProcessVersions`.
|
|
1543
|
+
*
|
|
1544
|
+
* @param projectId
|
|
1545
|
+
* @param processId
|
|
1546
|
+
* @param version
|
|
1547
|
+
* @param createdAfter Bounds the totalCount aggregate to instances created at or after this
|
|
1548
|
+
* timestamp. See ListBpmnProcesses for rationale. runningCount ignores
|
|
1549
|
+
* this filter.
|
|
1550
|
+
*
|
|
1551
|
+
* @returns BpmnProcessVersion OK
|
|
1552
|
+
* @throws ApiError
|
|
1553
|
+
*/
|
|
1554
|
+
public getBpmnProcessVersion(
|
|
1555
|
+
projectId: string,
|
|
1556
|
+
processId: string,
|
|
1557
|
+
version: number,
|
|
1558
|
+
createdAfter?: string,
|
|
1559
|
+
): CancelablePromise<BpmnProcessVersion> {
|
|
1560
|
+
return this.httpRequest.request({
|
|
1561
|
+
method: 'GET',
|
|
1562
|
+
url: '/projects/{projectID}/bpmn/processes/{processID}/versions/{version}',
|
|
1563
|
+
path: {
|
|
1564
|
+
'projectID': projectId,
|
|
1565
|
+
'processID': processId,
|
|
1566
|
+
'version': version,
|
|
1567
|
+
},
|
|
1568
|
+
query: {
|
|
1569
|
+
'createdAfter': createdAfter,
|
|
1570
|
+
},
|
|
1571
|
+
errors: {
|
|
1572
|
+
401: `Unauthorized`,
|
|
1573
|
+
404: `Not Found`,
|
|
1574
|
+
500: `Internal Server Error`,
|
|
1575
|
+
},
|
|
1576
|
+
});
|
|
1577
|
+
}
|
|
1395
1578
|
}
|