@quantumbpm/sdk 1.2.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 +93 -34
- package/dist/auth.d.ts +19 -14
- package/dist/auth.js +62 -84
- package/dist/bpmn.d.ts +83 -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 +9 -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 +17 -17
- package/dist/generated/models/BpmnIncident.js +11 -11
- package/dist/generated/models/BpmnIncidentRecord.d.ts +10 -18
- package/dist/generated/models/BpmnIncidentRecord.js +6 -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 +21 -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 +49 -16
- 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/CorrelationKeyNumber.d.ts +1 -1
- package/dist/generated/models/CorrelationKeyNumber.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 +8 -2
- package/dist/generated/models/Error.js +6 -2
- package/dist/generated/models/EvaluateStoredRequest.d.ts +6 -4
- 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 +9 -9
- package/dist/generated/models/ExternalJob.js +1 -1
- package/dist/generated/models/ExternalJobBatchResponse.d.ts +2 -2
- package/dist/generated/models/ExternalJobBatchResponse.js +1 -1
- package/dist/generated/models/JoinArrivals.d.ts +8 -0
- package/dist/generated/models/JoinArrivals.js +3 -0
- package/dist/generated/models/PollBpmnJobRequest.d.ts +1 -1
- package/dist/generated/models/PollBpmnJobRequest.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/SuspensionEntry.d.ts +2 -2
- package/dist/generated/models/SuspensionEntry.js +1 -1
- package/dist/generated/models/UpdateDefinitionRequest.d.ts +1 -5
- package/dist/generated/models/UpdateDefinitionRequest.js +1 -1
- package/dist/generated/models/UpdateUserTaskAssignmentRequest.d.ts +11 -4
- package/dist/generated/models/UpdateUserTaskAssignmentRequest.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 +191 -94
- package/dist/generated/services/BpmnService.js +300 -119
- package/dist/generated/services/DefaultService.d.ts +118 -118
- package/dist/generated/services/DefaultService.js +156 -160
- package/dist/index.d.ts +8 -8
- package/dist/index.js +7 -7
- package/dist/tracing.js +2 -2
- package/dist/workers.d.ts +41 -7
- package/dist/workers.js +186 -53
- package/package.json +2 -4
- package/src/auth.test.ts +128 -0
- package/src/auth.ts +67 -64
- package/src/bpmn.ts +131 -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 +9 -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 +17 -17
- package/src/generated/models/BpmnIncidentRecord.ts +10 -18
- package/src/generated/models/BpmnIncidentRecordPaginatedResponse.ts +2 -2
- package/src/generated/models/BpmnInstance.ts +21 -29
- package/src/generated/models/BpmnInstancePaginatedResponse.ts +2 -2
- package/src/generated/models/BpmnInstanceState.ts +49 -16
- 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/CorrelationKeyNumber.ts +1 -1
- 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 +8 -2
- package/src/generated/models/EvaluateStoredRequest.ts +6 -4
- package/src/generated/models/EvaluationResult.ts +6 -0
- package/src/generated/models/Execution.ts +30 -9
- package/src/generated/models/ExternalJob.ts +9 -9
- package/src/generated/models/ExternalJobBatchResponse.ts +2 -2
- package/src/generated/models/JoinArrivals.ts +13 -0
- package/src/generated/models/PollBpmnJobRequest.ts +1 -1
- package/src/generated/models/StartBpmnInstanceRequest.ts +6 -2
- package/src/generated/models/SuspendBpmnInstanceRequest.ts +1 -1
- package/src/generated/models/SuspensionEntry.ts +2 -2
- package/src/generated/models/UpdateDefinitionRequest.ts +1 -5
- package/src/generated/models/UpdateUserTaskAssignmentRequest.ts +11 -4
- package/src/generated/models/UserTask.ts +15 -11
- package/src/generated/services/BpmnService.ts +357 -140
- package/src/generated/services/DefaultService.ts +178 -189
- package/src/index.test.ts +77 -31
- package/src/index.ts +13 -6
- package/src/tracing.ts +1 -1
- package/src/workers.test.ts +280 -3
- package/src/workers.ts +200 -60
- 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
|
/**
|
|
@@ -98,6 +106,9 @@ export class BpmnService {
|
|
|
98
106
|
'projectID': projectId,
|
|
99
107
|
'resourceID': resourceId,
|
|
100
108
|
},
|
|
109
|
+
errors: {
|
|
110
|
+
404: `Not Found`,
|
|
111
|
+
},
|
|
101
112
|
});
|
|
102
113
|
}
|
|
103
114
|
/**
|
|
@@ -126,7 +137,7 @@ export class BpmnService {
|
|
|
126
137
|
body: requestBody,
|
|
127
138
|
mediaType: 'application/json',
|
|
128
139
|
errors: {
|
|
129
|
-
409: `Conflict
|
|
140
|
+
409: `Conflict`,
|
|
130
141
|
},
|
|
131
142
|
});
|
|
132
143
|
}
|
|
@@ -153,15 +164,18 @@ export class BpmnService {
|
|
|
153
164
|
'resourceID': resourceId,
|
|
154
165
|
},
|
|
155
166
|
errors: {
|
|
156
|
-
409: `Conflict
|
|
167
|
+
409: `Conflict`,
|
|
157
168
|
},
|
|
158
169
|
});
|
|
159
170
|
}
|
|
160
171
|
/**
|
|
161
172
|
* Deploy a BPMN resource
|
|
162
173
|
* Marks all processes inside the resource as executable, making them
|
|
163
|
-
* available to start instances of.
|
|
164
|
-
* 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.
|
|
165
179
|
*
|
|
166
180
|
* @param projectId
|
|
167
181
|
* @param resourceId
|
|
@@ -182,16 +196,29 @@ export class BpmnService {
|
|
|
182
196
|
errors: {
|
|
183
197
|
400: `Bad Request`,
|
|
184
198
|
401: `Unauthorized`,
|
|
199
|
+
404: `Not Found`,
|
|
200
|
+
409: `Conflict`,
|
|
185
201
|
500: `Internal Server Error`,
|
|
186
202
|
},
|
|
187
203
|
});
|
|
188
204
|
}
|
|
189
205
|
/**
|
|
190
|
-
* Start a test instance from a
|
|
191
|
-
* Starts a
|
|
192
|
-
*
|
|
193
|
-
*
|
|
194
|
-
*
|
|
206
|
+
* Start a test instance from a resource
|
|
207
|
+
* Starts a test instance of a resource, draft or deployed. A draft can
|
|
208
|
+
* only be started this way, which makes it the way to try out an
|
|
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.
|
|
195
222
|
*
|
|
196
223
|
* @param projectId
|
|
197
224
|
* @param resourceId
|
|
@@ -205,9 +232,9 @@ export class BpmnService {
|
|
|
205
232
|
requestBody: StartBpmnTestInstanceRequest,
|
|
206
233
|
): CancelablePromise<{
|
|
207
234
|
/**
|
|
208
|
-
*
|
|
235
|
+
* Identifier of the new test instance.
|
|
209
236
|
*/
|
|
210
|
-
|
|
237
|
+
instanceID?: string;
|
|
211
238
|
}> {
|
|
212
239
|
return this.httpRequest.request({
|
|
213
240
|
method: 'POST',
|
|
@@ -221,6 +248,7 @@ export class BpmnService {
|
|
|
221
248
|
errors: {
|
|
222
249
|
400: `Bad Request`,
|
|
223
250
|
401: `Unauthorized`,
|
|
251
|
+
404: `Not Found`,
|
|
224
252
|
500: `Internal Server Error`,
|
|
225
253
|
},
|
|
226
254
|
});
|
|
@@ -257,7 +285,7 @@ export class BpmnService {
|
|
|
257
285
|
}
|
|
258
286
|
/**
|
|
259
287
|
* List all versions of a BPMN resource
|
|
260
|
-
* 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.
|
|
261
289
|
* @param projectId
|
|
262
290
|
* @param definitionsId
|
|
263
291
|
* @param page
|
|
@@ -318,23 +346,23 @@ export class BpmnService {
|
|
|
318
346
|
* List child instances of a BPMN instance
|
|
319
347
|
* Returns instances that this instance spawned via CallActivity elements.
|
|
320
348
|
* Useful for navigating into a multi-level process hierarchy (parents
|
|
321
|
-
* can be discovered via `
|
|
349
|
+
* can be discovered via `parentInstanceID` on the child).
|
|
322
350
|
*
|
|
323
351
|
* @param projectId
|
|
324
|
-
* @param
|
|
352
|
+
* @param instanceId
|
|
325
353
|
* @returns BpmnInstanceChildrenResponse OK
|
|
326
354
|
* @throws ApiError
|
|
327
355
|
*/
|
|
328
356
|
public getBpmnInstanceChildren(
|
|
329
357
|
projectId: string,
|
|
330
|
-
|
|
358
|
+
instanceId: string,
|
|
331
359
|
): CancelablePromise<BpmnInstanceChildrenResponse> {
|
|
332
360
|
return this.httpRequest.request({
|
|
333
361
|
method: 'GET',
|
|
334
|
-
url: '/projects/{projectID}/bpmn/instances/{
|
|
362
|
+
url: '/projects/{projectID}/bpmn/instances/{instanceID}/children',
|
|
335
363
|
path: {
|
|
336
364
|
'projectID': projectId,
|
|
337
|
-
'
|
|
365
|
+
'instanceID': instanceId,
|
|
338
366
|
},
|
|
339
367
|
});
|
|
340
368
|
}
|
|
@@ -342,22 +370,22 @@ export class BpmnService {
|
|
|
342
370
|
* Get BPMN instance variables
|
|
343
371
|
* Returns the current variables in the root scope of a running or completed instance.
|
|
344
372
|
* @param projectId
|
|
345
|
-
* @param
|
|
373
|
+
* @param instanceId
|
|
346
374
|
* @returns any OK
|
|
347
375
|
* @throws ApiError
|
|
348
376
|
*/
|
|
349
377
|
public getBpmnInstanceVariables(
|
|
350
378
|
projectId: string,
|
|
351
|
-
|
|
379
|
+
instanceId: string,
|
|
352
380
|
): CancelablePromise<{
|
|
353
381
|
variables?: Record<string, any>;
|
|
354
382
|
}> {
|
|
355
383
|
return this.httpRequest.request({
|
|
356
384
|
method: 'GET',
|
|
357
|
-
url: '/projects/{projectID}/bpmn/instances/{
|
|
385
|
+
url: '/projects/{projectID}/bpmn/instances/{instanceID}/variables',
|
|
358
386
|
path: {
|
|
359
387
|
'projectID': projectId,
|
|
360
|
-
'
|
|
388
|
+
'instanceID': instanceId,
|
|
361
389
|
},
|
|
362
390
|
});
|
|
363
391
|
}
|
|
@@ -369,29 +397,104 @@ export class BpmnService {
|
|
|
369
397
|
* payload are kept; pass `null` to clear a key.
|
|
370
398
|
*
|
|
371
399
|
* @param projectId
|
|
372
|
-
* @param
|
|
400
|
+
* @param instanceId
|
|
373
401
|
* @param requestBody
|
|
374
402
|
* @returns any OK
|
|
375
403
|
* @throws ApiError
|
|
376
404
|
*/
|
|
377
405
|
public updateBpmnInstanceVariables(
|
|
378
406
|
projectId: string,
|
|
379
|
-
|
|
407
|
+
instanceId: string,
|
|
380
408
|
requestBody: {
|
|
381
409
|
variables: Record<string, any>;
|
|
382
410
|
},
|
|
383
411
|
): CancelablePromise<any> {
|
|
384
412
|
return this.httpRequest.request({
|
|
385
413
|
method: 'PUT',
|
|
386
|
-
url: '/projects/{projectID}/bpmn/instances/{
|
|
414
|
+
url: '/projects/{projectID}/bpmn/instances/{instanceID}/variables',
|
|
387
415
|
path: {
|
|
388
416
|
'projectID': projectId,
|
|
389
|
-
'
|
|
417
|
+
'instanceID': instanceId,
|
|
390
418
|
},
|
|
391
419
|
body: requestBody,
|
|
392
420
|
mediaType: 'application/json',
|
|
393
421
|
});
|
|
394
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
|
+
}
|
|
395
498
|
/**
|
|
396
499
|
* Resolve an incident and retry the failed activity
|
|
397
500
|
* Marks an incident as resolved and re-runs the activity that produced it.
|
|
@@ -400,7 +503,7 @@ export class BpmnService {
|
|
|
400
503
|
* that triggered a FEEL evaluation error).
|
|
401
504
|
*
|
|
402
505
|
* @param projectId
|
|
403
|
-
* @param
|
|
506
|
+
* @param instanceId
|
|
404
507
|
* @param incidentId
|
|
405
508
|
* @param requestBody
|
|
406
509
|
* @returns any OK
|
|
@@ -408,7 +511,7 @@ export class BpmnService {
|
|
|
408
511
|
*/
|
|
409
512
|
public resolveBpmnIncident(
|
|
410
513
|
projectId: string,
|
|
411
|
-
|
|
514
|
+
instanceId: string,
|
|
412
515
|
incidentId: string,
|
|
413
516
|
requestBody?: {
|
|
414
517
|
variables?: Record<string, any>;
|
|
@@ -416,10 +519,10 @@ export class BpmnService {
|
|
|
416
519
|
): CancelablePromise<any> {
|
|
417
520
|
return this.httpRequest.request({
|
|
418
521
|
method: 'POST',
|
|
419
|
-
url: '/projects/{projectID}/bpmn/instances/{
|
|
522
|
+
url: '/projects/{projectID}/bpmn/instances/{instanceID}/incidents/{incidentID}/resolve',
|
|
420
523
|
path: {
|
|
421
524
|
'projectID': projectId,
|
|
422
|
-
'
|
|
525
|
+
'instanceID': instanceId,
|
|
423
526
|
'incidentID': incidentId,
|
|
424
527
|
},
|
|
425
528
|
body: requestBody,
|
|
@@ -430,37 +533,39 @@ export class BpmnService {
|
|
|
430
533
|
* List BPMN incidents
|
|
431
534
|
* Cross-instance audit listing of incidents in the project. By default
|
|
432
535
|
* returns open incidents first (unresolved), ordered by recency.
|
|
433
|
-
* Filterable by
|
|
536
|
+
* Filterable by process version, error type, status, and time window.
|
|
434
537
|
*
|
|
435
538
|
* Each row carries the parent process metadata (processID, processName)
|
|
436
539
|
* so a single page render needs no follow-up queries against the
|
|
437
540
|
* instances endpoint. Click-through to a specific instance still uses
|
|
438
|
-
* the
|
|
541
|
+
* the instance detail endpoint.
|
|
439
542
|
*
|
|
440
543
|
* @param projectId
|
|
441
|
-
* @param
|
|
442
|
-
* @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.
|
|
443
547
|
* @param status Filter by lifecycle status. `open` returns unresolved incidents;
|
|
444
548
|
* `resolved` returns only resolved ones. Omit to return both.
|
|
445
549
|
*
|
|
446
550
|
* @param errorType Restrict to a single error category (matches `BpmnIncidentRecord.errorType`).
|
|
447
551
|
* @param since Earliest `raisedAt` to include (inclusive).
|
|
448
552
|
* @param until Latest `raisedAt` to include (exclusive).
|
|
449
|
-
* @param page
|
|
450
|
-
* @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.
|
|
451
555
|
* @returns BpmnIncidentRecordPaginatedResponse OK
|
|
452
556
|
* @throws ApiError
|
|
453
557
|
*/
|
|
454
558
|
public listBpmnIncidents(
|
|
455
559
|
projectId: string,
|
|
456
|
-
|
|
457
|
-
|
|
560
|
+
processId?: string,
|
|
561
|
+
version?: number,
|
|
562
|
+
instanceId?: string,
|
|
458
563
|
status?: 'open' | 'resolved',
|
|
459
|
-
errorType?: 'BpmnError' | '
|
|
564
|
+
errorType?: 'BpmnError' | 'CompensationError' | 'FeelError' | 'GatewayNoMatch' | 'TimerResolution' | 'LinkNotFound' | 'MigrationError' | 'CallActivityCanceled' | 'ExternalRowRefreshError' | 'JobLockLost' | 'DecisionNotFound' | 'DecisionEvaluationError' | 'ProcessNotFound' | 'ProcessSuspended' | 'Unknown',
|
|
460
565
|
since?: string,
|
|
461
566
|
until?: string,
|
|
462
|
-
|
|
463
|
-
|
|
567
|
+
cursor?: string,
|
|
568
|
+
limit?: number,
|
|
464
569
|
): CancelablePromise<BpmnIncidentRecordPaginatedResponse> {
|
|
465
570
|
return this.httpRequest.request({
|
|
466
571
|
method: 'GET',
|
|
@@ -469,14 +574,15 @@ export class BpmnService {
|
|
|
469
574
|
'projectID': projectId,
|
|
470
575
|
},
|
|
471
576
|
query: {
|
|
472
|
-
'
|
|
473
|
-
'
|
|
577
|
+
'processID': processId,
|
|
578
|
+
'version': version,
|
|
579
|
+
'instanceID': instanceId,
|
|
474
580
|
'status': status,
|
|
475
581
|
'errorType': errorType,
|
|
476
582
|
'since': since,
|
|
477
583
|
'until': until,
|
|
478
|
-
'
|
|
479
|
-
'
|
|
584
|
+
'cursor': cursor,
|
|
585
|
+
'limit': limit,
|
|
480
586
|
},
|
|
481
587
|
});
|
|
482
588
|
}
|
|
@@ -488,22 +594,22 @@ export class BpmnService {
|
|
|
488
594
|
* and target. Validate the migration plan first via `MigrateValidate`.
|
|
489
595
|
*
|
|
490
596
|
* @param projectId
|
|
491
|
-
* @param
|
|
597
|
+
* @param instanceId
|
|
492
598
|
* @param requestBody
|
|
493
599
|
* @returns any OK
|
|
494
600
|
* @throws ApiError
|
|
495
601
|
*/
|
|
496
602
|
public migrateBpmnInstance(
|
|
497
603
|
projectId: string,
|
|
498
|
-
|
|
604
|
+
instanceId: string,
|
|
499
605
|
requestBody: MigrateBpmnInstanceRequest,
|
|
500
606
|
): CancelablePromise<any> {
|
|
501
607
|
return this.httpRequest.request({
|
|
502
608
|
method: 'POST',
|
|
503
|
-
url: '/projects/{projectID}/bpmn/instances/{
|
|
609
|
+
url: '/projects/{projectID}/bpmn/instances/{instanceID}/migrate',
|
|
504
610
|
path: {
|
|
505
611
|
'projectID': projectId,
|
|
506
|
-
'
|
|
612
|
+
'instanceID': instanceId,
|
|
507
613
|
},
|
|
508
614
|
body: requestBody,
|
|
509
615
|
mediaType: 'application/json',
|
|
@@ -517,22 +623,22 @@ export class BpmnService {
|
|
|
517
623
|
* to the user.
|
|
518
624
|
*
|
|
519
625
|
* @param projectId
|
|
520
|
-
* @param
|
|
626
|
+
* @param instanceId
|
|
521
627
|
* @param requestBody
|
|
522
628
|
* @returns MigrationValidationResult OK
|
|
523
629
|
* @throws ApiError
|
|
524
630
|
*/
|
|
525
631
|
public validateBpmnInstanceMigration(
|
|
526
632
|
projectId: string,
|
|
527
|
-
|
|
633
|
+
instanceId: string,
|
|
528
634
|
requestBody: MigrateBpmnInstanceRequest,
|
|
529
635
|
): CancelablePromise<MigrationValidationResult> {
|
|
530
636
|
return this.httpRequest.request({
|
|
531
637
|
method: 'POST',
|
|
532
|
-
url: '/projects/{projectID}/bpmn/instances/{
|
|
638
|
+
url: '/projects/{projectID}/bpmn/instances/{instanceID}/migrate/validate',
|
|
533
639
|
path: {
|
|
534
640
|
'projectID': projectId,
|
|
535
|
-
'
|
|
641
|
+
'instanceID': instanceId,
|
|
536
642
|
},
|
|
537
643
|
body: requestBody,
|
|
538
644
|
mediaType: 'application/json',
|
|
@@ -553,22 +659,22 @@ export class BpmnService {
|
|
|
553
659
|
* A batch is applied whole or not at all.
|
|
554
660
|
*
|
|
555
661
|
* @param projectId
|
|
556
|
-
* @param
|
|
662
|
+
* @param instanceId
|
|
557
663
|
* @param requestBody
|
|
558
664
|
* @returns any OK
|
|
559
665
|
* @throws ApiError
|
|
560
666
|
*/
|
|
561
667
|
public modifyBpmnInstance(
|
|
562
668
|
projectId: string,
|
|
563
|
-
|
|
669
|
+
instanceId: string,
|
|
564
670
|
requestBody: ModifyBpmnInstanceRequest,
|
|
565
671
|
): CancelablePromise<any> {
|
|
566
672
|
return this.httpRequest.request({
|
|
567
673
|
method: 'POST',
|
|
568
|
-
url: '/projects/{projectID}/bpmn/instances/{
|
|
674
|
+
url: '/projects/{projectID}/bpmn/instances/{instanceID}/modify',
|
|
569
675
|
path: {
|
|
570
676
|
'projectID': projectId,
|
|
571
|
-
'
|
|
677
|
+
'instanceID': instanceId,
|
|
572
678
|
},
|
|
573
679
|
body: requestBody,
|
|
574
680
|
mediaType: 'application/json',
|
|
@@ -585,7 +691,7 @@ export class BpmnService {
|
|
|
585
691
|
* can be triggered repeatedly until the ad-hoc subprocess completes.
|
|
586
692
|
*
|
|
587
693
|
* @param projectId
|
|
588
|
-
* @param
|
|
694
|
+
* @param instanceId
|
|
589
695
|
* @param adHocNodeId
|
|
590
696
|
* @param requestBody
|
|
591
697
|
* @returns any OK
|
|
@@ -593,7 +699,7 @@ export class BpmnService {
|
|
|
593
699
|
*/
|
|
594
700
|
public triggerBpmnAdHocNode(
|
|
595
701
|
projectId: string,
|
|
596
|
-
|
|
702
|
+
instanceId: string,
|
|
597
703
|
adHocNodeId: string,
|
|
598
704
|
requestBody: {
|
|
599
705
|
nodeID: string;
|
|
@@ -601,10 +707,10 @@ export class BpmnService {
|
|
|
601
707
|
): CancelablePromise<any> {
|
|
602
708
|
return this.httpRequest.request({
|
|
603
709
|
method: 'POST',
|
|
604
|
-
url: '/projects/{projectID}/bpmn/instances/{
|
|
710
|
+
url: '/projects/{projectID}/bpmn/instances/{instanceID}/adhoc/{adHocNodeID}/trigger',
|
|
605
711
|
path: {
|
|
606
712
|
'projectID': projectId,
|
|
607
|
-
'
|
|
713
|
+
'instanceID': instanceId,
|
|
608
714
|
'adHocNodeID': adHocNodeId,
|
|
609
715
|
},
|
|
610
716
|
body: requestBody,
|
|
@@ -618,7 +724,7 @@ export class BpmnService {
|
|
|
618
724
|
* values, which may cause the subprocess to complete or branch.
|
|
619
725
|
*
|
|
620
726
|
* @param projectId
|
|
621
|
-
* @param
|
|
727
|
+
* @param instanceId
|
|
622
728
|
* @param adHocNodeId
|
|
623
729
|
* @param requestBody
|
|
624
730
|
* @returns any OK
|
|
@@ -626,7 +732,7 @@ export class BpmnService {
|
|
|
626
732
|
*/
|
|
627
733
|
public setBpmnAdHocVariables(
|
|
628
734
|
projectId: string,
|
|
629
|
-
|
|
735
|
+
instanceId: string,
|
|
630
736
|
adHocNodeId: string,
|
|
631
737
|
requestBody: {
|
|
632
738
|
variables?: Record<string, any>;
|
|
@@ -634,10 +740,10 @@ export class BpmnService {
|
|
|
634
740
|
): CancelablePromise<any> {
|
|
635
741
|
return this.httpRequest.request({
|
|
636
742
|
method: 'POST',
|
|
637
|
-
url: '/projects/{projectID}/bpmn/instances/{
|
|
743
|
+
url: '/projects/{projectID}/bpmn/instances/{instanceID}/adhoc/{adHocNodeID}/variables',
|
|
638
744
|
path: {
|
|
639
745
|
'projectID': projectId,
|
|
640
|
-
'
|
|
746
|
+
'instanceID': instanceId,
|
|
641
747
|
'adHocNodeID': adHocNodeId,
|
|
642
748
|
},
|
|
643
749
|
body: requestBody,
|
|
@@ -651,32 +757,32 @@ export class BpmnService {
|
|
|
651
757
|
* flag layers on top. Idempotent - a second call against an already-
|
|
652
758
|
* suspended instance is a no-op.
|
|
653
759
|
*
|
|
654
|
-
* While suspended
|
|
655
|
-
*
|
|
656
|
-
*
|
|
657
|
-
*
|
|
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.
|
|
658
764
|
*
|
|
659
|
-
* The
|
|
660
|
-
*
|
|
661
|
-
*
|
|
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.
|
|
662
768
|
*
|
|
663
769
|
* @param projectId
|
|
664
|
-
* @param
|
|
770
|
+
* @param instanceId
|
|
665
771
|
* @param requestBody
|
|
666
772
|
* @returns void
|
|
667
773
|
* @throws ApiError
|
|
668
774
|
*/
|
|
669
775
|
public suspendBpmnInstance(
|
|
670
776
|
projectId: string,
|
|
671
|
-
|
|
777
|
+
instanceId: string,
|
|
672
778
|
requestBody?: SuspendBpmnInstanceRequest,
|
|
673
779
|
): CancelablePromise<void> {
|
|
674
780
|
return this.httpRequest.request({
|
|
675
781
|
method: 'POST',
|
|
676
|
-
url: '/projects/{projectID}/bpmn/instances/{
|
|
782
|
+
url: '/projects/{projectID}/bpmn/instances/{instanceID}/suspend',
|
|
677
783
|
path: {
|
|
678
784
|
'projectID': projectId,
|
|
679
|
-
'
|
|
785
|
+
'instanceID': instanceId,
|
|
680
786
|
},
|
|
681
787
|
body: requestBody,
|
|
682
788
|
mediaType: 'application/json',
|
|
@@ -689,91 +795,93 @@ export class BpmnService {
|
|
|
689
795
|
* is resumed as well. Idempotent.
|
|
690
796
|
*
|
|
691
797
|
* @param projectId
|
|
692
|
-
* @param
|
|
798
|
+
* @param instanceId
|
|
693
799
|
* @returns void
|
|
694
800
|
* @throws ApiError
|
|
695
801
|
*/
|
|
696
802
|
public resumeBpmnInstance(
|
|
697
803
|
projectId: string,
|
|
698
|
-
|
|
804
|
+
instanceId: string,
|
|
699
805
|
): CancelablePromise<void> {
|
|
700
806
|
return this.httpRequest.request({
|
|
701
807
|
method: 'POST',
|
|
702
|
-
url: '/projects/{projectID}/bpmn/instances/{
|
|
808
|
+
url: '/projects/{projectID}/bpmn/instances/{instanceID}/resume',
|
|
703
809
|
path: {
|
|
704
810
|
'projectID': projectId,
|
|
705
|
-
'
|
|
811
|
+
'instanceID': instanceId,
|
|
706
812
|
},
|
|
707
813
|
});
|
|
708
814
|
}
|
|
709
815
|
/**
|
|
710
|
-
* Suspend
|
|
711
|
-
* Pauses every running instance of one deployed process
|
|
712
|
-
* 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.
|
|
713
819
|
*
|
|
714
|
-
* The handler acquires a row-level lock on the definition before flipping
|
|
715
|
-
* the flag so a `StartBpmnInstance` racing the suspend can't slip through.
|
|
716
|
-
* It then iterates over every running instance (`status='RUNNING'`) and
|
|
717
|
-
* sends each one a definition-scope suspend signal via the engine API.
|
|
718
820
|
* Instances that were also explicitly instance-suspended stay paused
|
|
719
821
|
* after a definition-scope resume - the operator must clear that scope
|
|
720
822
|
* too.
|
|
721
823
|
*
|
|
722
|
-
* Idempotent.
|
|
723
|
-
*
|
|
724
|
-
* 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.
|
|
725
828
|
*
|
|
726
829
|
* @param projectId
|
|
727
|
-
* @param
|
|
830
|
+
* @param processId
|
|
831
|
+
* @param version
|
|
728
832
|
* @param requestBody
|
|
729
833
|
* @returns void
|
|
730
834
|
* @throws ApiError
|
|
731
835
|
*/
|
|
732
836
|
public suspendBpmnDefinition(
|
|
733
837
|
projectId: string,
|
|
734
|
-
|
|
838
|
+
processId: string,
|
|
839
|
+
version: number,
|
|
735
840
|
requestBody?: SuspendBpmnDefinitionRequest,
|
|
736
841
|
): CancelablePromise<void> {
|
|
737
842
|
return this.httpRequest.request({
|
|
738
843
|
method: 'POST',
|
|
739
|
-
url: '/projects/{projectID}/bpmn/
|
|
844
|
+
url: '/projects/{projectID}/bpmn/processes/{processID}/versions/{version}/suspend',
|
|
740
845
|
path: {
|
|
741
846
|
'projectID': projectId,
|
|
742
|
-
'
|
|
847
|
+
'processID': processId,
|
|
848
|
+
'version': version,
|
|
743
849
|
},
|
|
744
850
|
body: requestBody,
|
|
745
851
|
mediaType: 'application/json',
|
|
746
852
|
errors: {
|
|
747
|
-
404: `
|
|
853
|
+
404: `Process version not found`,
|
|
748
854
|
},
|
|
749
855
|
});
|
|
750
856
|
}
|
|
751
857
|
/**
|
|
752
|
-
* Resume a suspended BPMN
|
|
753
|
-
* Clears the definition-scope suspension and
|
|
754
|
-
*
|
|
755
|
-
*
|
|
756
|
-
*
|
|
757
|
-
* 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.
|
|
758
863
|
*
|
|
759
864
|
* @param projectId
|
|
760
|
-
* @param
|
|
865
|
+
* @param processId
|
|
866
|
+
* @param version
|
|
761
867
|
* @returns void
|
|
762
868
|
* @throws ApiError
|
|
763
869
|
*/
|
|
764
870
|
public resumeBpmnDefinition(
|
|
765
871
|
projectId: string,
|
|
766
|
-
|
|
872
|
+
processId: string,
|
|
873
|
+
version: number,
|
|
767
874
|
): CancelablePromise<void> {
|
|
768
875
|
return this.httpRequest.request({
|
|
769
876
|
method: 'POST',
|
|
770
|
-
url: '/projects/{projectID}/bpmn/
|
|
877
|
+
url: '/projects/{projectID}/bpmn/processes/{processID}/versions/{version}/resume',
|
|
771
878
|
path: {
|
|
772
879
|
'projectID': projectId,
|
|
773
|
-
'
|
|
880
|
+
'processID': processId,
|
|
881
|
+
'version': version,
|
|
774
882
|
},
|
|
775
883
|
errors: {
|
|
776
|
-
404: `
|
|
884
|
+
404: `Process version not found`,
|
|
777
885
|
},
|
|
778
886
|
});
|
|
779
887
|
}
|
|
@@ -821,6 +929,9 @@ export class BpmnService {
|
|
|
821
929
|
* never fix (e.g. `PAYMENT_DECLINED`). SDK workers send this automatically
|
|
822
930
|
* when a handler throws a typed `BpmnError`.
|
|
823
931
|
*
|
|
932
|
+
* Once the instance has ended, any report on its jobs answers 200 and
|
|
933
|
+
* changes nothing.
|
|
934
|
+
*
|
|
824
935
|
* @param projectId
|
|
825
936
|
* @param executionKey
|
|
826
937
|
* @param requestBody
|
|
@@ -831,13 +942,19 @@ export class BpmnService {
|
|
|
831
942
|
projectId: string,
|
|
832
943
|
executionKey: string,
|
|
833
944
|
requestBody: {
|
|
945
|
+
/**
|
|
946
|
+
* Instance ID returned by the poll response.
|
|
947
|
+
*/
|
|
948
|
+
instanceID: string;
|
|
834
949
|
errorCode: string;
|
|
835
950
|
/**
|
|
836
951
|
* Optional worker identity (the same `clientID` used to poll).
|
|
837
|
-
* When supplied,
|
|
838
|
-
*
|
|
839
|
-
*
|
|
840
|
-
*
|
|
952
|
+
* When supplied, a worker that no longer holds the job's lock
|
|
953
|
+
* gets 409 and its report is discarded, so a stale report can't
|
|
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.
|
|
841
958
|
*
|
|
842
959
|
*/
|
|
843
960
|
clientID?: string;
|
|
@@ -865,6 +982,15 @@ export class BpmnService {
|
|
|
865
982
|
},
|
|
866
983
|
body: requestBody,
|
|
867
984
|
mediaType: 'application/json',
|
|
985
|
+
errors: {
|
|
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.
|
|
992
|
+
`,
|
|
993
|
+
},
|
|
868
994
|
});
|
|
869
995
|
}
|
|
870
996
|
/**
|
|
@@ -884,15 +1010,17 @@ export class BpmnService {
|
|
|
884
1010
|
/**
|
|
885
1011
|
* Optional worker identity (the same `clientID` used to poll)
|
|
886
1012
|
* applied to every item in the batch - a batch is one worker's
|
|
887
|
-
* report. When supplied, an item
|
|
888
|
-
*
|
|
889
|
-
*
|
|
1013
|
+
* report. When supplied, an item this worker no longer holds
|
|
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`.
|
|
890
1018
|
*
|
|
891
1019
|
*/
|
|
892
1020
|
clientID?: string;
|
|
893
1021
|
items: Array<{
|
|
894
1022
|
executionKey: string;
|
|
895
|
-
|
|
1023
|
+
instanceID: string;
|
|
896
1024
|
variables?: Record<string, any>;
|
|
897
1025
|
}>;
|
|
898
1026
|
},
|
|
@@ -929,10 +1057,11 @@ export class BpmnService {
|
|
|
929
1057
|
/**
|
|
930
1058
|
* Optional worker identity (the same `clientID` used to poll)
|
|
931
1059
|
* applied to every item in the batch - a batch is one worker's
|
|
932
|
-
* report. When supplied, an item
|
|
933
|
-
*
|
|
934
|
-
*
|
|
935
|
-
*
|
|
1060
|
+
* report. When supplied, an item this worker no longer holds
|
|
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`.
|
|
936
1065
|
*
|
|
937
1066
|
*/
|
|
938
1067
|
clientID?: string;
|
|
@@ -947,7 +1076,7 @@ export class BpmnService {
|
|
|
947
1076
|
retryable?: boolean;
|
|
948
1077
|
items: Array<{
|
|
949
1078
|
executionKey: string;
|
|
950
|
-
|
|
1079
|
+
instanceID: string;
|
|
951
1080
|
errorCode: string;
|
|
952
1081
|
variables?: Record<string, any>;
|
|
953
1082
|
}>;
|
|
@@ -966,31 +1095,41 @@ export class BpmnService {
|
|
|
966
1095
|
/**
|
|
967
1096
|
* List User Tasks
|
|
968
1097
|
* Paginated list of user tasks for the project, optionally filtered by
|
|
969
|
-
*
|
|
1098
|
+
* instance, status, assignee, candidate user, candidate group or due date.
|
|
970
1099
|
* Requires Executor role on the project.
|
|
971
1100
|
*
|
|
972
1101
|
* @param projectId
|
|
973
|
-
* @param
|
|
1102
|
+
* @param instanceId Only this instance's tasks. A test run's tasks list only by its instance.
|
|
974
1103
|
* @param status
|
|
975
1104
|
* @param assignee
|
|
976
1105
|
* @param candidateUser
|
|
977
1106
|
* @param candidateGroup
|
|
978
1107
|
* @param businessId Exact-match filter on the caller-supplied correlation key.
|
|
979
|
-
* @param
|
|
980
|
-
* @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.
|
|
981
1117
|
* @returns BpmnUserTaskPaginatedResponse OK
|
|
982
1118
|
* @throws ApiError
|
|
983
1119
|
*/
|
|
984
1120
|
public listBpmnUserTasks(
|
|
985
1121
|
projectId: string,
|
|
986
|
-
|
|
1122
|
+
instanceId?: string,
|
|
987
1123
|
status?: 'CREATED' | 'COMPLETED' | 'CANCELED' | 'FAILED',
|
|
988
1124
|
assignee?: string,
|
|
989
1125
|
candidateUser?: string,
|
|
990
1126
|
candidateGroup?: string,
|
|
991
1127
|
businessId?: string,
|
|
992
|
-
|
|
993
|
-
|
|
1128
|
+
dueAfter?: string,
|
|
1129
|
+
dueBefore?: string,
|
|
1130
|
+
sort?: 'created' | 'dueDate' | 'priority',
|
|
1131
|
+
cursor?: string,
|
|
1132
|
+
limit?: number,
|
|
994
1133
|
): CancelablePromise<BpmnUserTaskPaginatedResponse> {
|
|
995
1134
|
return this.httpRequest.request({
|
|
996
1135
|
method: 'GET',
|
|
@@ -999,14 +1138,17 @@ export class BpmnService {
|
|
|
999
1138
|
'projectID': projectId,
|
|
1000
1139
|
},
|
|
1001
1140
|
query: {
|
|
1002
|
-
'
|
|
1141
|
+
'instanceID': instanceId,
|
|
1003
1142
|
'status': status,
|
|
1004
1143
|
'assignee': assignee,
|
|
1005
1144
|
'candidateUser': candidateUser,
|
|
1006
1145
|
'candidateGroup': candidateGroup,
|
|
1007
1146
|
'businessId': businessId,
|
|
1008
|
-
'
|
|
1009
|
-
'
|
|
1147
|
+
'dueAfter': dueAfter,
|
|
1148
|
+
'dueBefore': dueBefore,
|
|
1149
|
+
'sort': sort,
|
|
1150
|
+
'cursor': cursor,
|
|
1151
|
+
'limit': limit,
|
|
1010
1152
|
},
|
|
1011
1153
|
});
|
|
1012
1154
|
}
|
|
@@ -1017,15 +1159,25 @@ export class BpmnService {
|
|
|
1017
1159
|
* the caller's identity-provider groups. Requires Viewer role on the project.
|
|
1018
1160
|
*
|
|
1019
1161
|
* @param projectId
|
|
1020
|
-
* @param
|
|
1021
|
-
* @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.
|
|
1022
1171
|
* @returns BpmnUserTaskPaginatedResponse OK
|
|
1023
1172
|
* @throws ApiError
|
|
1024
1173
|
*/
|
|
1025
1174
|
public listBpmnUserTasksForCaller(
|
|
1026
1175
|
projectId: string,
|
|
1027
|
-
|
|
1028
|
-
|
|
1176
|
+
dueAfter?: string,
|
|
1177
|
+
dueBefore?: string,
|
|
1178
|
+
sort?: 'created' | 'dueDate' | 'priority',
|
|
1179
|
+
cursor?: string,
|
|
1180
|
+
limit?: number,
|
|
1029
1181
|
): CancelablePromise<BpmnUserTaskPaginatedResponse> {
|
|
1030
1182
|
return this.httpRequest.request({
|
|
1031
1183
|
method: 'GET',
|
|
@@ -1034,8 +1186,11 @@ export class BpmnService {
|
|
|
1034
1186
|
'projectID': projectId,
|
|
1035
1187
|
},
|
|
1036
1188
|
query: {
|
|
1037
|
-
'
|
|
1038
|
-
'
|
|
1189
|
+
'dueAfter': dueAfter,
|
|
1190
|
+
'dueBefore': dueBefore,
|
|
1191
|
+
'sort': sort,
|
|
1192
|
+
'cursor': cursor,
|
|
1193
|
+
'limit': limit,
|
|
1039
1194
|
},
|
|
1040
1195
|
});
|
|
1041
1196
|
}
|
|
@@ -1070,7 +1225,8 @@ export class BpmnService {
|
|
|
1070
1225
|
}
|
|
1071
1226
|
/**
|
|
1072
1227
|
* Update User Task Assignment
|
|
1073
|
-
* Reassign / change candidates on a CREATED user task.
|
|
1228
|
+
* Reassign / change candidates on a CREATED user task. Only the fields in
|
|
1229
|
+
* the body change. Returns 400 for a body with none of them, and 404 if the
|
|
1074
1230
|
* task does not exist or is no longer in CREATED state. Requires Executor
|
|
1075
1231
|
* role on the project.
|
|
1076
1232
|
*
|
|
@@ -1095,6 +1251,7 @@ export class BpmnService {
|
|
|
1095
1251
|
body: requestBody,
|
|
1096
1252
|
mediaType: 'application/json',
|
|
1097
1253
|
errors: {
|
|
1254
|
+
400: `Bad Request`,
|
|
1098
1255
|
404: `Not Found`,
|
|
1099
1256
|
},
|
|
1100
1257
|
});
|
|
@@ -1131,6 +1288,10 @@ export class BpmnService {
|
|
|
1131
1288
|
errors: {
|
|
1132
1289
|
403: `Forbidden - caller is not Executor and not assigned to the task`,
|
|
1133
1290
|
404: `User task not found`,
|
|
1291
|
+
409: `The task is no longer open: it was already completed or failed,
|
|
1292
|
+
possibly by another user a moment earlier, or it was cancelled.
|
|
1293
|
+
Nothing was applied.
|
|
1294
|
+
`,
|
|
1134
1295
|
},
|
|
1135
1296
|
});
|
|
1136
1297
|
}
|
|
@@ -1166,6 +1327,10 @@ export class BpmnService {
|
|
|
1166
1327
|
errors: {
|
|
1167
1328
|
403: `Forbidden - caller is not Executor and not assigned to the task`,
|
|
1168
1329
|
404: `User task not found`,
|
|
1330
|
+
409: `The task is no longer open: it was already completed or failed,
|
|
1331
|
+
possibly by another user a moment earlier, or it was cancelled.
|
|
1332
|
+
Nothing was applied.
|
|
1333
|
+
`,
|
|
1169
1334
|
},
|
|
1170
1335
|
});
|
|
1171
1336
|
}
|
|
@@ -1173,7 +1338,7 @@ export class BpmnService {
|
|
|
1173
1338
|
* Publish a BPMN message
|
|
1174
1339
|
* Publishes a message into the project. Each message is delivered to at
|
|
1175
1340
|
* most one waiting catch event whose subscription matches `messageName`
|
|
1176
|
-
* and whose correlation
|
|
1341
|
+
* and whose correlation value equals `correlationKeys`. If no
|
|
1177
1342
|
* subscriber is currently waiting the message is buffered up to its TTL
|
|
1178
1343
|
* and delivered to the first matching subscriber that registers.
|
|
1179
1344
|
*
|
|
@@ -1213,6 +1378,12 @@ export class BpmnService {
|
|
|
1213
1378
|
},
|
|
1214
1379
|
body: requestBody,
|
|
1215
1380
|
mediaType: 'application/json',
|
|
1381
|
+
errors: {
|
|
1382
|
+
400: `A message start event for \`messageName\` belongs to a suspended
|
|
1383
|
+
process definition, so the message would not start it. Nothing was
|
|
1384
|
+
published or buffered. Publish again once the definition is resumed.
|
|
1385
|
+
`,
|
|
1386
|
+
},
|
|
1216
1387
|
});
|
|
1217
1388
|
}
|
|
1218
1389
|
/**
|
|
@@ -1258,6 +1429,12 @@ export class BpmnService {
|
|
|
1258
1429
|
},
|
|
1259
1430
|
body: requestBody,
|
|
1260
1431
|
mediaType: 'application/json',
|
|
1432
|
+
errors: {
|
|
1433
|
+
400: `A signal start event for \`signalName\` belongs to a suspended process
|
|
1434
|
+
definition, so the signal would not start it. Nothing was published
|
|
1435
|
+
or buffered. Publish again once the definition is resumed.
|
|
1436
|
+
`,
|
|
1437
|
+
},
|
|
1261
1438
|
});
|
|
1262
1439
|
}
|
|
1263
1440
|
/**
|
|
@@ -1271,9 +1448,9 @@ export class BpmnService {
|
|
|
1271
1448
|
* @param pageSize
|
|
1272
1449
|
* @param q Optional case-insensitive substring match against process id or process name.
|
|
1273
1450
|
* @param createdAfter Bounds the totalCount aggregate to instances created at or after this
|
|
1274
|
-
* timestamp. Strongly recommended for monitoring views -
|
|
1275
|
-
*
|
|
1276
|
-
*
|
|
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
|
|
1277
1454
|
* point-in-time).
|
|
1278
1455
|
*
|
|
1279
1456
|
* @param suspended Filter by paused versions. `true` → only processes with at least one
|
|
@@ -1358,4 +1535,44 @@ export class BpmnService {
|
|
|
1358
1535
|
},
|
|
1359
1536
|
});
|
|
1360
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
|
+
}
|
|
1361
1578
|
}
|