@camunda/task-testing 0.2.2 → 0.2.4
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/LICENSE +20 -20
- package/README.md +34 -34
- package/dist/index.js +273 -313
- package/dist/index.js.map +1 -1
- package/package.json +91 -91
package/dist/index.js
CHANGED
|
@@ -33,8 +33,8 @@ class ElementConfig extends (events__WEBPACK_IMPORTED_MODULE_0___default()) {
|
|
|
33
33
|
this._injector = injector;
|
|
34
34
|
this._elementVariables = elementVariables;
|
|
35
35
|
|
|
36
|
-
/**
|
|
37
|
-
* @type {import('./types').Config}
|
|
36
|
+
/**
|
|
37
|
+
* @type {import('./types').Config}
|
|
38
38
|
*/
|
|
39
39
|
this._config = {
|
|
40
40
|
...DEFAULT_CONFIG,
|
|
@@ -108,9 +108,9 @@ class ElementConfig extends (events__WEBPACK_IMPORTED_MODULE_0___default()) {
|
|
|
108
108
|
return this._config.input[element.id];
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
-
/**
|
|
112
|
-
* @param {import('./types').Element} element
|
|
113
|
-
* @returns {import('./types').ElementOutput}
|
|
111
|
+
/**
|
|
112
|
+
* @param {import('./types').Element} element
|
|
113
|
+
* @returns {import('./types').ElementOutput}
|
|
114
114
|
*/
|
|
115
115
|
getOutputConfigForElement(element) {
|
|
116
116
|
if (!(0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.isAny)(element, SUPPORTED_ELEMENT_TYPES)) {
|
|
@@ -127,12 +127,12 @@ class ElementConfig extends (events__WEBPACK_IMPORTED_MODULE_0___default()) {
|
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
129
|
|
|
130
|
-
/**
|
|
131
|
-
* Get input parameters from a BPMN element.
|
|
132
|
-
*
|
|
133
|
-
* @param {import('./types').Element} element
|
|
134
|
-
*
|
|
135
|
-
* @returns {import('./types').ModdleElement[]}
|
|
130
|
+
/**
|
|
131
|
+
* Get input parameters from a BPMN element.
|
|
132
|
+
*
|
|
133
|
+
* @param {import('./types').Element} element
|
|
134
|
+
*
|
|
135
|
+
* @returns {import('./types').ModdleElement[]}
|
|
136
136
|
*/
|
|
137
137
|
function getInputParameters(element) {
|
|
138
138
|
const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.getBusinessObject)(element);
|
|
@@ -151,20 +151,20 @@ function getInputParameters(element) {
|
|
|
151
151
|
return ioMapping.get('inputParameters');
|
|
152
152
|
}
|
|
153
153
|
|
|
154
|
-
/**
|
|
155
|
-
* Unflatten an object with dot notation keys into a nested object.
|
|
156
|
-
*
|
|
157
|
-
* Example:
|
|
158
|
-
*
|
|
159
|
-
* ```
|
|
160
|
-
* unflatten({
|
|
161
|
-
* 'foo.bar': 'baz'
|
|
162
|
-
* }) // returns { foo: { bar: 'baz' } }
|
|
163
|
-
* ```
|
|
164
|
-
*
|
|
165
|
-
* @param {Object} obj
|
|
166
|
-
*
|
|
167
|
-
* @returns {Object}
|
|
154
|
+
/**
|
|
155
|
+
* Unflatten an object with dot notation keys into a nested object.
|
|
156
|
+
*
|
|
157
|
+
* Example:
|
|
158
|
+
*
|
|
159
|
+
* ```
|
|
160
|
+
* unflatten({
|
|
161
|
+
* 'foo.bar': 'baz'
|
|
162
|
+
* }) // returns { foo: { bar: 'baz' } }
|
|
163
|
+
* ```
|
|
164
|
+
*
|
|
165
|
+
* @param {Object} obj
|
|
166
|
+
*
|
|
167
|
+
* @returns {Object}
|
|
168
168
|
*/
|
|
169
169
|
function unflatten(obj) {
|
|
170
170
|
const result = {};
|
|
@@ -183,16 +183,16 @@ function unflatten(obj) {
|
|
|
183
183
|
return result;
|
|
184
184
|
}
|
|
185
185
|
|
|
186
|
-
/**
|
|
187
|
-
* Create default input config for a BPMN element.
|
|
188
|
-
*
|
|
189
|
-
* @todo Only simple input parameter sources can be handled until
|
|
190
|
-
* https://github.com/bpmn-io/internal-docs/issues/1218 is implemented.
|
|
191
|
-
*
|
|
192
|
-
* @param {import('./types').Element} element
|
|
193
|
-
* @param {import('./types').Variable[]} variablesForElement
|
|
194
|
-
*
|
|
195
|
-
* @returns {string}
|
|
186
|
+
/**
|
|
187
|
+
* Create default input config for a BPMN element.
|
|
188
|
+
*
|
|
189
|
+
* @todo Only simple input parameter sources can be handled until
|
|
190
|
+
* https://github.com/bpmn-io/internal-docs/issues/1218 is implemented.
|
|
191
|
+
*
|
|
192
|
+
* @param {import('./types').Element} element
|
|
193
|
+
* @param {import('./types').Variable[]} variablesForElement
|
|
194
|
+
*
|
|
195
|
+
* @returns {string}
|
|
196
196
|
*/
|
|
197
197
|
function createDefaultInputConfig(element, variablesForElement) {
|
|
198
198
|
const inputParameters = getInputParameters(element);
|
|
@@ -234,18 +234,18 @@ function createDefaultInputConfig(element, variablesForElement) {
|
|
|
234
234
|
return JSON.stringify(unflatten(foundVariables), null, 2);
|
|
235
235
|
}
|
|
236
236
|
|
|
237
|
-
/**
|
|
238
|
-
* Get the name from a source string.
|
|
239
|
-
*
|
|
240
|
-
* @example
|
|
241
|
-
*
|
|
242
|
-
* getNameFromSource('=foo') // 'foo'
|
|
243
|
-
* getNameFromSource('=foo + bar') // null
|
|
244
|
-
* getNameFromSource('= 1 + 2') // null
|
|
245
|
-
*
|
|
246
|
-
* @param {string} source
|
|
247
|
-
*
|
|
248
|
-
* @returns {string|null}
|
|
237
|
+
/**
|
|
238
|
+
* Get the name from a source string.
|
|
239
|
+
*
|
|
240
|
+
* @example
|
|
241
|
+
*
|
|
242
|
+
* getNameFromSource('=foo') // 'foo'
|
|
243
|
+
* getNameFromSource('=foo + bar') // null
|
|
244
|
+
* getNameFromSource('= 1 + 2') // null
|
|
245
|
+
*
|
|
246
|
+
* @param {string} source
|
|
247
|
+
*
|
|
248
|
+
* @returns {string|null}
|
|
249
249
|
*/
|
|
250
250
|
function getNameFromSource(source) {
|
|
251
251
|
if (source && isFeel(source)) {
|
|
@@ -257,36 +257,36 @@ function getNameFromSource(source) {
|
|
|
257
257
|
return null;
|
|
258
258
|
}
|
|
259
259
|
|
|
260
|
-
/**
|
|
261
|
-
* Check if a source string is a FEEL expression.
|
|
262
|
-
*
|
|
263
|
-
* @example
|
|
264
|
-
*
|
|
265
|
-
* isFeel('=foo') // true
|
|
266
|
-
* isFeel('= 1 + 2') // true
|
|
267
|
-
* isFeel('foo') // false
|
|
268
|
-
*
|
|
269
|
-
* @param {string} source
|
|
270
|
-
*
|
|
271
|
-
* @returns {boolean}
|
|
260
|
+
/**
|
|
261
|
+
* Check if a source string is a FEEL expression.
|
|
262
|
+
*
|
|
263
|
+
* @example
|
|
264
|
+
*
|
|
265
|
+
* isFeel('=foo') // true
|
|
266
|
+
* isFeel('= 1 + 2') // true
|
|
267
|
+
* isFeel('foo') // false
|
|
268
|
+
*
|
|
269
|
+
* @param {string} source
|
|
270
|
+
*
|
|
271
|
+
* @returns {boolean}
|
|
272
272
|
*/
|
|
273
273
|
function isFeel(source) {
|
|
274
274
|
return !!source && source.startsWith('=');
|
|
275
275
|
}
|
|
276
276
|
|
|
277
|
-
/**
|
|
278
|
-
* Check if a source string is a boolean FEEL expression.
|
|
279
|
-
*
|
|
280
|
-
* @example
|
|
281
|
-
*
|
|
282
|
-
* isBoolean('=true') // true
|
|
283
|
-
* isBoolean('= false') // true
|
|
284
|
-
* isBoolean('=foo') // false
|
|
285
|
-
* isBoolean('=1 + 2') // false
|
|
286
|
-
*
|
|
287
|
-
* @param {string} source
|
|
288
|
-
*
|
|
289
|
-
* @return {boolean}
|
|
277
|
+
/**
|
|
278
|
+
* Check if a source string is a boolean FEEL expression.
|
|
279
|
+
*
|
|
280
|
+
* @example
|
|
281
|
+
*
|
|
282
|
+
* isBoolean('=true') // true
|
|
283
|
+
* isBoolean('= false') // true
|
|
284
|
+
* isBoolean('=foo') // false
|
|
285
|
+
* isBoolean('=1 + 2') // false
|
|
286
|
+
*
|
|
287
|
+
* @param {string} source
|
|
288
|
+
*
|
|
289
|
+
* @return {boolean}
|
|
290
290
|
*/
|
|
291
291
|
function isBoolean(source) {
|
|
292
292
|
return !!source && /^=\s*(true|false)\s*$/i.test(source);
|
|
@@ -352,33 +352,33 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
352
352
|
/* harmony export */ });
|
|
353
353
|
/* harmony import */ var events__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! events */ "./node_modules/events/events.js");
|
|
354
354
|
/* harmony import */ var events__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(events__WEBPACK_IMPORTED_MODULE_0__);
|
|
355
|
-
/**
|
|
356
|
-
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
|
357
|
-
* under one or more contributor license agreements. See the NOTICE file
|
|
358
|
-
* distributed with this work for additional information regarding copyright
|
|
359
|
-
* ownership.
|
|
360
|
-
*
|
|
361
|
-
* Camunda licenses this file to you under the MIT; you may not use this file
|
|
362
|
-
* except in compliance with the MIT License.
|
|
355
|
+
/**
|
|
356
|
+
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
|
357
|
+
* under one or more contributor license agreements. See the NOTICE file
|
|
358
|
+
* distributed with this work for additional information regarding copyright
|
|
359
|
+
* ownership.
|
|
360
|
+
*
|
|
361
|
+
* Camunda licenses this file to you under the MIT; you may not use this file
|
|
362
|
+
* except in compliance with the MIT License.
|
|
363
363
|
*/
|
|
364
364
|
|
|
365
365
|
|
|
366
366
|
const INTERVAL_MS = 1000;
|
|
367
367
|
|
|
368
|
-
/**
|
|
369
|
-
* @import { TaskExecutionApi, TaskExecutionResult, TaskExecutionError, TaskExecutionStatus } from './types';
|
|
368
|
+
/**
|
|
369
|
+
* @import { TaskExecutionApi, TaskExecutionResult, TaskExecutionError, TaskExecutionStatus } from './types';
|
|
370
370
|
*/
|
|
371
371
|
|
|
372
|
-
/**
|
|
373
|
-
* Emits:
|
|
374
|
-
* - `taskExecution.status.changed` with one of {@link TaskExecutionStatus}
|
|
375
|
-
* - `taskExecution.finished` with {@link TaskExecutionResult}
|
|
376
|
-
* - `taskExecution.error` with {@link TaskExecutionError}
|
|
372
|
+
/**
|
|
373
|
+
* Emits:
|
|
374
|
+
* - `taskExecution.status.changed` with one of {@link TaskExecutionStatus}
|
|
375
|
+
* - `taskExecution.finished` with {@link TaskExecutionResult}
|
|
376
|
+
* - `taskExecution.error` with {@link TaskExecutionError}
|
|
377
377
|
*/
|
|
378
378
|
class TaskExecution extends (events__WEBPACK_IMPORTED_MODULE_0___default()) {
|
|
379
|
-
/**
|
|
380
|
-
* @param {Object} injector
|
|
381
|
-
* @param {TaskExecutionApi} api
|
|
379
|
+
/**
|
|
380
|
+
* @param {Object} injector
|
|
381
|
+
* @param {TaskExecutionApi} api
|
|
382
382
|
*/
|
|
383
383
|
constructor(injector, api) {
|
|
384
384
|
super();
|
|
@@ -391,20 +391,18 @@ class TaskExecution extends (events__WEBPACK_IMPORTED_MODULE_0___default()) {
|
|
|
391
391
|
this._status = 'idle';
|
|
392
392
|
const eventBus = injector.get('eventBus');
|
|
393
393
|
eventBus.on(['selection.changed', 'commandStack.changed'], () => {
|
|
394
|
-
if (this._status !== 'idle') {
|
|
395
|
-
this.emit('taskExecution.interrupted');
|
|
396
|
-
}
|
|
397
394
|
this.cancelTaskExecution();
|
|
395
|
+
this.emit('taskExecution.interrupted');
|
|
398
396
|
});
|
|
399
397
|
}
|
|
400
398
|
|
|
401
|
-
/**
|
|
402
|
-
* Start task execution.
|
|
403
|
-
*
|
|
404
|
-
* @param {string} elementId
|
|
405
|
-
* @param {Object} variables
|
|
406
|
-
*
|
|
407
|
-
* @returns {Promise<void>}
|
|
399
|
+
/**
|
|
400
|
+
* Start task execution.
|
|
401
|
+
*
|
|
402
|
+
* @param {string} elementId
|
|
403
|
+
* @param {Object} variables
|
|
404
|
+
*
|
|
405
|
+
* @returns {Promise<void>}
|
|
408
406
|
*/
|
|
409
407
|
async executeTask(elementId, variables) {
|
|
410
408
|
this._changeStatus('deploying');
|
|
@@ -498,8 +496,8 @@ class TaskExecution extends (events__WEBPACK_IMPORTED_MODULE_0___default()) {
|
|
|
498
496
|
this._interval = setInterval(intervalCallback, INTERVAL_MS);
|
|
499
497
|
}
|
|
500
498
|
|
|
501
|
-
/**
|
|
502
|
-
* Cancel current task execution, clean up and change status to `idle`.
|
|
499
|
+
/**
|
|
500
|
+
* Cancel current task execution, clean up and change status to `idle`.
|
|
503
501
|
*/
|
|
504
502
|
async cancelTaskExecution() {
|
|
505
503
|
// TODO: Proper clean up:
|
|
@@ -513,11 +511,11 @@ class TaskExecution extends (events__WEBPACK_IMPORTED_MODULE_0___default()) {
|
|
|
513
511
|
this._changeStatus('idle');
|
|
514
512
|
}
|
|
515
513
|
|
|
516
|
-
/**
|
|
517
|
-
* Emit `taskExecution.error` event.
|
|
518
|
-
*
|
|
519
|
-
* @param {string} message
|
|
520
|
-
* @param {any} [response]
|
|
514
|
+
/**
|
|
515
|
+
* Emit `taskExecution.error` event.
|
|
516
|
+
*
|
|
517
|
+
* @param {string} message
|
|
518
|
+
* @param {any} [response]
|
|
521
519
|
*/
|
|
522
520
|
_emitError(message, response) {
|
|
523
521
|
/** @type {import('./types').TaskExecutionError} */
|
|
@@ -538,12 +536,12 @@ class TaskExecution extends (events__WEBPACK_IMPORTED_MODULE_0___default()) {
|
|
|
538
536
|
}
|
|
539
537
|
}
|
|
540
538
|
|
|
541
|
-
/**
|
|
542
|
-
* Get the process ID from the deployment response.
|
|
543
|
-
*
|
|
544
|
-
* @param {import('./types').DeploymentResponse} [response]
|
|
545
|
-
*
|
|
546
|
-
* @returns {string|null} The process ID or null if not found.
|
|
539
|
+
/**
|
|
540
|
+
* Get the process ID from the deployment response.
|
|
541
|
+
*
|
|
542
|
+
* @param {import('./types').DeploymentResponse} [response]
|
|
543
|
+
*
|
|
544
|
+
* @returns {string|null} The process ID or null if not found.
|
|
547
545
|
*/
|
|
548
546
|
function getProcessId(response) {
|
|
549
547
|
if (!response) {
|
|
@@ -560,12 +558,12 @@ function getProcessId(response) {
|
|
|
560
558
|
return null;
|
|
561
559
|
}
|
|
562
560
|
|
|
563
|
-
/**
|
|
564
|
-
* Get the process instance key from the response.
|
|
565
|
-
*
|
|
566
|
-
* @param {import('./types').StartInstanceResponse} [response]
|
|
567
|
-
*
|
|
568
|
-
* @returns {string|null} The process instance key or null if not found.
|
|
561
|
+
/**
|
|
562
|
+
* Get the process instance key from the response.
|
|
563
|
+
*
|
|
564
|
+
* @param {import('./types').StartInstanceResponse} [response]
|
|
565
|
+
*
|
|
566
|
+
* @returns {string|null} The process instance key or null if not found.
|
|
569
567
|
*/
|
|
570
568
|
function getProcessInstanceKey(response) {
|
|
571
569
|
if (!response) {
|
|
@@ -769,21 +767,21 @@ function InputEditor({
|
|
|
769
767
|
value
|
|
770
768
|
}));
|
|
771
769
|
|
|
772
|
-
/**
|
|
773
|
-
* @type {import('@codemirror/autocomplete').Completion[]}
|
|
770
|
+
/**
|
|
771
|
+
* @type {import('@codemirror/autocomplete').Completion[]}
|
|
774
772
|
*/
|
|
775
773
|
const result = [...variablesForElementAutocompletions, ...outputVariablesAutocompletions];
|
|
776
774
|
return result;
|
|
777
775
|
}, [allOutputs, variablesForElement]);
|
|
778
776
|
const ref = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
|
|
779
777
|
|
|
780
|
-
/**
|
|
781
|
-
* @type {ReturnType<typeof useState<EditorView>>}
|
|
778
|
+
/**
|
|
779
|
+
* @type {ReturnType<typeof useState<EditorView>>}
|
|
782
780
|
*/
|
|
783
781
|
const [editorView, setEditorView] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)();
|
|
784
782
|
|
|
785
|
-
/**
|
|
786
|
-
* @type {ReturnType<typeof useState<string?>>}
|
|
783
|
+
/**
|
|
784
|
+
* @type {ReturnType<typeof useState<string?>>}
|
|
787
785
|
*/
|
|
788
786
|
const [error, setError] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)();
|
|
789
787
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
|
@@ -891,19 +889,19 @@ function getAllOutputVariables(allOutputs) {
|
|
|
891
889
|
return allOutputVariables;
|
|
892
890
|
}
|
|
893
891
|
|
|
894
|
-
/**
|
|
895
|
-
* Get a string representation of the type of a value.
|
|
896
|
-
*
|
|
897
|
-
* @example
|
|
898
|
-
*
|
|
899
|
-
* getDetail('foo') // String
|
|
900
|
-
* getDetail(1337) // Number
|
|
901
|
-
* getDetail(true) // Boolean
|
|
902
|
-
* getDetail({}) // Object
|
|
903
|
-
*
|
|
904
|
-
* @param {any} value
|
|
905
|
-
*
|
|
906
|
-
* @return {string}
|
|
892
|
+
/**
|
|
893
|
+
* Get a string representation of the type of a value.
|
|
894
|
+
*
|
|
895
|
+
* @example
|
|
896
|
+
*
|
|
897
|
+
* getDetail('foo') // String
|
|
898
|
+
* getDetail(1337) // Number
|
|
899
|
+
* getDetail(true) // Boolean
|
|
900
|
+
* getDetail({}) // Object
|
|
901
|
+
*
|
|
902
|
+
* @param {any} value
|
|
903
|
+
*
|
|
904
|
+
* @return {string}
|
|
907
905
|
*/
|
|
908
906
|
function getDetail(value) {
|
|
909
907
|
const type = typeof value;
|
|
@@ -948,17 +946,17 @@ const TASK_EXECUTION_STATUS_LABEL = {
|
|
|
948
946
|
executing: 'Waiting for task to be completed...'
|
|
949
947
|
};
|
|
950
948
|
|
|
951
|
-
/**
|
|
952
|
-
* @param {Object} props
|
|
953
|
-
* @param {boolean} props.isConnectionConfigured
|
|
954
|
-
* @param {string} [props.configureConnectionBannerTitle]
|
|
955
|
-
* @param {string} [props.configureConnectionBannerDescription]
|
|
956
|
-
* @param {string} [props.configureConnectionLabel]
|
|
957
|
-
* @param {Function} [props.onConfigureConnection]
|
|
958
|
-
* @param {boolean} props.isTaskExecuting
|
|
959
|
-
* @param {import('../../types').ElementOutput} props.output
|
|
960
|
-
* @param {Function} props.onResetOutput
|
|
961
|
-
* @param {import('../../types').TaskExecutionStatus} props.taskExecutionStatus
|
|
949
|
+
/**
|
|
950
|
+
* @param {Object} props
|
|
951
|
+
* @param {boolean} props.isConnectionConfigured
|
|
952
|
+
* @param {string} [props.configureConnectionBannerTitle]
|
|
953
|
+
* @param {string} [props.configureConnectionBannerDescription]
|
|
954
|
+
* @param {string} [props.configureConnectionLabel]
|
|
955
|
+
* @param {Function} [props.onConfigureConnection]
|
|
956
|
+
* @param {boolean} props.isTaskExecuting
|
|
957
|
+
* @param {import('../../types').ElementOutput} props.output
|
|
958
|
+
* @param {Function} props.onResetOutput
|
|
959
|
+
* @param {import('../../types').TaskExecutionStatus} props.taskExecutionStatus
|
|
962
960
|
*/
|
|
963
961
|
function Output({
|
|
964
962
|
isConnectionConfigured,
|
|
@@ -1136,14 +1134,14 @@ function OutputVariables({
|
|
|
1136
1134
|
});
|
|
1137
1135
|
}
|
|
1138
1136
|
|
|
1139
|
-
/**
|
|
1140
|
-
*
|
|
1141
|
-
* @param {Object} props
|
|
1142
|
-
* @param {string} props.title
|
|
1143
|
-
* @param {string} props.description
|
|
1144
|
-
* @param {string} [props.actionLabel]
|
|
1145
|
-
* @param {string} [props.actionUrl]
|
|
1146
|
-
* @param {Function} [props.onActionClick]
|
|
1137
|
+
/**
|
|
1138
|
+
*
|
|
1139
|
+
* @param {Object} props
|
|
1140
|
+
* @param {string} props.title
|
|
1141
|
+
* @param {string} props.description
|
|
1142
|
+
* @param {string} [props.actionLabel]
|
|
1143
|
+
* @param {string} [props.actionUrl]
|
|
1144
|
+
* @param {Function} [props.onActionClick]
|
|
1147
1145
|
*/
|
|
1148
1146
|
function ErrorBanner({
|
|
1149
1147
|
title,
|
|
@@ -1154,33 +1152,35 @@ function ErrorBanner({
|
|
|
1154
1152
|
}) {
|
|
1155
1153
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("div", {
|
|
1156
1154
|
className: "output__error",
|
|
1157
|
-
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.
|
|
1158
|
-
className: "output__error--
|
|
1159
|
-
children:
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1155
|
+
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("div", {
|
|
1156
|
+
className: "output__error--icon",
|
|
1157
|
+
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_carbon_icons_react__WEBPACK_IMPORTED_MODULE_2__.ErrorFilled, {})
|
|
1158
|
+
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("div", {
|
|
1159
|
+
className: "output__error--content",
|
|
1160
|
+
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("div", {
|
|
1161
|
+
className: "output__error--title",
|
|
1162
|
+
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("span", {
|
|
1163
|
+
children: title
|
|
1164
|
+
}), actionLabel && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_carbon_react__WEBPACK_IMPORTED_MODULE_1__.Link, {
|
|
1164
1165
|
href: actionUrl,
|
|
1165
1166
|
onClick: () => onActionClick(),
|
|
1166
1167
|
children: actionLabel
|
|
1168
|
+
})]
|
|
1169
|
+
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("div", {
|
|
1170
|
+
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("span", {
|
|
1171
|
+
children: description
|
|
1167
1172
|
})
|
|
1168
1173
|
})]
|
|
1169
|
-
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("div", {
|
|
1170
|
-
className: "output__error--content",
|
|
1171
|
-
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("span", {
|
|
1172
|
-
children: description
|
|
1173
|
-
})
|
|
1174
1174
|
})]
|
|
1175
1175
|
});
|
|
1176
1176
|
}
|
|
1177
1177
|
|
|
1178
|
-
/**
|
|
1179
|
-
* Print the details of an incident.
|
|
1180
|
-
*
|
|
1181
|
-
* @param {Object} incident
|
|
1182
|
-
*
|
|
1183
|
-
* @returns {string}
|
|
1178
|
+
/**
|
|
1179
|
+
* Print the details of an incident.
|
|
1180
|
+
*
|
|
1181
|
+
* @param {Object} incident
|
|
1182
|
+
*
|
|
1183
|
+
* @returns {string}
|
|
1184
1184
|
*/
|
|
1185
1185
|
function printIncident(incident) {
|
|
1186
1186
|
let text = '';
|
|
@@ -1190,16 +1190,16 @@ function printIncident(incident) {
|
|
|
1190
1190
|
return text;
|
|
1191
1191
|
}
|
|
1192
1192
|
|
|
1193
|
-
/**
|
|
1194
|
-
* Capitalize a string, adding spaces before capital letters.
|
|
1195
|
-
*
|
|
1196
|
-
* @example
|
|
1197
|
-
*
|
|
1198
|
-
* capitalize('fooBar'); // Foo Bar
|
|
1199
|
-
*
|
|
1200
|
-
* @param {string} string
|
|
1201
|
-
*
|
|
1202
|
-
* @returns {string}
|
|
1193
|
+
/**
|
|
1194
|
+
* Capitalize a string, adding spaces before capital letters.
|
|
1195
|
+
*
|
|
1196
|
+
* @example
|
|
1197
|
+
*
|
|
1198
|
+
* capitalize('fooBar'); // Foo Bar
|
|
1199
|
+
*
|
|
1200
|
+
* @param {string} string
|
|
1201
|
+
*
|
|
1202
|
+
* @returns {string}
|
|
1203
1203
|
*/
|
|
1204
1204
|
function capitalize(string) {
|
|
1205
1205
|
return string.replace(/([A-Z])/g, ' $1').replace(/^./, match => match.toUpperCase());
|
|
@@ -1238,8 +1238,8 @@ function OutputEditor({
|
|
|
1238
1238
|
}) {
|
|
1239
1239
|
const ref = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
|
|
1240
1240
|
|
|
1241
|
-
/**
|
|
1242
|
-
* @type {ReturnType<typeof useState<EditorView>>}
|
|
1241
|
+
/**
|
|
1242
|
+
* @type {ReturnType<typeof useState<EditorView>>}
|
|
1243
1243
|
*/
|
|
1244
1244
|
const [editorView, setEditorView] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)();
|
|
1245
1245
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
|
@@ -1336,21 +1336,20 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1336
1336
|
|
|
1337
1337
|
const NO_ELEMENT_TEXT = 'Select a task to start testing';
|
|
1338
1338
|
|
|
1339
|
-
/**
|
|
1340
|
-
* @param {Object} props
|
|
1341
|
-
* @param {Object} props.injector
|
|
1342
|
-
* @param {import('../../types').TaskExecutionApi} props.api
|
|
1343
|
-
* @param {boolean} props.isConnectionConfigured
|
|
1344
|
-
* @param {string} [props.configureConnectionBannerTitle]
|
|
1345
|
-
* @param {string} [props.configureConnectionBannerDescription]
|
|
1346
|
-
* @param {string} [props.configureConnectionLabel]
|
|
1347
|
-
* @param {Function} [props.onConfigureConnection]
|
|
1348
|
-
* @param {import('../../types').Config|undefined} [props.config]
|
|
1349
|
-
* @param {Function} [props.onConfigChanged=() => {}]
|
|
1350
|
-
* @param {string} [props.operateBaseUrl]
|
|
1351
|
-
* @param {Function} [props.
|
|
1352
|
-
* @param {Function} [props.
|
|
1353
|
-
* @param {Function} [props.onTaskExecutionInterrupted=() => {}]
|
|
1339
|
+
/**
|
|
1340
|
+
* @param {Object} props
|
|
1341
|
+
* @param {Object} props.injector
|
|
1342
|
+
* @param {import('../../types').TaskExecutionApi} props.api
|
|
1343
|
+
* @param {boolean} props.isConnectionConfigured
|
|
1344
|
+
* @param {string} [props.configureConnectionBannerTitle]
|
|
1345
|
+
* @param {string} [props.configureConnectionBannerDescription]
|
|
1346
|
+
* @param {string} [props.configureConnectionLabel]
|
|
1347
|
+
* @param {Function} [props.onConfigureConnection]
|
|
1348
|
+
* @param {import('../../types').Config|undefined} [props.config]
|
|
1349
|
+
* @param {Function} [props.onConfigChanged=() => {}]
|
|
1350
|
+
* @param {string} [props.operateBaseUrl]
|
|
1351
|
+
* @param {Function} [props.onTaskExecution=() => {}]
|
|
1352
|
+
* @param {Function} [props.onTaskExecutionInterrupted=() => {}]
|
|
1354
1353
|
*/
|
|
1355
1354
|
function TaskTesting({
|
|
1356
1355
|
injector,
|
|
@@ -1363,41 +1362,40 @@ function TaskTesting({
|
|
|
1363
1362
|
config,
|
|
1364
1363
|
onConfigChanged = () => {},
|
|
1365
1364
|
operateBaseUrl,
|
|
1366
|
-
|
|
1367
|
-
onTaskExecutionFinished = () => {},
|
|
1365
|
+
onTaskExecution = () => {},
|
|
1368
1366
|
onTaskExecutionInterrupted = () => {}
|
|
1369
1367
|
}) {
|
|
1370
|
-
/**
|
|
1371
|
-
* @type {React.RefObject<ElementVariables?>}
|
|
1368
|
+
/**
|
|
1369
|
+
* @type {React.RefObject<ElementVariables?>}
|
|
1372
1370
|
*/
|
|
1373
1371
|
const elementVariablesRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
|
|
1374
1372
|
|
|
1375
|
-
/**
|
|
1376
|
-
* @type {React.RefObject<ElementConfig?>}
|
|
1373
|
+
/**
|
|
1374
|
+
* @type {React.RefObject<ElementConfig?>}
|
|
1377
1375
|
*/
|
|
1378
1376
|
const elementConfigRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
|
|
1379
1377
|
const [variablesForElement, setVariablesForElement] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([]);
|
|
1380
1378
|
|
|
1381
|
-
/**
|
|
1382
|
-
* @type {ReturnType<typeof useState<import('../../types').TaskExecutionStatus>>}
|
|
1379
|
+
/**
|
|
1380
|
+
* @type {ReturnType<typeof useState<import('../../types').TaskExecutionStatus>>}
|
|
1383
1381
|
*/
|
|
1384
1382
|
const [taskExecutionStatus, setTaskExecutionStatus] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)();
|
|
1385
1383
|
|
|
1386
|
-
/**
|
|
1387
|
-
* @type {ReturnType<typeof useState<string>>}
|
|
1384
|
+
/**
|
|
1385
|
+
* @type {ReturnType<typeof useState<string>>}
|
|
1388
1386
|
*/
|
|
1389
1387
|
const [input, setInput] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)();
|
|
1390
1388
|
|
|
1391
|
-
/**
|
|
1392
|
-
* @type {ReturnType<typeof useState<import('../../types').ElementOutput>>}
|
|
1389
|
+
/**
|
|
1390
|
+
* @type {ReturnType<typeof useState<import('../../types').ElementOutput>>}
|
|
1393
1391
|
*/
|
|
1394
1392
|
const [output, setOutput] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)();
|
|
1395
1393
|
const [allOutputs, setAllOutputs] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)({});
|
|
1396
1394
|
const [inputError, setInputError] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null);
|
|
1397
1395
|
const element = (0,_hooks_useSelectedElement__WEBPACK_IMPORTED_MODULE_4__.useSelectedElement)(injector);
|
|
1398
1396
|
|
|
1399
|
-
/**
|
|
1400
|
-
* @type {React.RefObject<TaskExecution?>}
|
|
1397
|
+
/**
|
|
1398
|
+
* @type {React.RefObject<TaskExecution?>}
|
|
1401
1399
|
*/
|
|
1402
1400
|
const taskExecutionRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
|
|
1403
1401
|
|
|
@@ -1476,9 +1474,9 @@ function TaskTesting({
|
|
|
1476
1474
|
});
|
|
1477
1475
|
};
|
|
1478
1476
|
|
|
1479
|
-
/**
|
|
1480
|
-
* @param {import('../../types').TaskExecutionStatus} status
|
|
1481
|
-
* @param {string} [processInstanceKey]
|
|
1477
|
+
/**
|
|
1478
|
+
* @param {import('../../types').TaskExecutionStatus} status
|
|
1479
|
+
* @param {string} [processInstanceKey]
|
|
1482
1480
|
*/
|
|
1483
1481
|
const handleStatusChange = (status, processInstanceKey) => {
|
|
1484
1482
|
setTaskExecutionStatus(status);
|
|
@@ -1501,7 +1499,6 @@ function TaskTesting({
|
|
|
1501
1499
|
...output,
|
|
1502
1500
|
operateUrl
|
|
1503
1501
|
});
|
|
1504
|
-
onTaskExecutionFinished(element, output);
|
|
1505
1502
|
};
|
|
1506
1503
|
taskExecutionRef === null || taskExecutionRef === void 0 || (_taskExecutionRef$cur = taskExecutionRef.current) === null || _taskExecutionRef$cur === void 0 || _taskExecutionRef$cur.on('taskExecution.finished', handleFinished);
|
|
1507
1504
|
taskExecutionRef === null || taskExecutionRef === void 0 || (_taskExecutionRef$cur2 = taskExecutionRef.current) === null || _taskExecutionRef$cur2 === void 0 || _taskExecutionRef$cur2.on('taskExecution.status.changed', handleStatusChange);
|
|
@@ -1549,14 +1546,11 @@ function TaskTesting({
|
|
|
1549
1546
|
const inputConfig = await elementConfigRef.current.getInputConfigForElement(element);
|
|
1550
1547
|
elementConfigRef.current.setOutputConfigForElement(element, null);
|
|
1551
1548
|
taskExecutionRef.current.executeTask(element.id, JSON.parse(inputConfig));
|
|
1552
|
-
|
|
1549
|
+
onTaskExecution();
|
|
1553
1550
|
};
|
|
1554
1551
|
const handleCancelTaskExecution = () => {
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
if (output !== null && output !== void 0 && output.operateUrl && Object.keys(output).length === 1) {
|
|
1558
|
-
var _elementConfigRef$cur7;
|
|
1559
|
-
elementConfigRef === null || elementConfigRef === void 0 || (_elementConfigRef$cur7 = elementConfigRef.current) === null || _elementConfigRef$cur7 === void 0 || _elementConfigRef$cur7.setOutputConfigForElement(element, null);
|
|
1552
|
+
if (taskExecutionRef.current) {
|
|
1553
|
+
taskExecutionRef.current.cancelTaskExecution();
|
|
1560
1554
|
}
|
|
1561
1555
|
};
|
|
1562
1556
|
const handleResetOutput = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(() => {
|
|
@@ -1596,11 +1590,8 @@ function TaskTesting({
|
|
|
1596
1590
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsxs)("div", {
|
|
1597
1591
|
className: "task-testing__container--header",
|
|
1598
1592
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsxs)("div", {
|
|
1599
|
-
className: "task-
|
|
1600
|
-
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx)("span", {
|
|
1601
|
-
className: "task-type",
|
|
1602
|
-
children: (0,_utils_element__WEBPACK_IMPORTED_MODULE_10__.getType)(element)
|
|
1603
|
-
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx)("span", {
|
|
1593
|
+
className: "task-name",
|
|
1594
|
+
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx)(_carbon_icons_react__WEBPACK_IMPORTED_MODULE_2__.Chemistry, {}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx)("span", {
|
|
1604
1595
|
children: (0,_utils_element__WEBPACK_IMPORTED_MODULE_10__.getName)(element)
|
|
1605
1596
|
})]
|
|
1606
1597
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx)(_carbon_react__WEBPACK_IMPORTED_MODULE_1__.Tooltip, {
|
|
@@ -1777,11 +1768,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1777
1768
|
|
|
1778
1769
|
const SUPPORTED_ELEMENT_TYPES = ['bpmn:Task'];
|
|
1779
1770
|
|
|
1780
|
-
/**
|
|
1781
|
-
* Get currently selected BPMN element, if it is a single `bpmn:Task`.
|
|
1782
|
-
*
|
|
1783
|
-
* @param {Object} injector
|
|
1784
|
-
* @return {Object|null} Selected BPMN element or null
|
|
1771
|
+
/**
|
|
1772
|
+
* Get currently selected BPMN element, if it is a single `bpmn:Task`.
|
|
1773
|
+
*
|
|
1774
|
+
* @param {Object} injector
|
|
1775
|
+
* @return {Object|null} Selected BPMN element or null
|
|
1785
1776
|
*/
|
|
1786
1777
|
function useSelectedElement(injector) {
|
|
1787
1778
|
const [selectedElement, setSelectedElement] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null);
|
|
@@ -1879,21 +1870,21 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1879
1870
|
|
|
1880
1871
|
|
|
1881
1872
|
|
|
1882
|
-
/**
|
|
1883
|
-
* @typedef {import('@codemirror/autocomplete').Completion} Completion
|
|
1884
|
-
* @typedef {import('@codemirror/autocomplete').CompletionContext} CompletionContext
|
|
1885
|
-
* @typedef {import('@codemirror/autocomplete').CompletionResult} CompletionResult
|
|
1873
|
+
/**
|
|
1874
|
+
* @typedef {import('@codemirror/autocomplete').Completion} Completion
|
|
1875
|
+
* @typedef {import('@codemirror/autocomplete').CompletionContext} CompletionContext
|
|
1876
|
+
* @typedef {import('@codemirror/autocomplete').CompletionResult} CompletionResult
|
|
1886
1877
|
*/
|
|
1887
1878
|
|
|
1888
|
-
/**
|
|
1889
|
-
* @param {Completion[]} variables
|
|
1879
|
+
/**
|
|
1880
|
+
* @param {Completion[]} variables
|
|
1890
1881
|
*/
|
|
1891
1882
|
function getAutocompletionExtensions(variables) {
|
|
1892
1883
|
return [autoCompletionExtension(variables), startCompletionExtension()];
|
|
1893
1884
|
}
|
|
1894
1885
|
|
|
1895
|
-
/**
|
|
1896
|
-
* @param {Completion[]} variables
|
|
1886
|
+
/**
|
|
1887
|
+
* @param {Completion[]} variables
|
|
1897
1888
|
*/
|
|
1898
1889
|
function autoCompletionExtension(variables) {
|
|
1899
1890
|
return (0,_codemirror_autocomplete__WEBPACK_IMPORTED_MODULE_0__.autocompletion)({
|
|
@@ -1901,8 +1892,8 @@ function autoCompletionExtension(variables) {
|
|
|
1901
1892
|
});
|
|
1902
1893
|
}
|
|
1903
1894
|
|
|
1904
|
-
/**
|
|
1905
|
-
* Trigger autocompletion when the user goes into a new line.
|
|
1895
|
+
/**
|
|
1896
|
+
* Trigger autocompletion when the user goes into a new line.
|
|
1906
1897
|
*/
|
|
1907
1898
|
function startCompletionExtension() {
|
|
1908
1899
|
return _codemirror_view__WEBPACK_IMPORTED_MODULE_1__.EditorView.updateListener.of(update => {
|
|
@@ -1926,11 +1917,11 @@ function startCompletionExtension() {
|
|
|
1926
1917
|
});
|
|
1927
1918
|
}
|
|
1928
1919
|
|
|
1929
|
-
/**
|
|
1930
|
-
* @param {CompletionContext} context
|
|
1931
|
-
* @param {Array} variables
|
|
1932
|
-
*
|
|
1933
|
-
* @returns {CompletionResult | null}
|
|
1920
|
+
/**
|
|
1921
|
+
* @param {CompletionContext} context
|
|
1922
|
+
* @param {Array} variables
|
|
1923
|
+
*
|
|
1924
|
+
* @returns {CompletionResult | null}
|
|
1934
1925
|
*/
|
|
1935
1926
|
function autocomplete(context, variables) {
|
|
1936
1927
|
const {
|
|
@@ -2021,13 +2012,13 @@ function autocomplete(context, variables) {
|
|
|
2021
2012
|
};
|
|
2022
2013
|
}
|
|
2023
2014
|
|
|
2024
|
-
/**
|
|
2025
|
-
* Check if there is a property after the current position by looking for a `"` character.
|
|
2026
|
-
*
|
|
2027
|
-
* @param {*} state
|
|
2028
|
-
* @param {number} pos
|
|
2029
|
-
*
|
|
2030
|
-
* @returns {boolean}
|
|
2015
|
+
/**
|
|
2016
|
+
* Check if there is a property after the current position by looking for a `"` character.
|
|
2017
|
+
*
|
|
2018
|
+
* @param {*} state
|
|
2019
|
+
* @param {number} pos
|
|
2020
|
+
*
|
|
2021
|
+
* @returns {boolean}
|
|
2031
2022
|
*/
|
|
2032
2023
|
function hasPropertyAfter(state, pos) {
|
|
2033
2024
|
const textAfter = state.sliceDoc(pos).trimStart();
|
|
@@ -2044,18 +2035,17 @@ function hasPropertyAfter(state, pos) {
|
|
|
2044
2035
|
|
|
2045
2036
|
__webpack_require__.r(__webpack_exports__);
|
|
2046
2037
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2047
|
-
/* harmony export */ getName: () => (/* binding */ getName)
|
|
2048
|
-
/* harmony export */ getType: () => (/* binding */ getType)
|
|
2038
|
+
/* harmony export */ getName: () => (/* binding */ getName)
|
|
2049
2039
|
/* harmony export */ });
|
|
2050
2040
|
/* harmony import */ var bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! bpmn-js/lib/util/ModelUtil */ "./node_modules/bpmn-js/lib/util/ModelUtil.js");
|
|
2051
2041
|
|
|
2052
2042
|
|
|
2053
|
-
/**
|
|
2054
|
-
* Get the name of a BPMN element.
|
|
2055
|
-
*
|
|
2056
|
-
* @param {import('../types').Element} element
|
|
2057
|
-
*
|
|
2058
|
-
* @returns {string}
|
|
2043
|
+
/**
|
|
2044
|
+
* Get the name of a BPMN element.
|
|
2045
|
+
*
|
|
2046
|
+
* @param {import('../types').Element} element
|
|
2047
|
+
*
|
|
2048
|
+
* @returns {string}
|
|
2059
2049
|
*/
|
|
2060
2050
|
function getName(element) {
|
|
2061
2051
|
const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.getBusinessObject)(element);
|
|
@@ -2066,40 +2056,6 @@ function getName(element) {
|
|
|
2066
2056
|
return name;
|
|
2067
2057
|
}
|
|
2068
2058
|
|
|
2069
|
-
/**
|
|
2070
|
-
* Get the name of a BPMN element.
|
|
2071
|
-
*
|
|
2072
|
-
* @param {import('../types').Element} element
|
|
2073
|
-
*
|
|
2074
|
-
* @returns {string}
|
|
2075
|
-
*/
|
|
2076
|
-
function getType(element) {
|
|
2077
|
-
const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.getBusinessObject)(element);
|
|
2078
|
-
const {
|
|
2079
|
-
$type: type
|
|
2080
|
-
} = businessObject;
|
|
2081
|
-
switch (type) {
|
|
2082
|
-
case 'bpmn:Task':
|
|
2083
|
-
return 'Task';
|
|
2084
|
-
case 'bpmn:UserTask':
|
|
2085
|
-
return 'User Task';
|
|
2086
|
-
case 'bpmn:ScriptTask':
|
|
2087
|
-
return 'Script Task';
|
|
2088
|
-
case 'bpmn:ServiceTask':
|
|
2089
|
-
return 'Service Task';
|
|
2090
|
-
case 'bpmn:BusinessRuleTask':
|
|
2091
|
-
return 'Business Rule Task';
|
|
2092
|
-
case 'bpmn:SendTask':
|
|
2093
|
-
return 'Send Task';
|
|
2094
|
-
case 'bpmn:ManualTask':
|
|
2095
|
-
return 'Manual Task';
|
|
2096
|
-
case 'bpmn:ReceiveTask':
|
|
2097
|
-
return 'Receive Task';
|
|
2098
|
-
default:
|
|
2099
|
-
return 'Task';
|
|
2100
|
-
}
|
|
2101
|
-
}
|
|
2102
|
-
|
|
2103
2059
|
/***/ }),
|
|
2104
2060
|
|
|
2105
2061
|
/***/ "./node_modules/@bpmn-io/extract-process-variables/zeebe/index.mjs":
|
|
@@ -32617,12 +32573,10 @@ ___CSS_LOADER_EXPORT___.push([module.id, `.task-testing__container {
|
|
|
32617
32573
|
gap: 12px;
|
|
32618
32574
|
width: 100%;
|
|
32619
32575
|
}
|
|
32620
|
-
.task-testing__container .task-testing__container--header .task-
|
|
32576
|
+
.task-testing__container .task-testing__container--header .task-name {
|
|
32621
32577
|
display: flex;
|
|
32622
|
-
gap: 6px;
|
|
32623
|
-
}
|
|
32624
|
-
.task-testing__container .task-testing__container--header .task-header .task-type {
|
|
32625
32578
|
font-weight: bold;
|
|
32579
|
+
gap: 6px;
|
|
32626
32580
|
}
|
|
32627
32581
|
.task-testing__container .task-testing__container--header .btn-execute {
|
|
32628
32582
|
width: 138px;
|
|
@@ -32706,7 +32660,7 @@ ___CSS_LOADER_EXPORT___.push([module.id, `.task-testing__container {
|
|
|
32706
32660
|
}
|
|
32707
32661
|
.task-testing__container .output .output__error {
|
|
32708
32662
|
display: flex;
|
|
32709
|
-
flex-direction:
|
|
32663
|
+
flex-direction: row;
|
|
32710
32664
|
gap: 12px;
|
|
32711
32665
|
padding: 12px;
|
|
32712
32666
|
margin-bottom: 12px;
|
|
@@ -32714,17 +32668,23 @@ ___CSS_LOADER_EXPORT___.push([module.id, `.task-testing__container {
|
|
|
32714
32668
|
border-left-width: 3px;
|
|
32715
32669
|
background-color: #fff1f1;
|
|
32716
32670
|
}
|
|
32717
|
-
.task-testing__container .output .output__error .output__error--
|
|
32671
|
+
.task-testing__container .output .output__error .output__error--content {
|
|
32718
32672
|
display: flex;
|
|
32719
|
-
flex-direction:
|
|
32720
|
-
|
|
32673
|
+
flex-direction: column;
|
|
32674
|
+
gap: 6px;
|
|
32675
|
+
flex-grow: 1;
|
|
32676
|
+
margin-top: 1px;
|
|
32677
|
+
}
|
|
32678
|
+
.task-testing__container .output .output__error .output__error--content .output__error--title {
|
|
32679
|
+
display: flex;
|
|
32680
|
+
justify-content: space-between;
|
|
32721
32681
|
font-weight: bold;
|
|
32722
32682
|
}
|
|
32723
|
-
.task-testing__container .output .output__error .output__error--title
|
|
32724
|
-
|
|
32683
|
+
.task-testing__container .output .output__error .output__error--content .output__error--title .cds--link {
|
|
32684
|
+
cursor: pointer;
|
|
32725
32685
|
}
|
|
32726
|
-
.task-testing__container .output .output__error .output__error--
|
|
32727
|
-
|
|
32686
|
+
.task-testing__container .output .output__error .output__error--icon svg {
|
|
32687
|
+
fill: #da1e28;
|
|
32728
32688
|
}
|
|
32729
32689
|
.task-testing__container .output .output__variables--empty {
|
|
32730
32690
|
height: 32px;
|
|
@@ -32809,7 +32769,7 @@ ___CSS_LOADER_EXPORT___.push([module.id, `.task-testing__container {
|
|
|
32809
32769
|
}
|
|
32810
32770
|
.code__editor .code__editor-copy-button svg {
|
|
32811
32771
|
fill: #525252;
|
|
32812
|
-
}`, "",{"version":3,"sources":["webpack://./lib/style/style.scss"],"names":[],"mappings":"AAAA;EACE,aAAA;EACA,mBAAA;EACA,YAAA;EACA,WAAA;EACA,aAAA;EACA,eAAA;AACF;AAEI;;EAEE,aAAA;EACA,mBAAA;EACA,QAAA;EACA,YAAA;AAAN;AAEM;;EACE,oBAAA;EACA,uBAAA;AACR;AAIE;EACE,UAAA;EACA,aAAA;EACA,sBAAA;EACA,+BAAA;EACA,kBAAA;AAFJ;AAKE;EACE,UAAA;EACA,aAAA;EACA,sBAAA;EACA,iBAAA;AAHJ;AAME;EACE,aAAA;EACA,mBAAA;EACA,mBAAA;EACA,8BAAA;EACA,SAAA;EACA,WAAA;AAJJ;AAMI;EACE,aAAA;EACA,QAAA;AAJN;
|
|
32772
|
+
}`, "",{"version":3,"sources":["webpack://./lib/style/style.scss"],"names":[],"mappings":"AAAA;EACE,aAAA;EACA,mBAAA;EACA,YAAA;EACA,WAAA;EACA,aAAA;EACA,eAAA;AACF;AAEI;;EAEE,aAAA;EACA,mBAAA;EACA,QAAA;EACA,YAAA;AAAN;AAEM;;EACE,oBAAA;EACA,uBAAA;AACR;AAIE;EACE,UAAA;EACA,aAAA;EACA,sBAAA;EACA,+BAAA;EACA,kBAAA;AAFJ;AAKE;EACE,UAAA;EACA,aAAA;EACA,sBAAA;EACA,iBAAA;AAHJ;AAME;EACE,aAAA;EACA,mBAAA;EACA,mBAAA;EACA,8BAAA;EACA,SAAA;EACA,WAAA;AAJJ;AAMI;EACE,aAAA;EACA,iBAAA;EACA,QAAA;AAJN;AAOI;EACE,YAAA;AALN;AAQI;EACE,aAAA;AANN;AASI;EACE,aAAA;AAPN;AAUI;EACE,oBAAA;EACA,uBAAA;AARN;AAYE;EACE,YAAA;EACA,aAAA;EACA,sBAAA;EACA,QAAA;AAVJ;AAYI;EACE,aAAA;EACA,mBAAA;EACA,QAAA;AAVN;AAaI;EACE,cAAA;AAXN;AAeE;EACE,YAAA;EACA,aAAA;EACA,sBAAA;EACA,QAAA;AAbJ;AAeI;EACE,aAAA;EACA,mBAAA;EACA,YAAA;EACA,WAAA;AAbN;AAgBI;EACE,cAAA;EACA,aAAA;EACA,mBAAA;EACA,QAAA;AAdN;AAgBM;EACE,aAAA;AAdR;AAiBM;EACE,aAAA;AAfR;AAkBM;EACE,aAAA;AAhBR;AAmBM;EACE,iBAAA;EACA,uBAAA;AAjBR;AAqBI;EACE,iBAAA;AAnBN;AAsBI;EACE,aAAA;EACA,sBAAA;EACA,YAAA;EACA,kBAAA;AApBN;AAsBM;EACE,oCAAA;AApBR;AAuBM;EACE,UAAA;EACA,yBAAA;AArBR;AAwBM;EACE,aAAA;AAtBR;AA0BM;EACE,aAAA;AAxBR;AA4BI;EACE,aAAA;EACA,mBAAA;EACA,SAAA;EACA,aAAA;EACA,mBAAA;EACA,yBAAA;EACA,sBAAA;EACA,yBAAA;AA1BN;AA4BM;EACE,aAAA;EACA,sBAAA;EACA,QAAA;EACA,YAAA;EACA,eAAA;AA1BR;AA4BQ;EACE,aAAA;EACA,8BAAA;EACA,iBAAA;AA1BV;AA4BU;EACE,eAAA;AA1BZ;AA+BM;EACE,aAAA;AA7BR;AAiCI;EACE,YAAA;EACA,aAAA;EACA,mBAAA;EACA,cAAA;AA/BN;AAkCI;EACE,iBAAA;AAhCN;AAmCI;EACE,WAAA;AAjCN;AAoCI;EACE,qBAAA;EACA,YAAA;AAlCN;AAqCI;EACE,eAAA;AAnCN;;AAwCA;EACE,kBAAA;EACA,YAAA;EACA,aAAA;EACA,sBAAA;AArCF;AAuCE;EACE,0BAAA;EACA,oBAAA;AArCJ;AAwCE;EACE,kBAAA;EACA,YAAA;AAtCJ;AAwCI;EACE,kBAAA;EACA,MAAA;EACA,OAAA;EACA,QAAA;EACA,SAAA;AAtCN;AAwCM;EACE,YAAA;EACA,2CAAA;AAtCR;AAyCM;EACE,2BAAA;AAvCR;AA0CM;EACE,aAAA;AAxCR;AA2CM;EACE,aAAA;AAzCR;AA4CM;EACE,eAAA;AA1CR;AA6CM;EACE,YAAA;EACA,sBAAA;EACA,eAAA;EACA,gBAAA;EACA,qBAAA;AA3CR;AA6CQ;EACE,kBAAA;AA3CV;AA8CQ;EACE,eAAA;AA5CV;AAkDE;EACE,cAAA;EACA,eAAA;EACA,eAAA;AAhDJ;AAmDE;EACE,kBAAA;EACA,SAAA;EACA,WAAA;EACA,WAAA;AAjDJ;AAmDI;EACE,aAAA;AAjDN","sourcesContent":[".task-testing__container {\r\n display: flex;\r\n flex-direction: row;\r\n height: 100%;\r\n width: 100%;\r\n padding: 10px;\r\n font-size: 14px;\r\n\r\n &.task-testing__container--empty {\r\n .task-testing__container-no-config,\r\n .task-testing__container-no-element {\r\n display: flex;\r\n align-items: center;\r\n gap: 5px;\r\n height: 32px;\r\n\r\n .cds--inline-loading {\r\n inline-size: initial;\r\n min-block-size: initial;\r\n }\r\n }\r\n }\r\n\r\n .task-testing__container--left {\r\n width: 50%;\r\n display: flex;\r\n flex-direction: column;\r\n border-right: 1px solid #E0E0E0;\r\n padding-right: 6px;\r\n }\r\n\r\n .task-testing__container--right {\r\n width: 50%;\r\n display: flex;\r\n flex-direction: column;\r\n padding-left: 6px;\r\n }\r\n\r\n .task-testing__container--header {\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n justify-content: space-between;\r\n gap: 12px;\r\n width: 100%;\r\n\r\n .task-name {\r\n display: flex;\r\n font-weight: bold;\r\n gap: 6px;\r\n }\r\n\r\n .btn-execute {\r\n width: 138px;\r\n }\r\n\r\n .cds--popover-container:not(.has-error) .cds--popover {\r\n display: none;\r\n }\r\n\r\n .cds--tooltip-content {\r\n padding: 12px;\r\n }\r\n\r\n .cds--btn .cds--inline-loading {\r\n inline-size: initial;\r\n min-block-size: initial;\r\n }\r\n }\r\n\r\n .input {\r\n flex-grow: 1;\r\n display: flex;\r\n flex-direction: column;\r\n gap: 5px;\r\n\r\n .input__header {\r\n display: flex;\r\n align-items: center;\r\n gap: 5px;\r\n }\r\n\r\n .input__header--title {\r\n color: #525252;\r\n }\r\n }\r\n\r\n .output {\r\n flex-grow: 1;\r\n display: flex;\r\n flex-direction: column;\r\n gap: 5px;\r\n\r\n .output__header {\r\n display: flex;\r\n align-items: center;\r\n height: 32px;\r\n width: 100%;\r\n }\r\n\r\n .output__header--title {\r\n color: #525252;\r\n display: flex;\r\n align-items: center;\r\n gap: 6px;\r\n\r\n svg.output__status-icon--ready {\r\n fill: #0043ce;\r\n }\r\n\r\n svg.output__status-icon--success {\r\n fill: #24a148;\r\n }\r\n\r\n svg.output__status-icon--error {\r\n fill: #da1e28;\r\n }\r\n\r\n .cds--inline-loading {\r\n inline-size: 16px;\r\n min-block-size: initial;\r\n }\r\n }\r\n\r\n .output__header--button-operate {\r\n margin-left: auto;\r\n }\r\n\r\n .output__body {\r\n display: flex;\r\n flex-direction: column;\r\n flex-grow: 1;\r\n position: relative;\r\n\r\n .cds--tabs {\r\n --cds-layout-size-height-local: 32px;\r\n }\r\n \r\n .cds--tab-content {\r\n padding: 0;\r\n height: calc(100% - 20px);\r\n }\r\n\r\n .cds--tab-content:not([hidden]) {\r\n display: flex;\r\n }\r\n\r\n // Tooltip on Carbon Button with absolute position is broken.\r\n .cds--popover {\r\n display: none;\r\n }\r\n }\r\n\r\n .output__error {\r\n display: flex;\r\n flex-direction: row;\r\n gap: 12px;\r\n padding: 12px;\r\n margin-bottom: 12px;\r\n border: 1px solid #da1e28;\r\n border-left-width: 3px;\r\n background-color: #fff1f1;\r\n\r\n .output__error--content {\r\n display: flex;\r\n flex-direction: column;\r\n gap: 6px;\r\n flex-grow: 1;\r\n margin-top: 1px;\r\n\r\n .output__error--title {\r\n display: flex;\r\n justify-content: space-between;\r\n font-weight: bold;\r\n\r\n .cds--link {\r\n cursor: pointer;\r\n }\r\n }\r\n }\r\n\r\n .output__error--icon svg {\r\n fill: #da1e28;\r\n }\r\n }\r\n\r\n .output__variables--empty {\r\n height: 32px;\r\n display: flex;\r\n align-items: center;\r\n color: #525252;\r\n }\r\n\r\n .output__variables--empty-action {\r\n font-weight: bold;\r\n }\r\n\r\n .cds--snippet-container {\r\n width: 100%;\r\n }\r\n\r\n .cds--snippet {\r\n max-inline-size: 100%;\r\n height: 100%;\r\n }\r\n\r\n code {\r\n font-size: 14px;\r\n }\r\n }\r\n}\r\n\r\n.code__editor {\r\n position: relative;\r\n flex-grow: 1;\r\n display: flex;\r\n flex-direction: column;\r\n\r\n &.code__editor--error .code__editor-codemirror .code__editor-codemirror-inner .cm-editor {\r\n outline: 1px solid #da1e28;\r\n outline-offset: -1px;\r\n }\r\n\r\n .code__editor-codemirror {\r\n position: relative;\r\n flex-grow: 1;\r\n\r\n .code__editor-codemirror-inner {\r\n position: absolute;\r\n top: 0;\r\n left: 0;\r\n right: 0;\r\n bottom: 0;\r\n\r\n .cm-editor {\r\n height: 100%;\r\n background-color: var(--cds-layer, #f4f4f4);\r\n }\r\n\r\n .cm-scroller {\r\n overflow-y: auto !important;\r\n }\r\n\r\n .cm-content {\r\n padding: 15px;\r\n }\r\n\r\n .cm-focused {\r\n outline: none;\r\n }\r\n\r\n .cm-tooltip {\r\n font-size: 14px;\r\n }\r\n\r\n .info {\r\n padding: 5px;\r\n font-family: monospace;\r\n font-size: 12px;\r\n max-width: 300px;\r\n word-wrap: break-word;\r\n\r\n span {\r\n font-style: italic;\r\n }\r\n\r\n pre {\r\n margin-top: 5px;\r\n }\r\n }\r\n }\r\n }\r\n\r\n .code__editor-error {\r\n color: #da1e28;\r\n font-size: 13px;\r\n margin-top: 5px;\r\n }\r\n\r\n .code__editor-copy-button {\r\n position: absolute;\r\n top: 10px;\r\n right: 10px;\r\n z-index: 10;\r\n\r\n svg {\r\n fill: #525252;\r\n }\r\n }\r\n}"],"sourceRoot":""}]);
|
|
32813
32773
|
// Exports
|
|
32814
32774
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
32815
32775
|
|