@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
|
@@ -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,24 @@ 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
|
-
*
|
|
247
|
-
* a target decision when wiring a BPMN BusinessRuleTask.
|
|
212
|
+
* Returns one row per deployed decision in the project, at its latest
|
|
213
|
+
* version and with the definition that version came from. Useful for
|
|
214
|
+
* picking a target decision when wiring a BPMN BusinessRuleTask.
|
|
248
215
|
*
|
|
249
216
|
* @param projectId
|
|
250
217
|
* @param page Page number (1-indexed)
|
|
@@ -254,11 +221,28 @@ export declare class DefaultService {
|
|
|
254
221
|
* @throws ApiError
|
|
255
222
|
*/
|
|
256
223
|
listDecisions(projectId: string, page?: number, pageSize?: number, q?: string): CancelablePromise<PaginatedDecisionsResponse>;
|
|
224
|
+
/**
|
|
225
|
+
* List a decision's deployed versions
|
|
226
|
+
* Returns every deployed version of a decision, the latest first, with
|
|
227
|
+
* the DMN definition version it came from. Decision versions count per
|
|
228
|
+
* decision id, and a BPMN BusinessRuleTask that binds a version names one
|
|
229
|
+
* of them.
|
|
230
|
+
*
|
|
231
|
+
* @param projectId
|
|
232
|
+
* @param decisionId ID of the decision node from the DMN XML.
|
|
233
|
+
* @returns DecisionVersionList OK
|
|
234
|
+
* @throws ApiError
|
|
235
|
+
*/
|
|
236
|
+
listDecisionVersions(projectId: string, decisionId: string): CancelablePromise<DecisionVersionList>;
|
|
257
237
|
/**
|
|
258
238
|
* List DMN executions across the project
|
|
259
|
-
* Returns
|
|
239
|
+
* Returns the project's recorded decision evaluations, newest first:
|
|
240
|
+
* those of `EvaluateByDefinitionsID` and of business rule tasks. A test
|
|
241
|
+
* run's evaluations are left out.
|
|
242
|
+
*
|
|
260
243
|
* @param projectId
|
|
261
244
|
* @param definitionsId Filter by DMN `<definitions id>` (XML id).
|
|
245
|
+
* @param version Only evaluations of this deployed version of `definitionsID`. Ignored without `definitionsID`.
|
|
262
246
|
* @param businessId Exact-match filter on the caller-supplied correlation key.
|
|
263
247
|
* @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
248
|
* @param page Page number (1-indexed)
|
|
@@ -266,10 +250,10 @@ export declare class DefaultService {
|
|
|
266
250
|
* @returns PaginatedExecutionsResponse OK
|
|
267
251
|
* @throws ApiError
|
|
268
252
|
*/
|
|
269
|
-
listProjectExecutions(projectId: string, definitionsId?: string, businessId?: string, startDate?: string, page?: number, pageSize?: number): CancelablePromise<PaginatedExecutionsResponse>;
|
|
253
|
+
listProjectExecutions(projectId: string, definitionsId?: string, version?: number, businessId?: string, startDate?: string, page?: number, pageSize?: number): CancelablePromise<PaginatedExecutionsResponse>;
|
|
270
254
|
/**
|
|
271
255
|
* Get a single DMN execution
|
|
272
|
-
* Returns the inputs
|
|
256
|
+
* Returns the inputs and per-decision results of a single recorded evaluation.
|
|
273
257
|
* @param projectId
|
|
274
258
|
* @param executionId
|
|
275
259
|
* @returns Execution OK
|
|
@@ -278,9 +262,8 @@ export declare class DefaultService {
|
|
|
278
262
|
getExecution(projectId: string, executionId: string): CancelablePromise<Execution>;
|
|
279
263
|
/**
|
|
280
264
|
* List BPMN instances
|
|
281
|
-
* Returns paginated process instances in the project, optionally filtered by
|
|
265
|
+
* Returns paginated process instances in the project, optionally filtered by process, version or status.
|
|
282
266
|
* @param projectId
|
|
283
|
-
* @param definitionId
|
|
284
267
|
* @param status
|
|
285
268
|
* @param hasIncident Filter by whether the instance has at least one unresolved incident.
|
|
286
269
|
* Omit to return all instances regardless of incident status; pass
|
|
@@ -295,22 +278,32 @@ export declare class DefaultService {
|
|
|
295
278
|
* at a time.
|
|
296
279
|
*
|
|
297
280
|
* @param createdAfter Only return instances created at or after this timestamp. Strongly
|
|
298
|
-
* recommended for monitoring views -
|
|
299
|
-
*
|
|
281
|
+
* recommended for monitoring views - ended instances stay until
|
|
282
|
+
* retention deletes them, and unfiltered queries grow linearly with
|
|
300
283
|
* that history.
|
|
301
284
|
*
|
|
302
|
-
* @param businessId
|
|
303
|
-
* @param
|
|
304
|
-
* @param
|
|
285
|
+
* @param businessId Prefix match on the caller-supplied correlation key set at start time.
|
|
286
|
+
* @param processId Only instances of this process id, in any version unless `version` names one.
|
|
287
|
+
* @param version Only instances of this version of `processId`. Ignored without `processId`.
|
|
288
|
+
* @param draft `true` keeps only test runs (see `StartBpmnTestInstance`), `false`
|
|
289
|
+
* leaves them out. Omit for both.
|
|
290
|
+
*
|
|
291
|
+
* @param cursor The `nextCursor` of the page before, absent for the first page.
|
|
292
|
+
* @param limit Most instances per page, 20 by default and 100 at most.
|
|
305
293
|
* @returns BpmnInstancePaginatedResponse OK
|
|
306
294
|
* @throws ApiError
|
|
307
295
|
*/
|
|
308
|
-
listBpmnInstances(projectId: string,
|
|
296
|
+
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>;
|
|
309
297
|
/**
|
|
310
298
|
* Start a BPMN process instance
|
|
311
|
-
* Starts a new instance of a deployed BPMN process
|
|
312
|
-
*
|
|
313
|
-
* state, send signals/messages, complete user
|
|
299
|
+
* Starts a new instance of a deployed BPMN process, the latest version
|
|
300
|
+
* unless the request names one. The returned `instanceID` addresses the
|
|
301
|
+
* instance - use it to fetch state, send signals/messages, complete user
|
|
302
|
+
* tasks, etc.
|
|
303
|
+
*
|
|
304
|
+
* A process with no deployed version, or without the requested one,
|
|
305
|
+
* answers 404, also when it exists in a resource that is not deployed yet.
|
|
306
|
+
* Drafts only start test instances, see `StartBpmnTestInstance`.
|
|
314
307
|
*
|
|
315
308
|
* @param projectId
|
|
316
309
|
* @param requestBody
|
|
@@ -319,65 +312,67 @@ export declare class DefaultService {
|
|
|
319
312
|
*/
|
|
320
313
|
startBpmnInstance(projectId: string, requestBody: StartBpmnInstanceRequest): CancelablePromise<{
|
|
321
314
|
/**
|
|
322
|
-
*
|
|
315
|
+
* Identifier of the new instance.
|
|
323
316
|
*/
|
|
324
|
-
|
|
317
|
+
instanceID?: string;
|
|
325
318
|
}>;
|
|
326
319
|
/**
|
|
327
320
|
* Get BPMN instance state
|
|
328
|
-
* Returns the
|
|
329
|
-
*
|
|
330
|
-
*
|
|
331
|
-
* instance.
|
|
321
|
+
* Returns the runtime state of a process instance - current variables,
|
|
322
|
+
* active scopes, and any unresolved incidents. Its history is paged
|
|
323
|
+
* separately, see `GetBpmnInstanceHistory`.
|
|
332
324
|
*
|
|
333
325
|
* @param projectId
|
|
334
|
-
* @param
|
|
326
|
+
* @param instanceId
|
|
335
327
|
* @returns BpmnInstanceState OK
|
|
336
328
|
* @throws ApiError
|
|
337
329
|
*/
|
|
338
|
-
getBpmnInstance(projectId: string,
|
|
330
|
+
getBpmnInstance(projectId: string, instanceId: string): CancelablePromise<BpmnInstanceState>;
|
|
339
331
|
/**
|
|
340
332
|
* Cancel a BPMN instance
|
|
341
333
|
* Cancels a running instance and all of its active activities, jobs, and
|
|
342
334
|
* child instances. Cancellation is best-effort - handlers in flight may
|
|
343
335
|
* still complete before the cancel propagates. Cancelled instances move
|
|
344
336
|
* to status `CANCELED` and stop consuming further work.
|
|
337
|
+
* The cancel is recorded in the instance's history as a
|
|
338
|
+
* `CancelInstanceEvent` naming who cancelled it.
|
|
345
339
|
*
|
|
346
340
|
* @param projectId
|
|
347
|
-
* @param
|
|
341
|
+
* @param instanceId
|
|
348
342
|
* @returns void
|
|
349
343
|
* @throws ApiError
|
|
350
344
|
*/
|
|
351
|
-
cancelBpmnInstance(projectId: string,
|
|
345
|
+
cancelBpmnInstance(projectId: string, instanceId: string): CancelablePromise<void>;
|
|
352
346
|
/**
|
|
353
347
|
* List external jobs
|
|
354
348
|
* Returns paginated external jobs in the project, with optional filters
|
|
355
|
-
* by `taskType`, `status`, and originating instance.
|
|
356
|
-
*
|
|
357
|
-
*
|
|
349
|
+
* by `taskType`, `status`, and originating instance. The list holds the
|
|
350
|
+
* pending jobs and the finished jobs of running instances. An instance's
|
|
351
|
+
* jobs leave the list when it ends, and its history keeps each job's task
|
|
352
|
+
* type, retries left and worker. For pulling pending work as a job
|
|
353
|
+
* worker, use `Poll` instead.
|
|
358
354
|
*
|
|
359
355
|
* @param projectId
|
|
360
356
|
* @param taskType Filter jobs by task type
|
|
361
357
|
* @param status Filter jobs by status
|
|
362
|
-
* @param
|
|
363
|
-
* @param businessId
|
|
364
|
-
* @param createdAfter Only return jobs created at or after this timestamp.
|
|
365
|
-
*
|
|
366
|
-
*
|
|
367
|
-
*
|
|
368
|
-
* @param page
|
|
369
|
-
* @param pageSize
|
|
358
|
+
* @param instanceId Only this instance's jobs. A test run's jobs list only by its instance.
|
|
359
|
+
* @param businessId Prefix match on the caller-supplied correlation key.
|
|
360
|
+
* @param createdAfter Only return jobs created at or after this timestamp.
|
|
361
|
+
* @param cursor The `nextCursor` of the page before, absent for the first page.
|
|
362
|
+
* @param limit Most jobs per page, 20 by default and 100 at most.
|
|
370
363
|
* @returns BpmnExternalJobPaginatedResponse OK
|
|
371
364
|
* @throws ApiError
|
|
372
365
|
*/
|
|
373
|
-
listBpmnExternalJobs(projectId: string, taskType?: string, status?: 'PENDING' | 'COMPLETED' | 'FAILED' | 'CANCELED',
|
|
366
|
+
listBpmnExternalJobs(projectId: string, taskType?: string, status?: 'PENDING' | 'COMPLETED' | 'FAILED' | 'CANCELED', instanceId?: string, businessId?: string, createdAfter?: string, cursor?: string, limit?: number): CancelablePromise<BpmnExternalJobPaginatedResponse>;
|
|
374
367
|
/**
|
|
375
368
|
* Poll for external jobs (long-poll)
|
|
376
369
|
* Long-polls for PENDING jobs of a given `taskType`. Returns a batch of
|
|
377
370
|
* jobs (up to `maxJobs`) as soon as any are available, or `204 No Content`
|
|
378
|
-
* when the timeout elapses with no work. Each returned job is
|
|
379
|
-
*
|
|
380
|
-
* the
|
|
371
|
+
* when the timeout elapses with no work. Each returned job is locked to
|
|
372
|
+
* the caller until `lockDuration` passes without a `Heartbeat`, and for at
|
|
373
|
+
* most the server's `ENGINE_JOB_MAX_HOLD` (30m by default) in total. Finish
|
|
374
|
+
* with `Complete` or `ThrowError`. A lock that runs out costs the job a
|
|
375
|
+
* retry, and with no retries left it raises an incident.
|
|
381
376
|
*
|
|
382
377
|
* @param projectId
|
|
383
378
|
* @param requestBody
|
|
@@ -387,10 +382,11 @@ export declare class DefaultService {
|
|
|
387
382
|
pollBpmnExternalJobs(projectId: string, requestBody: PollBpmnJobRequest): CancelablePromise<Array<ExternalJob>>;
|
|
388
383
|
/**
|
|
389
384
|
* Extend the lock on an acquired job
|
|
390
|
-
*
|
|
391
|
-
*
|
|
392
|
-
*
|
|
393
|
-
*
|
|
385
|
+
* Keeps the caller's lock on a job it acquired via `Poll` for another
|
|
386
|
+
* `lockDuration`, up to `ENGINE_JOB_MAX_HOLD` after the job was handed out.
|
|
387
|
+
* SDK workers send it at half of the lock the poll granted
|
|
388
|
+
* (`lockExpiresAt`) while a handler runs.
|
|
389
|
+
* Other workers cannot claim the job while the lock holds.
|
|
394
390
|
*
|
|
395
391
|
* @param projectId
|
|
396
392
|
* @param executionKey
|
|
@@ -410,7 +406,9 @@ export declare class DefaultService {
|
|
|
410
406
|
* Finalizes an acquired external job successfully. The supplied
|
|
411
407
|
* `variables` are merged into the originating instance's scope and the
|
|
412
408
|
* process resumes after the service task. Idempotent on the executionKey:
|
|
413
|
-
* a second call with the same key after success is a no-op.
|
|
409
|
+
* a second call with the same key after success is a no-op. Once the
|
|
410
|
+
* instance has ended, any report on its jobs answers 200 and changes
|
|
411
|
+
* nothing.
|
|
414
412
|
*
|
|
415
413
|
* @param projectId
|
|
416
414
|
* @param executionKey
|
|
@@ -420,15 +418,17 @@ export declare class DefaultService {
|
|
|
420
418
|
*/
|
|
421
419
|
completeBpmnExternalJob(projectId: string, executionKey: string, requestBody: {
|
|
422
420
|
/**
|
|
423
|
-
*
|
|
421
|
+
* Instance ID returned by the poll response.
|
|
424
422
|
*/
|
|
425
|
-
|
|
423
|
+
instanceID: string;
|
|
426
424
|
/**
|
|
427
425
|
* Optional worker identity (the same `clientID` used to poll).
|
|
428
|
-
* When supplied,
|
|
429
|
-
*
|
|
430
|
-
*
|
|
431
|
-
*
|
|
426
|
+
* When supplied, a worker that no longer holds the job's lock
|
|
427
|
+
* gets 409 and its result is discarded. Repeating the report
|
|
428
|
+
* this worker last made on the job answers 200 again and changes
|
|
429
|
+
* nothing. Without it, the completion applies to an open job no
|
|
430
|
+
* worker holds a live lock on, as a completion from the console
|
|
431
|
+
* does.
|
|
432
432
|
*
|
|
433
433
|
*/
|
|
434
434
|
clientID?: string;
|