@quantumbpm/sdk 1.3.0 → 2.1.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 +86 -23
- package/dist/bpmn.js +66 -34
- 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 -3
- package/dist/generated/index.js +10 -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/DecisionKind.d.ts +10 -0
- package/dist/generated/models/DecisionKind.js +19 -0
- package/dist/generated/models/DecisionSummary.d.ts +8 -6
- 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 +37 -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/HitRule.d.ts +4 -0
- package/dist/generated/models/HitRule.js +1 -1
- package/dist/generated/models/PaginatedExecutionsResponse.d.ts +2 -2
- package/dist/generated/models/PaginatedExecutionsResponse.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 +189 -91
- package/dist/generated/services/BpmnService.js +276 -124
- package/dist/generated/services/DefaultService.d.ts +111 -115
- package/dist/generated/services/DefaultService.js +136 -168
- 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 +133 -46
- 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 -3
- 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/DecisionKind.ts +14 -0
- package/src/generated/models/DecisionSummary.ts +8 -6
- 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 +37 -9
- package/src/generated/models/ExternalJob.ts +8 -8
- package/src/generated/models/HitRule.ts +4 -0
- package/src/generated/models/PaginatedExecutionsResponse.ts +2 -2
- 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 +333 -142
- package/src/generated/services/DefaultService.ts +160 -198
- package/src/index.test.ts +74 -31
- package/src/index.ts +13 -7
- package/src/tracing.ts +1 -1
- package/src/workers.test.ts +2 -3
- package/src/workers.ts +5 -4
- package/dist/generated/models/BpmnInstanceChildrenResponse.d.ts +0 -7
- package/dist/generated/models/BpmnInstanceChildrenResponse.js +0 -3
- package/dist/generated/models/CreateProjectRequest.d.ts +0 -9
- package/dist/generated/models/CreateProjectRequest.js +0 -3
- package/src/generated/models/BpmnInstanceChildrenResponse.ts +0 -12
- package/src/generated/models/CreateProjectRequest.ts +0 -14
|
@@ -4,7 +4,7 @@ import type { BpmnExternalJobPaginatedResponse } from '../models/BpmnExternalJob
|
|
|
4
4
|
import type { BpmnInstancePaginatedResponse } from '../models/BpmnInstancePaginatedResponse';
|
|
5
5
|
import type { BpmnInstanceState } from '../models/BpmnInstanceState';
|
|
6
6
|
import type { CreateDefinitionRequest } from '../models/CreateDefinitionRequest';
|
|
7
|
-
import type {
|
|
7
|
+
import type { DecisionVersionList } from '../models/DecisionVersionList';
|
|
8
8
|
import type { Definition } from '../models/Definition';
|
|
9
9
|
import type { ErrorMode } from '../models/ErrorMode';
|
|
10
10
|
import type { EvaluateStoredRequest } from '../models/EvaluateStoredRequest';
|
|
@@ -31,8 +31,6 @@ export declare class DefaultService {
|
|
|
31
31
|
*/
|
|
32
32
|
getVersion(): CancelablePromise<{
|
|
33
33
|
version?: string;
|
|
34
|
-
buildTime?: string;
|
|
35
|
-
commit?: string;
|
|
36
34
|
}>;
|
|
37
35
|
/**
|
|
38
36
|
* Evaluate ad-hoc DMN XML
|
|
@@ -78,22 +76,13 @@ export declare class DefaultService {
|
|
|
78
76
|
evaluateDesignBatch(requestBody: BatchEvaluateDesignRequest): CancelablePromise<BatchEvaluationResponse>;
|
|
79
77
|
/**
|
|
80
78
|
* List Projects
|
|
81
|
-
* Lists projects the caller
|
|
79
|
+
* Lists the projects the caller's token grants access to. Projects come
|
|
80
|
+
* from the deployment's provisioning file.
|
|
81
|
+
*
|
|
82
82
|
* @returns Project OK
|
|
83
83
|
* @throws ApiError
|
|
84
84
|
*/
|
|
85
85
|
listProjects(): CancelablePromise<Array<Project>>;
|
|
86
|
-
/**
|
|
87
|
-
* Create Project
|
|
88
|
-
* Creates a new project. Projects are workspaces that group DMN definitions
|
|
89
|
-
* and BPMN processes for execution and access control. The caller is
|
|
90
|
-
* automatically added as a project administrator.
|
|
91
|
-
*
|
|
92
|
-
* @param requestBody
|
|
93
|
-
* @returns Project Created
|
|
94
|
-
* @throws ApiError
|
|
95
|
-
*/
|
|
96
|
-
createProject(requestBody: CreateProjectRequest): CancelablePromise<Project>;
|
|
97
86
|
/**
|
|
98
87
|
* Get Project
|
|
99
88
|
* Returns the project's metadata.
|
|
@@ -102,21 +91,9 @@ export declare class DefaultService {
|
|
|
102
91
|
* @throws ApiError
|
|
103
92
|
*/
|
|
104
93
|
getProject(projectId: string): CancelablePromise<Project>;
|
|
105
|
-
/**
|
|
106
|
-
* Delete Project
|
|
107
|
-
* Permanently deletes a project and all of its data: DMN definitions and
|
|
108
|
-
* executions, BPMN resources and instances, jobs, user tasks, messages,
|
|
109
|
-
* signals, and members. Running BPMN instances are terminated. This
|
|
110
|
-
* action cannot be undone.
|
|
111
|
-
*
|
|
112
|
-
* @param projectId Identifier of the project to delete.
|
|
113
|
-
* @returns void
|
|
114
|
-
* @throws ApiError
|
|
115
|
-
*/
|
|
116
|
-
deleteProject(projectId: string): CancelablePromise<void>;
|
|
117
94
|
/**
|
|
118
95
|
* List DMN definitions
|
|
119
|
-
* Lists
|
|
96
|
+
* Lists every saved definition in the project, drafts and deployed, newest first.
|
|
120
97
|
* @param projectId
|
|
121
98
|
* @param page Page number (1-indexed)
|
|
122
99
|
* @param pageSize Number of items per page (max 100)
|
|
@@ -126,9 +103,11 @@ export declare class DefaultService {
|
|
|
126
103
|
listDefinitions(projectId: string, page?: number, pageSize?: number): CancelablePromise<PaginatedDefinitionsResponse>;
|
|
127
104
|
/**
|
|
128
105
|
* Create a DMN definition
|
|
129
|
-
*
|
|
130
|
-
*
|
|
131
|
-
*
|
|
106
|
+
* Saves a new draft. A draft is not evaluable until `DeployDefinition`
|
|
107
|
+
* deploys it. To change a deployed definition, save its new XML as
|
|
108
|
+
* another draft of the same `definitionsID` and deploy that. XML
|
|
109
|
+
* identical to the latest deployed version of its `definitionsID` is
|
|
110
|
+
* refused with 409, and nothing is saved.
|
|
132
111
|
*
|
|
133
112
|
* @param projectId
|
|
134
113
|
* @param requestBody
|
|
@@ -138,7 +117,7 @@ export declare class DefaultService {
|
|
|
138
117
|
createDefinition(projectId: string, requestBody: CreateDefinitionRequest): CancelablePromise<Definition>;
|
|
139
118
|
/**
|
|
140
119
|
* List latest DMN definitions
|
|
141
|
-
* Returns the
|
|
120
|
+
* Returns the newest saved definition of each `definitionsID`, draft or deployed.
|
|
142
121
|
* @param projectId
|
|
143
122
|
* @param page Page number (1-indexed)
|
|
144
123
|
* @param pageSize Number of items per page (max 100)
|
|
@@ -148,20 +127,21 @@ export declare class DefaultService {
|
|
|
148
127
|
listLatestDefinitions(projectId: string, page?: number, pageSize?: number): CancelablePromise<PaginatedDefinitionsResponse>;
|
|
149
128
|
/**
|
|
150
129
|
* Get a DMN definition by its DMN definitions id
|
|
151
|
-
* Looks up a definition by the `id` attribute on the
|
|
152
|
-
* element of the DMN XML, instead of by the
|
|
153
|
-
* Returns the latest version unless
|
|
130
|
+
* Looks up a deployed definition by the `id` attribute on the
|
|
131
|
+
* `<definitions>` root element of the DMN XML, instead of by the
|
|
132
|
+
* platform-internal `id`. Returns the latest deployed version unless
|
|
133
|
+
* `version` names one. A draft is not found this way.
|
|
154
134
|
*
|
|
155
135
|
* @param projectId
|
|
156
136
|
* @param definitionsId Stable identifier from the DMN XML's outer `<definitions id="…">` attribute.
|
|
157
|
-
* @param version
|
|
137
|
+
* @param version Deployed version, the latest when omitted.
|
|
158
138
|
* @returns Definition OK
|
|
159
139
|
* @throws ApiError
|
|
160
140
|
*/
|
|
161
141
|
getDefinitionByDefinitionsId(projectId: string, definitionsId: string, version?: number): CancelablePromise<Definition>;
|
|
162
142
|
/**
|
|
163
143
|
* List all versions of a DMN definition
|
|
164
|
-
* Returns every
|
|
144
|
+
* Returns every saved definition of a DMN `<definitions id>`, drafts and deployed, newest first. A deployed one carries the version its deploy gave it.
|
|
165
145
|
* @param projectId
|
|
166
146
|
* @param definitionsId Stable identifier from the DMN XML's outer `<definitions id="…">` attribute.
|
|
167
147
|
* @param page Page number (1-indexed)
|
|
@@ -172,15 +152,15 @@ export declare class DefaultService {
|
|
|
172
152
|
listDefinitionVersions(projectId: string, definitionsId: string, page?: number, pageSize?: number): CancelablePromise<PaginatedDefinitionsResponse>;
|
|
173
153
|
/**
|
|
174
154
|
* Evaluate a DMN definition by its DMN definitions id
|
|
175
|
-
* Evaluates a
|
|
176
|
-
* XML attribute
|
|
177
|
-
*
|
|
178
|
-
*
|
|
155
|
+
* Evaluates a deployed DMN definition addressed by its `<definitions id>`
|
|
156
|
+
* XML attribute, the latest deployed version unless `version` names one,
|
|
157
|
+
* and records the evaluation. A definition with no deployed version
|
|
158
|
+
* answers 404. Drafts evaluate through `EvaluateDesign`.
|
|
179
159
|
*
|
|
180
160
|
* @param projectId
|
|
181
161
|
* @param definitionsId Stable identifier from the DMN XML's outer `<definitions id="…">` attribute.
|
|
182
162
|
* @param requestBody
|
|
183
|
-
* @param version
|
|
163
|
+
* @param version Deployed version, the latest when omitted.
|
|
184
164
|
* @returns EvaluationResult OK
|
|
185
165
|
* @throws ApiError
|
|
186
166
|
*/
|
|
@@ -196,7 +176,7 @@ export declare class DefaultService {
|
|
|
196
176
|
getDefinition(projectId: string, definitionId: string): CancelablePromise<Definition>;
|
|
197
177
|
/**
|
|
198
178
|
* Update a DMN definition version
|
|
199
|
-
* Replaces the name and XML of a
|
|
179
|
+
* Replaces the name and XML of a draft. A deployed definition is read-only and answers 409, so save the change as a new draft instead.
|
|
200
180
|
* @param projectId
|
|
201
181
|
* @param definitionId
|
|
202
182
|
* @param requestBody
|
|
@@ -206,7 +186,7 @@ export declare class DefaultService {
|
|
|
206
186
|
updateDefinition(projectId: string, definitionId: string, requestBody: UpdateDefinitionRequest): CancelablePromise<Definition>;
|
|
207
187
|
/**
|
|
208
188
|
* Delete a DMN definition version
|
|
209
|
-
* Permanently deletes a
|
|
189
|
+
* Permanently deletes a draft. A deployed definition answers 409, since the engine keeps its version and evaluations.
|
|
210
190
|
* @param projectId
|
|
211
191
|
* @param definitionId
|
|
212
192
|
* @returns void
|
|
@@ -214,37 +194,25 @@ export declare class DefaultService {
|
|
|
214
194
|
*/
|
|
215
195
|
deleteDefinition(projectId: string, definitionId: string): CancelablePromise<void>;
|
|
216
196
|
/**
|
|
217
|
-
*
|
|
218
|
-
*
|
|
219
|
-
*
|
|
220
|
-
*
|
|
197
|
+
* Deploy a DMN definition
|
|
198
|
+
* Deploys a draft, which makes its decisions evaluable and callable from
|
|
199
|
+
* business rule tasks. Its document gets the next version of its
|
|
200
|
+
* `definitionsID`, and each decision the next version of its decision id.
|
|
201
|
+
* A draft identical to the latest deployed version is refused with 409. A
|
|
202
|
+
* deployed definition is read-only, and deploying it again answers 409.
|
|
221
203
|
*
|
|
222
204
|
* @param projectId
|
|
223
205
|
* @param definitionId
|
|
224
|
-
* @
|
|
225
|
-
* @returns EvaluationResult OK
|
|
226
|
-
* @throws ApiError
|
|
227
|
-
*/
|
|
228
|
-
evaluateStored(projectId: string, definitionId: string, requestBody: EvaluateStoredRequest): CancelablePromise<Record<string, EvaluationResult>>;
|
|
229
|
-
/**
|
|
230
|
-
* List executions of a DMN definition
|
|
231
|
-
* Returns paginated execution history for a single definition.
|
|
232
|
-
* @param projectId
|
|
233
|
-
* @param definitionId
|
|
234
|
-
* @param definitionsId Filter by DMN `<definitions id>` (XML id).
|
|
235
|
-
* @param startDate Filter executions after this date (ISO 8601)
|
|
236
|
-
* @param businessId Exact-match filter on the caller-supplied correlation key.
|
|
237
|
-
* @param page Page number (1-indexed)
|
|
238
|
-
* @param pageSize Number of items per page (max 100)
|
|
239
|
-
* @returns PaginatedExecutionsResponse OK
|
|
206
|
+
* @returns Definition OK
|
|
240
207
|
* @throws ApiError
|
|
241
208
|
*/
|
|
242
|
-
|
|
209
|
+
deployDefinition(projectId: string, definitionId: string): CancelablePromise<Definition>;
|
|
243
210
|
/**
|
|
244
211
|
* List decisions
|
|
245
|
-
* Returns one row per
|
|
246
|
-
* latest
|
|
247
|
-
* a target
|
|
212
|
+
* Returns one row per deployed decision or decision service in the
|
|
213
|
+
* project, at its latest version and with the definition that version
|
|
214
|
+
* came from. Useful for picking a target when wiring a BPMN
|
|
215
|
+
* BusinessRuleTask.
|
|
248
216
|
*
|
|
249
217
|
* @param projectId
|
|
250
218
|
* @param page Page number (1-indexed)
|
|
@@ -254,22 +222,41 @@ export declare class DefaultService {
|
|
|
254
222
|
* @throws ApiError
|
|
255
223
|
*/
|
|
256
224
|
listDecisions(projectId: string, page?: number, pageSize?: number, q?: string): CancelablePromise<PaginatedDecisionsResponse>;
|
|
225
|
+
/**
|
|
226
|
+
* List a decision's deployed versions
|
|
227
|
+
* Returns every deployed version of a decision, the latest first, with
|
|
228
|
+
* the DMN definition version it came from. Decision versions count per
|
|
229
|
+
* decision id, and a BPMN BusinessRuleTask that binds a version names one
|
|
230
|
+
* of them.
|
|
231
|
+
*
|
|
232
|
+
* @param projectId
|
|
233
|
+
* @param decisionId ID of the decision node from the DMN XML.
|
|
234
|
+
* @returns DecisionVersionList OK
|
|
235
|
+
* @throws ApiError
|
|
236
|
+
*/
|
|
237
|
+
listDecisionVersions(projectId: string, decisionId: string): CancelablePromise<DecisionVersionList>;
|
|
257
238
|
/**
|
|
258
239
|
* List DMN executions across the project
|
|
259
|
-
* Returns
|
|
240
|
+
* Returns the project's recorded decision evaluations, newest first:
|
|
241
|
+
* those of `EvaluateByDefinitionsID` and of business rule tasks. A test
|
|
242
|
+
* run's evaluations are left out.
|
|
243
|
+
*
|
|
260
244
|
* @param projectId
|
|
261
245
|
* @param definitionsId Filter by DMN `<definitions id>` (XML id).
|
|
246
|
+
* @param version Only evaluations of this deployed version of `definitionsID`. Ignored without `definitionsID`.
|
|
247
|
+
* @param instanceId Only the evaluations of this process instance's business rule tasks.
|
|
248
|
+
* @param executionKey Only the evaluation of this business rule task execution, the `executionKey` of its entries in the instance history. Use it with `instanceID`.
|
|
262
249
|
* @param businessId Exact-match filter on the caller-supplied correlation key.
|
|
263
250
|
* @param startDate Only return executions at or after this instant (ISO 8601). Bounds the scan and the reported total; omit for the full unbounded history.
|
|
264
|
-
* @param page
|
|
265
|
-
* @param
|
|
251
|
+
* @param cursor The `nextCursor` of the page before, absent for the first page.
|
|
252
|
+
* @param limit Most executions per page, 20 by default and 100 at most.
|
|
266
253
|
* @returns PaginatedExecutionsResponse OK
|
|
267
254
|
* @throws ApiError
|
|
268
255
|
*/
|
|
269
|
-
listProjectExecutions(projectId: string, definitionsId?: string, businessId?: string, startDate?: string,
|
|
256
|
+
listProjectExecutions(projectId: string, definitionsId?: string, version?: number, instanceId?: string, executionKey?: string, businessId?: string, startDate?: string, cursor?: string, limit?: number): CancelablePromise<PaginatedExecutionsResponse>;
|
|
270
257
|
/**
|
|
271
258
|
* Get a single DMN execution
|
|
272
|
-
* Returns the inputs
|
|
259
|
+
* Returns the inputs and per-decision results of a single recorded evaluation.
|
|
273
260
|
* @param projectId
|
|
274
261
|
* @param executionId
|
|
275
262
|
* @returns Execution OK
|
|
@@ -278,9 +265,8 @@ export declare class DefaultService {
|
|
|
278
265
|
getExecution(projectId: string, executionId: string): CancelablePromise<Execution>;
|
|
279
266
|
/**
|
|
280
267
|
* List BPMN instances
|
|
281
|
-
* Returns paginated process instances in the project, optionally filtered by
|
|
268
|
+
* Returns paginated process instances in the project, optionally filtered by process, version or status.
|
|
282
269
|
* @param projectId
|
|
283
|
-
* @param definitionId
|
|
284
270
|
* @param status
|
|
285
271
|
* @param hasIncident Filter by whether the instance has at least one unresolved incident.
|
|
286
272
|
* Omit to return all instances regardless of incident status; pass
|
|
@@ -295,26 +281,32 @@ export declare class DefaultService {
|
|
|
295
281
|
* at a time.
|
|
296
282
|
*
|
|
297
283
|
* @param createdAfter Only return instances created at or after this timestamp. Strongly
|
|
298
|
-
* recommended for monitoring views -
|
|
299
|
-
*
|
|
284
|
+
* recommended for monitoring views - ended instances stay until
|
|
285
|
+
* retention deletes them, and unfiltered queries grow linearly with
|
|
300
286
|
* that history.
|
|
301
287
|
*
|
|
302
288
|
* @param businessId Prefix match on the caller-supplied correlation key set at start time.
|
|
303
|
-
* @param processId Only instances of this process id, in any version
|
|
304
|
-
* @param
|
|
305
|
-
* @param
|
|
289
|
+
* @param processId Only instances of this process id, in any version unless `version` names one.
|
|
290
|
+
* @param version Only instances of this version of `processId`. Ignored without `processId`.
|
|
291
|
+
* @param draft `true` keeps only test runs (see `StartBpmnTestInstance`), `false`
|
|
292
|
+
* leaves them out. Omit for both.
|
|
293
|
+
*
|
|
294
|
+
* @param cursor The `nextCursor` of the page before, absent for the first page.
|
|
295
|
+
* @param limit Most instances per page, 20 by default and 100 at most.
|
|
306
296
|
* @returns BpmnInstancePaginatedResponse OK
|
|
307
297
|
* @throws ApiError
|
|
308
298
|
*/
|
|
309
|
-
listBpmnInstances(projectId: string,
|
|
299
|
+
listBpmnInstances(projectId: string, status?: 'RUNNING' | 'COMPLETED' | 'FAILED' | 'CANCELED' | 'TERMINATED', hasIncident?: boolean, suspended?: boolean, createdAfter?: string, businessId?: string, processId?: string, version?: number, draft?: boolean, cursor?: string, limit?: number): CancelablePromise<BpmnInstancePaginatedResponse>;
|
|
310
300
|
/**
|
|
311
301
|
* Start a BPMN process instance
|
|
312
|
-
* Starts a new instance of a deployed BPMN process
|
|
313
|
-
*
|
|
314
|
-
* state, send signals/messages, complete user
|
|
302
|
+
* Starts a new instance of a deployed BPMN process, the latest version
|
|
303
|
+
* unless the request names one. The returned `instanceID` addresses the
|
|
304
|
+
* instance - use it to fetch state, send signals/messages, complete user
|
|
305
|
+
* tasks, etc.
|
|
315
306
|
*
|
|
316
|
-
* A process
|
|
317
|
-
*
|
|
307
|
+
* A process with no deployed version, or without the requested one,
|
|
308
|
+
* answers 404, also when it exists in a resource that is not deployed yet.
|
|
309
|
+
* Drafts only start test instances, see `StartBpmnTestInstance`.
|
|
318
310
|
*
|
|
319
311
|
* @param projectId
|
|
320
312
|
* @param requestBody
|
|
@@ -323,65 +315,65 @@ export declare class DefaultService {
|
|
|
323
315
|
*/
|
|
324
316
|
startBpmnInstance(projectId: string, requestBody: StartBpmnInstanceRequest): CancelablePromise<{
|
|
325
317
|
/**
|
|
326
|
-
*
|
|
318
|
+
* Identifier of the new instance.
|
|
327
319
|
*/
|
|
328
|
-
|
|
320
|
+
instanceID?: string;
|
|
329
321
|
}>;
|
|
330
322
|
/**
|
|
331
323
|
* Get BPMN instance state
|
|
332
|
-
* Returns the
|
|
333
|
-
*
|
|
334
|
-
*
|
|
335
|
-
* instance.
|
|
324
|
+
* Returns the runtime state of a process instance - current variables,
|
|
325
|
+
* active scopes, and any unresolved incidents. Its history is paged
|
|
326
|
+
* separately, see `GetBpmnInstanceHistory`.
|
|
336
327
|
*
|
|
337
328
|
* @param projectId
|
|
338
|
-
* @param
|
|
329
|
+
* @param instanceId
|
|
339
330
|
* @returns BpmnInstanceState OK
|
|
340
331
|
* @throws ApiError
|
|
341
332
|
*/
|
|
342
|
-
getBpmnInstance(projectId: string,
|
|
333
|
+
getBpmnInstance(projectId: string, instanceId: string): CancelablePromise<BpmnInstanceState>;
|
|
343
334
|
/**
|
|
344
335
|
* Cancel a BPMN instance
|
|
345
336
|
* Cancels a running instance and all of its active activities, jobs, and
|
|
346
337
|
* child instances. Cancellation is best-effort - handlers in flight may
|
|
347
338
|
* still complete before the cancel propagates. Cancelled instances move
|
|
348
339
|
* to status `CANCELED` and stop consuming further work.
|
|
340
|
+
* The cancel is recorded in the instance's history as a
|
|
341
|
+
* `CancelInstanceEvent` naming who cancelled it.
|
|
349
342
|
*
|
|
350
343
|
* @param projectId
|
|
351
|
-
* @param
|
|
344
|
+
* @param instanceId
|
|
352
345
|
* @returns void
|
|
353
346
|
* @throws ApiError
|
|
354
347
|
*/
|
|
355
|
-
cancelBpmnInstance(projectId: string,
|
|
348
|
+
cancelBpmnInstance(projectId: string, instanceId: string): CancelablePromise<void>;
|
|
356
349
|
/**
|
|
357
350
|
* List external jobs
|
|
358
351
|
* Returns paginated external jobs in the project, with optional filters
|
|
359
|
-
* by `taskType`, `status`, and originating instance.
|
|
360
|
-
*
|
|
361
|
-
*
|
|
352
|
+
* by `taskType`, `status`, and originating instance. The list holds the
|
|
353
|
+
* pending jobs and the finished jobs of running instances. An instance's
|
|
354
|
+
* jobs leave the list when it ends, and its history keeps each job's task
|
|
355
|
+
* type, retries left and worker. For pulling pending work as a job
|
|
356
|
+
* worker, use `Poll` instead.
|
|
362
357
|
*
|
|
363
358
|
* @param projectId
|
|
364
359
|
* @param taskType Filter jobs by task type
|
|
365
360
|
* @param status Filter jobs by status
|
|
366
|
-
* @param
|
|
361
|
+
* @param instanceId Only this instance's jobs. A test run's jobs list only by its instance.
|
|
367
362
|
* @param businessId Prefix match on the caller-supplied correlation key.
|
|
368
|
-
* @param createdAfter Only return jobs created at or after this timestamp.
|
|
369
|
-
*
|
|
370
|
-
*
|
|
371
|
-
*
|
|
372
|
-
* @param page
|
|
373
|
-
* @param pageSize
|
|
363
|
+
* @param createdAfter Only return jobs created at or after this timestamp.
|
|
364
|
+
* @param cursor The `nextCursor` of the page before, absent for the first page.
|
|
365
|
+
* @param limit Most jobs per page, 20 by default and 100 at most.
|
|
374
366
|
* @returns BpmnExternalJobPaginatedResponse OK
|
|
375
367
|
* @throws ApiError
|
|
376
368
|
*/
|
|
377
|
-
listBpmnExternalJobs(projectId: string, taskType?: string, status?: 'PENDING' | 'COMPLETED' | 'FAILED' | 'CANCELED',
|
|
369
|
+
listBpmnExternalJobs(projectId: string, taskType?: string, status?: 'PENDING' | 'COMPLETED' | 'FAILED' | 'CANCELED', instanceId?: string, businessId?: string, createdAfter?: string, cursor?: string, limit?: number): CancelablePromise<BpmnExternalJobPaginatedResponse>;
|
|
378
370
|
/**
|
|
379
371
|
* Poll for external jobs (long-poll)
|
|
380
372
|
* Long-polls for PENDING jobs of a given `taskType`. Returns a batch of
|
|
381
373
|
* jobs (up to `maxJobs`) as soon as any are available, or `204 No Content`
|
|
382
374
|
* when the timeout elapses with no work. Each returned job is locked to
|
|
383
375
|
* the caller until `lockDuration` passes without a `Heartbeat`, and for at
|
|
384
|
-
* most the server's `
|
|
376
|
+
* most the server's `ENGINE_JOB_MAX_HOLD` (30m by default) in total. Finish
|
|
385
377
|
* with `Complete` or `ThrowError`. A lock that runs out costs the job a
|
|
386
378
|
* retry, and with no retries left it raises an incident.
|
|
387
379
|
*
|
|
@@ -394,7 +386,7 @@ export declare class DefaultService {
|
|
|
394
386
|
/**
|
|
395
387
|
* Extend the lock on an acquired job
|
|
396
388
|
* Keeps the caller's lock on a job it acquired via `Poll` for another
|
|
397
|
-
* `lockDuration`, up to `
|
|
389
|
+
* `lockDuration`, up to `ENGINE_JOB_MAX_HOLD` after the job was handed out.
|
|
398
390
|
* SDK workers send it at half of the lock the poll granted
|
|
399
391
|
* (`lockExpiresAt`) while a handler runs.
|
|
400
392
|
* Other workers cannot claim the job while the lock holds.
|
|
@@ -417,7 +409,9 @@ export declare class DefaultService {
|
|
|
417
409
|
* Finalizes an acquired external job successfully. The supplied
|
|
418
410
|
* `variables` are merged into the originating instance's scope and the
|
|
419
411
|
* process resumes after the service task. Idempotent on the executionKey:
|
|
420
|
-
* a second call with the same key after success is a no-op.
|
|
412
|
+
* a second call with the same key after success is a no-op. Once the
|
|
413
|
+
* instance has ended, any report on its jobs answers 200 and changes
|
|
414
|
+
* nothing.
|
|
421
415
|
*
|
|
422
416
|
* @param projectId
|
|
423
417
|
* @param executionKey
|
|
@@ -427,15 +421,17 @@ export declare class DefaultService {
|
|
|
427
421
|
*/
|
|
428
422
|
completeBpmnExternalJob(projectId: string, executionKey: string, requestBody: {
|
|
429
423
|
/**
|
|
430
|
-
*
|
|
424
|
+
* Instance ID returned by the poll response.
|
|
431
425
|
*/
|
|
432
|
-
|
|
426
|
+
instanceID: string;
|
|
433
427
|
/**
|
|
434
428
|
* Optional worker identity (the same `clientID` used to poll).
|
|
435
429
|
* When supplied, a worker that no longer holds the job's lock
|
|
436
|
-
* gets 409 and its result is discarded.
|
|
437
|
-
* worker
|
|
438
|
-
*
|
|
430
|
+
* gets 409 and its result is discarded. Repeating the report
|
|
431
|
+
* this worker last made on the job answers 200 again and changes
|
|
432
|
+
* nothing. Without it, the completion applies to an open job no
|
|
433
|
+
* worker holds a live lock on, as a completion from the console
|
|
434
|
+
* does.
|
|
439
435
|
*
|
|
440
436
|
*/
|
|
441
437
|
clientID?: string;
|