@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
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import type { BpmnActivityState } from '../models/BpmnActivityState';
|
|
2
|
+
import type { BpmnHistoryPage } from '../models/BpmnHistoryPage';
|
|
1
3
|
import type { BpmnIncidentRecordPaginatedResponse } from '../models/BpmnIncidentRecordPaginatedResponse';
|
|
2
4
|
import type { BpmnInstanceChildrenResponse } from '../models/BpmnInstanceChildrenResponse';
|
|
3
5
|
import type { BpmnProcessSummaryPaginatedResponse } from '../models/BpmnProcessSummaryPaginatedResponse';
|
|
6
|
+
import type { BpmnProcessVersion } from '../models/BpmnProcessVersion';
|
|
4
7
|
import type { BpmnProcessVersionPaginatedResponse } from '../models/BpmnProcessVersionPaginatedResponse';
|
|
5
8
|
import type { BpmnResourceDetail } from '../models/BpmnResourceDetail';
|
|
6
9
|
import type { BpmnResourcePaginatedResponse } from '../models/BpmnResourcePaginatedResponse';
|
|
@@ -39,7 +42,9 @@ export declare class BpmnService {
|
|
|
39
42
|
* Create a BPMN resource
|
|
40
43
|
* Uploads a new BPMN XML resource as a draft. Drafts can be edited and
|
|
41
44
|
* tested but cannot start production instances until they are deployed.
|
|
42
|
-
*
|
|
45
|
+
* Invalid XML is rejected. XML identical to the latest deployed resource
|
|
46
|
+
* of the same `<definitions id>` is refused with 409, and nothing is
|
|
47
|
+
* saved.
|
|
43
48
|
*
|
|
44
49
|
* @param projectId
|
|
45
50
|
* @param requestBody
|
|
@@ -83,8 +88,11 @@ export declare class BpmnService {
|
|
|
83
88
|
/**
|
|
84
89
|
* Deploy a BPMN resource
|
|
85
90
|
* Marks all processes inside the resource as executable, making them
|
|
86
|
-
* available to start instances of.
|
|
87
|
-
* deployed resource, upload a new
|
|
91
|
+
* available to start instances of. Each of them gets its next version.
|
|
92
|
+
* Deployment is one-way. To change a deployed resource, upload a new
|
|
93
|
+
* version and deploy that. A resource identical to the latest deployed
|
|
94
|
+
* resource of the same `<definitions id>` is refused with 409, and
|
|
95
|
+
* deploying that latest one again changes nothing.
|
|
88
96
|
*
|
|
89
97
|
* @param projectId
|
|
90
98
|
* @param resourceId
|
|
@@ -96,9 +104,19 @@ export declare class BpmnService {
|
|
|
96
104
|
* Start a test instance from a resource
|
|
97
105
|
* Starts a test instance of a resource, draft or deployed. A draft can
|
|
98
106
|
* only be started this way, which makes it the way to try out an
|
|
99
|
-
* in-progress design before deploying.
|
|
100
|
-
*
|
|
101
|
-
*
|
|
107
|
+
* in-progress design before deploying. A suspended definition does not
|
|
108
|
+
* stop it, since the test run takes no deployed version.
|
|
109
|
+
*
|
|
110
|
+
* A test run runs on the same engine as production but stays apart from
|
|
111
|
+
* it, and so do its call-activity children. It stays a test run for
|
|
112
|
+
* life, also after a migration to a deployed version.
|
|
113
|
+
* - Its job task types, message names and signal names carry the
|
|
114
|
+
* `draft:` prefix. A worker activates `draft:<type>` to work its jobs,
|
|
115
|
+
* and a publish names `draft:<name>` to reach it.
|
|
116
|
+
* - Its user tasks, jobs and incidents list only when `instanceID` names
|
|
117
|
+
* it.
|
|
118
|
+
* - Instance counts, analytics and job queue depth leave it out. The
|
|
119
|
+
* instance list shows it, with `draft` set.
|
|
102
120
|
*
|
|
103
121
|
* @param projectId
|
|
104
122
|
* @param resourceId
|
|
@@ -108,9 +126,9 @@ export declare class BpmnService {
|
|
|
108
126
|
*/
|
|
109
127
|
startBpmnTestInstance(projectId: string, resourceId: string, requestBody: StartBpmnTestInstanceRequest): CancelablePromise<{
|
|
110
128
|
/**
|
|
111
|
-
*
|
|
129
|
+
* Identifier of the new test instance.
|
|
112
130
|
*/
|
|
113
|
-
|
|
131
|
+
instanceID?: string;
|
|
114
132
|
}>;
|
|
115
133
|
/**
|
|
116
134
|
* List the latest version of each BPMN resource
|
|
@@ -124,7 +142,7 @@ export declare class BpmnService {
|
|
|
124
142
|
listLatestBpmnResources(projectId: string, page?: number, pageSize?: number): CancelablePromise<BpmnResourceSummaryPaginatedResponse>;
|
|
125
143
|
/**
|
|
126
144
|
* List all versions of a BPMN resource
|
|
127
|
-
* Returns every stored version of a resource identified by the BPMN XML's outer `definitions` id,
|
|
145
|
+
* Returns every stored version of a resource identified by the BPMN XML's outer `definitions` id, newest first.
|
|
128
146
|
* @param projectId
|
|
129
147
|
* @param definitionsId
|
|
130
148
|
* @param page
|
|
@@ -150,23 +168,23 @@ export declare class BpmnService {
|
|
|
150
168
|
* List child instances of a BPMN instance
|
|
151
169
|
* Returns instances that this instance spawned via CallActivity elements.
|
|
152
170
|
* Useful for navigating into a multi-level process hierarchy (parents
|
|
153
|
-
* can be discovered via `
|
|
171
|
+
* can be discovered via `parentInstanceID` on the child).
|
|
154
172
|
*
|
|
155
173
|
* @param projectId
|
|
156
|
-
* @param
|
|
174
|
+
* @param instanceId
|
|
157
175
|
* @returns BpmnInstanceChildrenResponse OK
|
|
158
176
|
* @throws ApiError
|
|
159
177
|
*/
|
|
160
|
-
getBpmnInstanceChildren(projectId: string,
|
|
178
|
+
getBpmnInstanceChildren(projectId: string, instanceId: string): CancelablePromise<BpmnInstanceChildrenResponse>;
|
|
161
179
|
/**
|
|
162
180
|
* Get BPMN instance variables
|
|
163
181
|
* Returns the current variables in the root scope of a running or completed instance.
|
|
164
182
|
* @param projectId
|
|
165
|
-
* @param
|
|
183
|
+
* @param instanceId
|
|
166
184
|
* @returns any OK
|
|
167
185
|
* @throws ApiError
|
|
168
186
|
*/
|
|
169
|
-
getBpmnInstanceVariables(projectId: string,
|
|
187
|
+
getBpmnInstanceVariables(projectId: string, instanceId: string): CancelablePromise<{
|
|
170
188
|
variables?: Record<string, any>;
|
|
171
189
|
}>;
|
|
172
190
|
/**
|
|
@@ -177,14 +195,49 @@ export declare class BpmnService {
|
|
|
177
195
|
* payload are kept; pass `null` to clear a key.
|
|
178
196
|
*
|
|
179
197
|
* @param projectId
|
|
180
|
-
* @param
|
|
198
|
+
* @param instanceId
|
|
181
199
|
* @param requestBody
|
|
182
200
|
* @returns any OK
|
|
183
201
|
* @throws ApiError
|
|
184
202
|
*/
|
|
185
|
-
updateBpmnInstanceVariables(projectId: string,
|
|
203
|
+
updateBpmnInstanceVariables(projectId: string, instanceId: string, requestBody: {
|
|
186
204
|
variables: Record<string, any>;
|
|
187
205
|
}): CancelablePromise<any>;
|
|
206
|
+
/**
|
|
207
|
+
* Get a page of a BPMN instance's history
|
|
208
|
+
* A window of an instance's BPMN history, oldest first, for a running or
|
|
209
|
+
* an ended instance. Without a cursor it is the newest entries.
|
|
210
|
+
* `beforeSeq` reads the entries before one, to walk back, and `fromSeq`
|
|
211
|
+
* the entries from one on, to follow a running instance. Every entry
|
|
212
|
+
* carries its `seq`.
|
|
213
|
+
*
|
|
214
|
+
* Page entries leave out `inputs` and `outputs`, so a page costs the same
|
|
215
|
+
* however long the history is. Read one entry's payload from
|
|
216
|
+
* `GetBpmnInstanceHistoryEntry`. The diagram needs no history at all: the
|
|
217
|
+
* instance state's `elementStatistics` and `takenFlows` summarise it.
|
|
218
|
+
*
|
|
219
|
+
* @param projectId
|
|
220
|
+
* @param instanceId
|
|
221
|
+
* @param fromSeq Read the entries from this seq on. Takes precedence over `beforeSeq`.
|
|
222
|
+
* @param beforeSeq Read the newest entries before this seq.
|
|
223
|
+
* @param limit Max entries per page. Clamped server-side to the engine's max page size.
|
|
224
|
+
* @returns BpmnHistoryPage OK
|
|
225
|
+
* @throws ApiError
|
|
226
|
+
*/
|
|
227
|
+
getBpmnInstanceHistory(projectId: string, instanceId: string, fromSeq?: number, beforeSeq?: number, limit?: number): CancelablePromise<BpmnHistoryPage>;
|
|
228
|
+
/**
|
|
229
|
+
* Get one BPMN history entry with its payload
|
|
230
|
+
* One history entry with its `inputs` and `outputs`. The engine rebuilds
|
|
231
|
+
* them from the variable writes of every entry before it, so the read
|
|
232
|
+
* grows with the entry's position: around 0.3 s at entry 40,000.
|
|
233
|
+
*
|
|
234
|
+
* @param projectId
|
|
235
|
+
* @param instanceId
|
|
236
|
+
* @param seq
|
|
237
|
+
* @returns BpmnActivityState OK
|
|
238
|
+
* @throws ApiError
|
|
239
|
+
*/
|
|
240
|
+
getBpmnInstanceHistoryEntry(projectId: string, instanceId: string, seq: number): CancelablePromise<BpmnActivityState>;
|
|
188
241
|
/**
|
|
189
242
|
* Resolve an incident and retry the failed activity
|
|
190
243
|
* Marks an incident as resolved and re-runs the activity that produced it.
|
|
@@ -193,41 +246,42 @@ export declare class BpmnService {
|
|
|
193
246
|
* that triggered a FEEL evaluation error).
|
|
194
247
|
*
|
|
195
248
|
* @param projectId
|
|
196
|
-
* @param
|
|
249
|
+
* @param instanceId
|
|
197
250
|
* @param incidentId
|
|
198
251
|
* @param requestBody
|
|
199
252
|
* @returns any OK
|
|
200
253
|
* @throws ApiError
|
|
201
254
|
*/
|
|
202
|
-
resolveBpmnIncident(projectId: string,
|
|
255
|
+
resolveBpmnIncident(projectId: string, instanceId: string, incidentId: string, requestBody?: {
|
|
203
256
|
variables?: Record<string, any>;
|
|
204
257
|
}): CancelablePromise<any>;
|
|
205
258
|
/**
|
|
206
259
|
* List BPMN incidents
|
|
207
260
|
* Cross-instance audit listing of incidents in the project. By default
|
|
208
261
|
* returns open incidents first (unresolved), ordered by recency.
|
|
209
|
-
* Filterable by
|
|
262
|
+
* Filterable by process version, error type, status, and time window.
|
|
210
263
|
*
|
|
211
264
|
* Each row carries the parent process metadata (processID, processName)
|
|
212
265
|
* so a single page render needs no follow-up queries against the
|
|
213
266
|
* instances endpoint. Click-through to a specific instance still uses
|
|
214
|
-
* the
|
|
267
|
+
* the instance detail endpoint.
|
|
215
268
|
*
|
|
216
269
|
* @param projectId
|
|
217
|
-
* @param
|
|
218
|
-
* @param
|
|
270
|
+
* @param processId Restrict to incidents on instances of one process, in any version unless `version` names one.
|
|
271
|
+
* @param version Restrict to one version of `processID`. Ignored without `processID`.
|
|
272
|
+
* @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.
|
|
219
273
|
* @param status Filter by lifecycle status. `open` returns unresolved incidents;
|
|
220
274
|
* `resolved` returns only resolved ones. Omit to return both.
|
|
221
275
|
*
|
|
222
276
|
* @param errorType Restrict to a single error category (matches `BpmnIncidentRecord.errorType`).
|
|
223
277
|
* @param since Earliest `raisedAt` to include (inclusive).
|
|
224
278
|
* @param until Latest `raisedAt` to include (exclusive).
|
|
225
|
-
* @param page
|
|
226
|
-
* @param
|
|
279
|
+
* @param cursor The `nextCursor` of the page before, absent for the first page.
|
|
280
|
+
* @param limit Most incidents per page, 20 by default and 100 at most.
|
|
227
281
|
* @returns BpmnIncidentRecordPaginatedResponse OK
|
|
228
282
|
* @throws ApiError
|
|
229
283
|
*/
|
|
230
|
-
listBpmnIncidents(projectId: string,
|
|
284
|
+
listBpmnIncidents(projectId: string, processId?: string, version?: number, instanceId?: string, status?: 'open' | 'resolved', errorType?: 'BpmnError' | 'CompensationError' | 'FeelError' | 'GatewayNoMatch' | 'TimerResolution' | 'LinkNotFound' | 'MigrationError' | 'CallActivityCanceled' | 'ExternalRowRefreshError' | 'JobLockLost' | 'DecisionNotFound' | 'DecisionEvaluationError' | 'ProcessNotFound' | 'ProcessSuspended' | 'Unknown', since?: string, until?: string, cursor?: string, limit?: number): CancelablePromise<BpmnIncidentRecordPaginatedResponse>;
|
|
231
285
|
/**
|
|
232
286
|
* Migrate a running instance to a newer process version
|
|
233
287
|
* Moves a running instance from its current process version to a newer
|
|
@@ -236,12 +290,12 @@ export declare class BpmnService {
|
|
|
236
290
|
* and target. Validate the migration plan first via `MigrateValidate`.
|
|
237
291
|
*
|
|
238
292
|
* @param projectId
|
|
239
|
-
* @param
|
|
293
|
+
* @param instanceId
|
|
240
294
|
* @param requestBody
|
|
241
295
|
* @returns any OK
|
|
242
296
|
* @throws ApiError
|
|
243
297
|
*/
|
|
244
|
-
migrateBpmnInstance(projectId: string,
|
|
298
|
+
migrateBpmnInstance(projectId: string, instanceId: string, requestBody: MigrateBpmnInstanceRequest): CancelablePromise<any>;
|
|
245
299
|
/**
|
|
246
300
|
* Validate a migration plan without executing it
|
|
247
301
|
* Returns the issues a migration plan would hit if executed: missing
|
|
@@ -250,12 +304,12 @@ export declare class BpmnService {
|
|
|
250
304
|
* to the user.
|
|
251
305
|
*
|
|
252
306
|
* @param projectId
|
|
253
|
-
* @param
|
|
307
|
+
* @param instanceId
|
|
254
308
|
* @param requestBody
|
|
255
309
|
* @returns MigrationValidationResult OK
|
|
256
310
|
* @throws ApiError
|
|
257
311
|
*/
|
|
258
|
-
validateBpmnInstanceMigration(projectId: string,
|
|
312
|
+
validateBpmnInstanceMigration(projectId: string, instanceId: string, requestBody: MigrateBpmnInstanceRequest): CancelablePromise<MigrationValidationResult>;
|
|
259
313
|
/**
|
|
260
314
|
* Modify a running instance with ad-hoc token operations
|
|
261
315
|
* Operational recovery tool: applies a sequence of token-level
|
|
@@ -271,12 +325,12 @@ export declare class BpmnService {
|
|
|
271
325
|
* A batch is applied whole or not at all.
|
|
272
326
|
*
|
|
273
327
|
* @param projectId
|
|
274
|
-
* @param
|
|
328
|
+
* @param instanceId
|
|
275
329
|
* @param requestBody
|
|
276
330
|
* @returns any OK
|
|
277
331
|
* @throws ApiError
|
|
278
332
|
*/
|
|
279
|
-
modifyBpmnInstance(projectId: string,
|
|
333
|
+
modifyBpmnInstance(projectId: string, instanceId: string, requestBody: ModifyBpmnInstanceRequest): CancelablePromise<any>;
|
|
280
334
|
/**
|
|
281
335
|
* Activate an activity inside a running ad-hoc subprocess
|
|
282
336
|
* Manually starts one of the activities inside an active ad-hoc
|
|
@@ -284,13 +338,13 @@ export declare class BpmnService {
|
|
|
284
338
|
* can be triggered repeatedly until the ad-hoc subprocess completes.
|
|
285
339
|
*
|
|
286
340
|
* @param projectId
|
|
287
|
-
* @param
|
|
341
|
+
* @param instanceId
|
|
288
342
|
* @param adHocNodeId
|
|
289
343
|
* @param requestBody
|
|
290
344
|
* @returns any OK
|
|
291
345
|
* @throws ApiError
|
|
292
346
|
*/
|
|
293
|
-
triggerBpmnAdHocNode(projectId: string,
|
|
347
|
+
triggerBpmnAdHocNode(projectId: string, instanceId: string, adHocNodeId: string, requestBody: {
|
|
294
348
|
nodeID: string;
|
|
295
349
|
}): CancelablePromise<any>;
|
|
296
350
|
/**
|
|
@@ -300,13 +354,13 @@ export declare class BpmnService {
|
|
|
300
354
|
* values, which may cause the subprocess to complete or branch.
|
|
301
355
|
*
|
|
302
356
|
* @param projectId
|
|
303
|
-
* @param
|
|
357
|
+
* @param instanceId
|
|
304
358
|
* @param adHocNodeId
|
|
305
359
|
* @param requestBody
|
|
306
360
|
* @returns any OK
|
|
307
361
|
* @throws ApiError
|
|
308
362
|
*/
|
|
309
|
-
setBpmnAdHocVariables(projectId: string,
|
|
363
|
+
setBpmnAdHocVariables(projectId: string, instanceId: string, adHocNodeId: string, requestBody: {
|
|
310
364
|
variables?: Record<string, any>;
|
|
311
365
|
}): CancelablePromise<any>;
|
|
312
366
|
/**
|
|
@@ -316,22 +370,22 @@ export declare class BpmnService {
|
|
|
316
370
|
* flag layers on top. Idempotent - a second call against an already-
|
|
317
371
|
* suspended instance is a no-op.
|
|
318
372
|
*
|
|
319
|
-
* While suspended
|
|
320
|
-
*
|
|
321
|
-
*
|
|
322
|
-
*
|
|
373
|
+
* While suspended, cancel, terminate, resolve-incident and variable
|
|
374
|
+
* update still apply. Anything else that reaches the instance, such as a
|
|
375
|
+
* job completion, a message or a due timer, applies on resume, in the
|
|
376
|
+
* order it arrived.
|
|
323
377
|
*
|
|
324
|
-
* The
|
|
325
|
-
*
|
|
326
|
-
*
|
|
378
|
+
* The suspension (operator, reason, timestamp) is also recorded in the
|
|
379
|
+
* instance's history as a `SuspendInstanceEvent`, so the timeline view on
|
|
380
|
+
* the instance detail page can render the cycle.
|
|
327
381
|
*
|
|
328
382
|
* @param projectId
|
|
329
|
-
* @param
|
|
383
|
+
* @param instanceId
|
|
330
384
|
* @param requestBody
|
|
331
385
|
* @returns void
|
|
332
386
|
* @throws ApiError
|
|
333
387
|
*/
|
|
334
|
-
suspendBpmnInstance(projectId: string,
|
|
388
|
+
suspendBpmnInstance(projectId: string, instanceId: string, requestBody?: SuspendBpmnInstanceRequest): CancelablePromise<void>;
|
|
335
389
|
/**
|
|
336
390
|
* Resume a suspended BPMN instance
|
|
337
391
|
* Clears the instance-scope suspension. If the parent definition is also
|
|
@@ -339,49 +393,47 @@ export declare class BpmnService {
|
|
|
339
393
|
* is resumed as well. Idempotent.
|
|
340
394
|
*
|
|
341
395
|
* @param projectId
|
|
342
|
-
* @param
|
|
396
|
+
* @param instanceId
|
|
343
397
|
* @returns void
|
|
344
398
|
* @throws ApiError
|
|
345
399
|
*/
|
|
346
|
-
resumeBpmnInstance(projectId: string,
|
|
400
|
+
resumeBpmnInstance(projectId: string, instanceId: string): CancelablePromise<void>;
|
|
347
401
|
/**
|
|
348
|
-
* Suspend
|
|
349
|
-
* Pauses every running instance of one deployed process
|
|
350
|
-
* rejects new instance starts on that
|
|
402
|
+
* Suspend a deployed version of a BPMN process
|
|
403
|
+
* Pauses every running instance of one deployed process version AND
|
|
404
|
+
* rejects new instance starts on that version until it is resumed.
|
|
351
405
|
*
|
|
352
|
-
* The handler acquires a row-level lock on the definition before flipping
|
|
353
|
-
* the flag so a `StartBpmnInstance` racing the suspend can't slip through.
|
|
354
|
-
* It then iterates over every running instance (`status='RUNNING'`) and
|
|
355
|
-
* sends each one a definition-scope suspend signal via the engine API.
|
|
356
406
|
* Instances that were also explicitly instance-suspended stay paused
|
|
357
407
|
* after a definition-scope resume - the operator must clear that scope
|
|
358
408
|
* too.
|
|
359
409
|
*
|
|
360
|
-
* Idempotent.
|
|
361
|
-
*
|
|
362
|
-
* came
|
|
410
|
+
* Idempotent. Suspending again reaches the running instances an earlier
|
|
411
|
+
* call missed. The reason reaches every affected instance's history
|
|
412
|
+
* (`SuspendDefinitionEvent`) so the UI can render where the pause came
|
|
413
|
+
* from.
|
|
363
414
|
*
|
|
364
415
|
* @param projectId
|
|
365
|
-
* @param
|
|
416
|
+
* @param processId
|
|
417
|
+
* @param version
|
|
366
418
|
* @param requestBody
|
|
367
419
|
* @returns void
|
|
368
420
|
* @throws ApiError
|
|
369
421
|
*/
|
|
370
|
-
suspendBpmnDefinition(projectId: string,
|
|
422
|
+
suspendBpmnDefinition(projectId: string, processId: string, version: number, requestBody?: SuspendBpmnDefinitionRequest): CancelablePromise<void>;
|
|
371
423
|
/**
|
|
372
|
-
* Resume a suspended BPMN
|
|
373
|
-
* Clears the definition-scope suspension and
|
|
374
|
-
*
|
|
375
|
-
*
|
|
376
|
-
*
|
|
377
|
-
* Idempotent.
|
|
424
|
+
* Resume a suspended version of a BPMN process
|
|
425
|
+
* Clears the definition-scope suspension and resumes every running
|
|
426
|
+
* instance of the version. Instances that were also instance-suspended
|
|
427
|
+
* stay paused until their own scope is cleared. New instance starts are
|
|
428
|
+
* accepted again. Idempotent.
|
|
378
429
|
*
|
|
379
430
|
* @param projectId
|
|
380
|
-
* @param
|
|
431
|
+
* @param processId
|
|
432
|
+
* @param version
|
|
381
433
|
* @returns void
|
|
382
434
|
* @throws ApiError
|
|
383
435
|
*/
|
|
384
|
-
resumeBpmnDefinition(projectId: string,
|
|
436
|
+
resumeBpmnDefinition(projectId: string, processId: string, version: number): CancelablePromise<void>;
|
|
385
437
|
/**
|
|
386
438
|
* PENDING job counts grouped by taskType
|
|
387
439
|
* Returns one entry per `taskType` with at least one PENDING job. Useful for
|
|
@@ -412,6 +464,9 @@ export declare class BpmnService {
|
|
|
412
464
|
* never fix (e.g. `PAYMENT_DECLINED`). SDK workers send this automatically
|
|
413
465
|
* when a handler throws a typed `BpmnError`.
|
|
414
466
|
*
|
|
467
|
+
* Once the instance has ended, any report on its jobs answers 200 and
|
|
468
|
+
* changes nothing.
|
|
469
|
+
*
|
|
415
470
|
* @param projectId
|
|
416
471
|
* @param executionKey
|
|
417
472
|
* @param requestBody
|
|
@@ -419,13 +474,19 @@ export declare class BpmnService {
|
|
|
419
474
|
* @throws ApiError
|
|
420
475
|
*/
|
|
421
476
|
throwBpmnExternalJobError(projectId: string, executionKey: string, requestBody: {
|
|
477
|
+
/**
|
|
478
|
+
* Instance ID returned by the poll response.
|
|
479
|
+
*/
|
|
480
|
+
instanceID: string;
|
|
422
481
|
errorCode: string;
|
|
423
482
|
/**
|
|
424
483
|
* Optional worker identity (the same `clientID` used to poll).
|
|
425
484
|
* When supplied, a worker that no longer holds the job's lock
|
|
426
485
|
* gets 409 and its report is discarded, so a stale report can't
|
|
427
|
-
* requeue or fail the job.
|
|
428
|
-
*
|
|
486
|
+
* requeue or fail the job. Repeating the report this worker last
|
|
487
|
+
* made on the job answers 200 again and changes nothing. Without
|
|
488
|
+
* it, the report applies to an open job no worker holds a live
|
|
489
|
+
* lock on.
|
|
429
490
|
*
|
|
430
491
|
*/
|
|
431
492
|
clientID?: string;
|
|
@@ -459,14 +520,16 @@ export declare class BpmnService {
|
|
|
459
520
|
* Optional worker identity (the same `clientID` used to poll)
|
|
460
521
|
* applied to every item in the batch - a batch is one worker's
|
|
461
522
|
* report. When supplied, an item this worker no longer holds
|
|
462
|
-
* comes back with status `error` and its result is discarded
|
|
463
|
-
*
|
|
523
|
+
* comes back with status `error` and its result is discarded,
|
|
524
|
+
* and repeating this worker's last report on an item changes
|
|
525
|
+
* nothing. Without it, an item a worker holds a live lock on, or
|
|
526
|
+
* one that already ended, comes back with status `error`.
|
|
464
527
|
*
|
|
465
528
|
*/
|
|
466
529
|
clientID?: string;
|
|
467
530
|
items: Array<{
|
|
468
531
|
executionKey: string;
|
|
469
|
-
|
|
532
|
+
instanceID: string;
|
|
470
533
|
variables?: Record<string, any>;
|
|
471
534
|
}>;
|
|
472
535
|
}): CancelablePromise<ExternalJobBatchResponse>;
|
|
@@ -491,8 +554,10 @@ export declare class BpmnService {
|
|
|
491
554
|
* Optional worker identity (the same `clientID` used to poll)
|
|
492
555
|
* applied to every item in the batch - a batch is one worker's
|
|
493
556
|
* report. When supplied, an item this worker no longer holds
|
|
494
|
-
* comes back with status `error` and the job is left untouched
|
|
495
|
-
*
|
|
557
|
+
* comes back with status `error` and the job is left untouched,
|
|
558
|
+
* and repeating this worker's last report on an item changes
|
|
559
|
+
* nothing. Without it, an item a worker holds a live lock on, or
|
|
560
|
+
* one that already ended, comes back with status `error`.
|
|
496
561
|
*
|
|
497
562
|
*/
|
|
498
563
|
clientID?: string;
|
|
@@ -507,7 +572,7 @@ export declare class BpmnService {
|
|
|
507
572
|
retryable?: boolean;
|
|
508
573
|
items: Array<{
|
|
509
574
|
executionKey: string;
|
|
510
|
-
|
|
575
|
+
instanceID: string;
|
|
511
576
|
errorCode: string;
|
|
512
577
|
variables?: Record<string, any>;
|
|
513
578
|
}>;
|
|
@@ -515,22 +580,29 @@ export declare class BpmnService {
|
|
|
515
580
|
/**
|
|
516
581
|
* List User Tasks
|
|
517
582
|
* Paginated list of user tasks for the project, optionally filtered by
|
|
518
|
-
*
|
|
583
|
+
* instance, status, assignee, candidate user, candidate group or due date.
|
|
519
584
|
* Requires Executor role on the project.
|
|
520
585
|
*
|
|
521
586
|
* @param projectId
|
|
522
|
-
* @param
|
|
587
|
+
* @param instanceId Only this instance's tasks. A test run's tasks list only by its instance.
|
|
523
588
|
* @param status
|
|
524
589
|
* @param assignee
|
|
525
590
|
* @param candidateUser
|
|
526
591
|
* @param candidateGroup
|
|
527
592
|
* @param businessId Exact-match filter on the caller-supplied correlation key.
|
|
528
|
-
* @param
|
|
529
|
-
* @param
|
|
593
|
+
* @param dueAfter Only tasks due at or after this time.
|
|
594
|
+
* @param dueBefore Only tasks due before this time. With `status=CREATED` and the current time, the overdue tasks.
|
|
595
|
+
* @param sort `created` lists the newest first, and is the default. `dueDate` lists
|
|
596
|
+
* the soonest due first and tasks without a due date last. `priority`
|
|
597
|
+
* lists the highest priority first. Both list the oldest first among
|
|
598
|
+
* equals. A cursor continues only a list of the same sort.
|
|
599
|
+
*
|
|
600
|
+
* @param cursor The `nextCursor` of the page before, absent for the first page.
|
|
601
|
+
* @param limit Most tasks per page, 20 by default and 100 at most.
|
|
530
602
|
* @returns BpmnUserTaskPaginatedResponse OK
|
|
531
603
|
* @throws ApiError
|
|
532
604
|
*/
|
|
533
|
-
listBpmnUserTasks(projectId: string,
|
|
605
|
+
listBpmnUserTasks(projectId: string, instanceId?: string, status?: 'CREATED' | 'COMPLETED' | 'CANCELED' | 'FAILED', assignee?: string, candidateUser?: string, candidateGroup?: string, businessId?: string, dueAfter?: string, dueBefore?: string, sort?: 'created' | 'dueDate' | 'priority', cursor?: string, limit?: number): CancelablePromise<BpmnUserTaskPaginatedResponse>;
|
|
534
606
|
/**
|
|
535
607
|
* List User Tasks for the Caller
|
|
536
608
|
* Returns CREATED user tasks the caller can act on: directly assigned,
|
|
@@ -538,12 +610,19 @@ export declare class BpmnService {
|
|
|
538
610
|
* the caller's identity-provider groups. Requires Viewer role on the project.
|
|
539
611
|
*
|
|
540
612
|
* @param projectId
|
|
541
|
-
* @param
|
|
542
|
-
* @param
|
|
613
|
+
* @param dueAfter Only tasks due at or after this time.
|
|
614
|
+
* @param dueBefore Only tasks due before this time. With the current time, the caller's overdue tasks.
|
|
615
|
+
* @param sort `created` lists the newest first, and is the default. `dueDate` lists
|
|
616
|
+
* the soonest due first and tasks without a due date last. `priority`
|
|
617
|
+
* lists the highest priority first. Both list the oldest first among
|
|
618
|
+
* equals. A cursor continues only a list of the same sort.
|
|
619
|
+
*
|
|
620
|
+
* @param cursor The `nextCursor` of the page before, absent for the first page.
|
|
621
|
+
* @param limit Most tasks per page, 20 by default and 100 at most.
|
|
543
622
|
* @returns BpmnUserTaskPaginatedResponse OK
|
|
544
623
|
* @throws ApiError
|
|
545
624
|
*/
|
|
546
|
-
listBpmnUserTasksForCaller(projectId: string,
|
|
625
|
+
listBpmnUserTasksForCaller(projectId: string, dueAfter?: string, dueBefore?: string, sort?: 'created' | 'dueDate' | 'priority', cursor?: string, limit?: number): CancelablePromise<BpmnUserTaskPaginatedResponse>;
|
|
547
626
|
/**
|
|
548
627
|
* Get User Task
|
|
549
628
|
* Fetch a single user task by execution key. Allowed for callers with
|
|
@@ -607,7 +686,7 @@ export declare class BpmnService {
|
|
|
607
686
|
* Publish a BPMN message
|
|
608
687
|
* Publishes a message into the project. Each message is delivered to at
|
|
609
688
|
* most one waiting catch event whose subscription matches `messageName`
|
|
610
|
-
* and whose correlation
|
|
689
|
+
* and whose correlation value equals `correlationKeys`. If no
|
|
611
690
|
* subscriber is currently waiting the message is buffered up to its TTL
|
|
612
691
|
* and delivered to the first matching subscriber that registers.
|
|
613
692
|
*
|
|
@@ -677,11 +756,11 @@ export declare class BpmnService {
|
|
|
677
756
|
* @param projectId
|
|
678
757
|
* @param page
|
|
679
758
|
* @param pageSize
|
|
680
|
-
* @param q Optional case-insensitive
|
|
759
|
+
* @param q Optional case-insensitive substring match against process id or process name.
|
|
681
760
|
* @param createdAfter Bounds the totalCount aggregate to instances created at or after this
|
|
682
|
-
* timestamp. Strongly recommended for monitoring views -
|
|
683
|
-
*
|
|
684
|
-
*
|
|
761
|
+
* timestamp. Strongly recommended for monitoring views - ended
|
|
762
|
+
* instances stay until retention deletes them, and unfiltered totals
|
|
763
|
+
* scan every kept instance per definition. runningCount ignores this filter (it is always
|
|
685
764
|
* point-in-time).
|
|
686
765
|
*
|
|
687
766
|
* @param suspended Filter by paused versions. `true` → only processes with at least one
|
|
@@ -714,4 +793,21 @@ export declare class BpmnService {
|
|
|
714
793
|
* @throws ApiError
|
|
715
794
|
*/
|
|
716
795
|
listBpmnProcessVersions(projectId: string, processId: string, page?: number, pageSize?: number, createdAfter?: string, suspended?: boolean): CancelablePromise<BpmnProcessVersionPaginatedResponse>;
|
|
796
|
+
/**
|
|
797
|
+
* Get one deployed version of a BPMN process
|
|
798
|
+
* Returns the single deployed version identified by (processID, version)
|
|
799
|
+
* with its instance counts and suspension state, wherever it falls in the
|
|
800
|
+
* pages of `ListBpmnProcessVersions`.
|
|
801
|
+
*
|
|
802
|
+
* @param projectId
|
|
803
|
+
* @param processId
|
|
804
|
+
* @param version
|
|
805
|
+
* @param createdAfter Bounds the totalCount aggregate to instances created at or after this
|
|
806
|
+
* timestamp. See ListBpmnProcesses for rationale. runningCount ignores
|
|
807
|
+
* this filter.
|
|
808
|
+
*
|
|
809
|
+
* @returns BpmnProcessVersion OK
|
|
810
|
+
* @throws ApiError
|
|
811
|
+
*/
|
|
812
|
+
getBpmnProcessVersion(projectId: string, processId: string, version: number, createdAfter?: string): CancelablePromise<BpmnProcessVersion>;
|
|
717
813
|
}
|