camunda-bpmn-js 4.2.0 → 4.3.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/dist/camunda-cloud-modeler.development.js +338 -39
- package/dist/camunda-cloud-modeler.production.min.js +4 -4
- package/dist/camunda-cloud-navigated-viewer.development.js +18 -0
- package/dist/camunda-cloud-navigated-viewer.production.min.js +1 -1
- package/dist/camunda-cloud-viewer.development.js +18 -0
- package/dist/camunda-cloud-viewer.production.min.js +1 -1
- package/package.json +4 -4
|
@@ -119228,6 +119228,50 @@
|
|
|
119228
119228
|
return values;
|
|
119229
119229
|
}
|
|
119230
119230
|
|
|
119231
|
+
/**
|
|
119232
|
+
* Add one or more extension elements. Create bpmn:ExtensionElements if it doesn't exist.
|
|
119233
|
+
*
|
|
119234
|
+
* @param {ModdleElement} element
|
|
119235
|
+
* @param {ModdleElement} businessObject
|
|
119236
|
+
* @param {ModdleElement|Array<ModdleElement>} extensionElementsToAdd
|
|
119237
|
+
* @param {CommandStack} commandStack
|
|
119238
|
+
*/
|
|
119239
|
+
function addExtensionElements(element, businessObject, extensionElementToAdd, bpmnFactory, commandStack) {
|
|
119240
|
+
const commands = [];
|
|
119241
|
+
let extensionElements = businessObject.get('extensionElements');
|
|
119242
|
+
|
|
119243
|
+
// (1) create bpmn:ExtensionElements if it doesn't exist
|
|
119244
|
+
if (!extensionElements) {
|
|
119245
|
+
extensionElements = createElement$3('bpmn:ExtensionElements', {
|
|
119246
|
+
values: []
|
|
119247
|
+
}, businessObject, bpmnFactory);
|
|
119248
|
+
commands.push({
|
|
119249
|
+
cmd: 'element.updateModdleProperties',
|
|
119250
|
+
context: {
|
|
119251
|
+
element,
|
|
119252
|
+
moddleElement: businessObject,
|
|
119253
|
+
properties: {
|
|
119254
|
+
extensionElements
|
|
119255
|
+
}
|
|
119256
|
+
}
|
|
119257
|
+
});
|
|
119258
|
+
}
|
|
119259
|
+
extensionElementToAdd.$parent = extensionElements;
|
|
119260
|
+
|
|
119261
|
+
// (2) add extension element to list
|
|
119262
|
+
commands.push({
|
|
119263
|
+
cmd: 'element.updateModdleProperties',
|
|
119264
|
+
context: {
|
|
119265
|
+
element,
|
|
119266
|
+
moddleElement: extensionElements,
|
|
119267
|
+
properties: {
|
|
119268
|
+
values: [...extensionElements.get('values'), extensionElementToAdd]
|
|
119269
|
+
}
|
|
119270
|
+
}
|
|
119271
|
+
});
|
|
119272
|
+
commandStack.execute('properties-panel.multi-command-executor', commands);
|
|
119273
|
+
}
|
|
119274
|
+
|
|
119231
119275
|
/**
|
|
119232
119276
|
* Remove one or more extension elements. Remove bpmn:ExtensionElements afterwards if it's empty.
|
|
119233
119277
|
*
|
|
@@ -119622,7 +119666,7 @@
|
|
|
119622
119666
|
}
|
|
119623
119667
|
|
|
119624
119668
|
const DMN_IMPLEMENTATION_OPTION = 'dmn',
|
|
119625
|
-
JOB_WORKER_IMPLEMENTATION_OPTION$
|
|
119669
|
+
JOB_WORKER_IMPLEMENTATION_OPTION$2 = 'jobWorker',
|
|
119626
119670
|
DEFAULT_IMPLEMENTATION_OPTION$1 = '';
|
|
119627
119671
|
function BusinessRuleImplementationProps(props) {
|
|
119628
119672
|
const {
|
|
@@ -119650,7 +119694,7 @@
|
|
|
119650
119694
|
return DMN_IMPLEMENTATION_OPTION;
|
|
119651
119695
|
}
|
|
119652
119696
|
if (getTaskDefinition$2(element)) {
|
|
119653
|
-
return JOB_WORKER_IMPLEMENTATION_OPTION$
|
|
119697
|
+
return JOB_WORKER_IMPLEMENTATION_OPTION$2;
|
|
119654
119698
|
}
|
|
119655
119699
|
return DEFAULT_IMPLEMENTATION_OPTION$1;
|
|
119656
119700
|
};
|
|
@@ -119665,7 +119709,7 @@
|
|
|
119665
119709
|
if (value === DMN_IMPLEMENTATION_OPTION) {
|
|
119666
119710
|
extensionElement = getCalledDecision$1(element);
|
|
119667
119711
|
extensionElementType = 'zeebe:CalledDecision';
|
|
119668
|
-
} else if (value === JOB_WORKER_IMPLEMENTATION_OPTION$
|
|
119712
|
+
} else if (value === JOB_WORKER_IMPLEMENTATION_OPTION$2) {
|
|
119669
119713
|
extensionElement = getTaskDefinition$2(element);
|
|
119670
119714
|
extensionElementType = 'zeebe:TaskDefinition';
|
|
119671
119715
|
} else {
|
|
@@ -119684,7 +119728,7 @@
|
|
|
119684
119728
|
value: DMN_IMPLEMENTATION_OPTION,
|
|
119685
119729
|
label: translate('DMN decision')
|
|
119686
119730
|
}, {
|
|
119687
|
-
value: JOB_WORKER_IMPLEMENTATION_OPTION$
|
|
119731
|
+
value: JOB_WORKER_IMPLEMENTATION_OPTION$2,
|
|
119688
119732
|
label: translate('Job worker')
|
|
119689
119733
|
}];
|
|
119690
119734
|
return options;
|
|
@@ -120143,7 +120187,8 @@
|
|
|
120143
120187
|
const FORM_TYPES = {
|
|
120144
120188
|
CAMUNDA_FORM_EMBEDDED: 'camunda-form-embedded',
|
|
120145
120189
|
CAMUNDA_FORM_LINKED: 'camunda-form-linked',
|
|
120146
|
-
CUSTOM_FORM: 'custom-form'
|
|
120190
|
+
CUSTOM_FORM: 'custom-form',
|
|
120191
|
+
EXTERNAL_REFERENCE: 'external-reference'
|
|
120147
120192
|
};
|
|
120148
120193
|
function getFormDefinition$1(element) {
|
|
120149
120194
|
const businessObject = getBusinessObject$2(element);
|
|
@@ -120182,10 +120227,14 @@
|
|
|
120182
120227
|
return;
|
|
120183
120228
|
}
|
|
120184
120229
|
const formId = formDefinition.get('formId'),
|
|
120185
|
-
formKey = formDefinition.get('formKey')
|
|
120230
|
+
formKey = formDefinition.get('formKey'),
|
|
120231
|
+
externalReference = formDefinition.get('externalReference');
|
|
120186
120232
|
if (isDefined$1(formId)) {
|
|
120187
120233
|
return FORM_TYPES.CAMUNDA_FORM_LINKED;
|
|
120188
120234
|
}
|
|
120235
|
+
if (isDefined$1(externalReference)) {
|
|
120236
|
+
return FORM_TYPES.EXTERNAL_REFERENCE;
|
|
120237
|
+
}
|
|
120189
120238
|
if (isDefined$1(formKey)) {
|
|
120190
120239
|
if (getUserTaskForm$1(element)) {
|
|
120191
120240
|
return FORM_TYPES.CAMUNDA_FORM_EMBEDDED;
|
|
@@ -120193,7 +120242,12 @@
|
|
|
120193
120242
|
return FORM_TYPES.CUSTOM_FORM;
|
|
120194
120243
|
}
|
|
120195
120244
|
}
|
|
120245
|
+
function isZeebeUserTask(element) {
|
|
120246
|
+
const bo = getBusinessObject$2(element);
|
|
120247
|
+
return getExtensionElementsList$2(bo, 'zeebe:UserTask').length > 0;
|
|
120248
|
+
}
|
|
120196
120249
|
|
|
120250
|
+
const NONE_VALUE = 'none';
|
|
120197
120251
|
function FormProps$1(props) {
|
|
120198
120252
|
const {
|
|
120199
120253
|
element
|
|
@@ -120204,7 +120258,7 @@
|
|
|
120204
120258
|
const entries = [{
|
|
120205
120259
|
id: 'formType',
|
|
120206
120260
|
component: FormType$1,
|
|
120207
|
-
isEdited:
|
|
120261
|
+
isEdited: node => node.value !== NONE_VALUE
|
|
120208
120262
|
}];
|
|
120209
120263
|
const formType = getFormType$1(element);
|
|
120210
120264
|
if (formType === FORM_TYPES.CAMUNDA_FORM_EMBEDDED) {
|
|
@@ -120222,9 +120276,15 @@
|
|
|
120222
120276
|
} else if (formType === FORM_TYPES.CUSTOM_FORM) {
|
|
120223
120277
|
entries.push({
|
|
120224
120278
|
id: 'customFormKey',
|
|
120225
|
-
component:
|
|
120279
|
+
component: CustomForm,
|
|
120226
120280
|
isEdited: isEdited
|
|
120227
120281
|
});
|
|
120282
|
+
} else if (formType === FORM_TYPES.EXTERNAL_REFERENCE) {
|
|
120283
|
+
entries.push({
|
|
120284
|
+
id: 'externalReference',
|
|
120285
|
+
component: ExternalReference,
|
|
120286
|
+
isEdited: isEdited$6
|
|
120287
|
+
});
|
|
120228
120288
|
}
|
|
120229
120289
|
return entries;
|
|
120230
120290
|
}
|
|
@@ -120235,33 +120295,13 @@
|
|
|
120235
120295
|
const injector = useService$1('injector'),
|
|
120236
120296
|
translate = useService$1('translate');
|
|
120237
120297
|
const getValue = () => {
|
|
120238
|
-
return getFormType$1(element) ||
|
|
120298
|
+
return getFormType$1(element) || NONE_VALUE;
|
|
120239
120299
|
};
|
|
120240
120300
|
const setValue = value => {
|
|
120241
|
-
|
|
120242
|
-
setUserTaskForm(injector, element, '');
|
|
120243
|
-
} else if (value === FORM_TYPES.CAMUNDA_FORM_LINKED) {
|
|
120244
|
-
setFormId(injector, element, '');
|
|
120245
|
-
} else if (value === FORM_TYPES.CUSTOM_FORM) {
|
|
120246
|
-
setCustomFormKey(injector, element, '');
|
|
120247
|
-
} else {
|
|
120248
|
-
removeFormDefinition(injector, element);
|
|
120249
|
-
}
|
|
120301
|
+
setFormType(injector, element, value);
|
|
120250
120302
|
};
|
|
120251
120303
|
const getOptions = () => {
|
|
120252
|
-
return
|
|
120253
|
-
value: '',
|
|
120254
|
-
label: translate('<none>')
|
|
120255
|
-
}, {
|
|
120256
|
-
value: FORM_TYPES.CAMUNDA_FORM_LINKED,
|
|
120257
|
-
label: translate('Camunda Form (linked)')
|
|
120258
|
-
}, {
|
|
120259
|
-
value: FORM_TYPES.CAMUNDA_FORM_EMBEDDED,
|
|
120260
|
-
label: translate('Camunda Form (embedded)')
|
|
120261
|
-
}, {
|
|
120262
|
-
value: FORM_TYPES.CUSTOM_FORM,
|
|
120263
|
-
label: translate('Custom form key')
|
|
120264
|
-
}];
|
|
120304
|
+
return getFormTypeOptions(translate, element);
|
|
120265
120305
|
};
|
|
120266
120306
|
return SelectEntry({
|
|
120267
120307
|
element,
|
|
@@ -120272,6 +120312,46 @@
|
|
|
120272
120312
|
getOptions
|
|
120273
120313
|
});
|
|
120274
120314
|
}
|
|
120315
|
+
function setFormType(injector, element, value) {
|
|
120316
|
+
if (value === FORM_TYPES.CAMUNDA_FORM_EMBEDDED) {
|
|
120317
|
+
setUserTaskForm(injector, element, '');
|
|
120318
|
+
} else if (value === FORM_TYPES.CAMUNDA_FORM_LINKED) {
|
|
120319
|
+
setFormId(injector, element, '');
|
|
120320
|
+
} else if (value === FORM_TYPES.CUSTOM_FORM) {
|
|
120321
|
+
setCustomFormKey(injector, element, '');
|
|
120322
|
+
} else if (value === FORM_TYPES.EXTERNAL_REFERENCE) {
|
|
120323
|
+
setExternalReference(injector, element, '');
|
|
120324
|
+
} else {
|
|
120325
|
+
removeFormDefinition(injector, element);
|
|
120326
|
+
}
|
|
120327
|
+
}
|
|
120328
|
+
function getFormTypeOptions(translate, element) {
|
|
120329
|
+
if (isZeebeUserTask(element)) {
|
|
120330
|
+
return [{
|
|
120331
|
+
value: NONE_VALUE,
|
|
120332
|
+
label: translate('<none>')
|
|
120333
|
+
}, {
|
|
120334
|
+
value: FORM_TYPES.CAMUNDA_FORM_LINKED,
|
|
120335
|
+
label: translate('Camunda Form')
|
|
120336
|
+
}, {
|
|
120337
|
+
value: FORM_TYPES.EXTERNAL_REFERENCE,
|
|
120338
|
+
label: translate('External form reference')
|
|
120339
|
+
}];
|
|
120340
|
+
}
|
|
120341
|
+
return [{
|
|
120342
|
+
value: NONE_VALUE,
|
|
120343
|
+
label: translate('<none>')
|
|
120344
|
+
}, {
|
|
120345
|
+
value: FORM_TYPES.CAMUNDA_FORM_LINKED,
|
|
120346
|
+
label: translate('Camunda Form (linked)')
|
|
120347
|
+
}, {
|
|
120348
|
+
value: FORM_TYPES.CAMUNDA_FORM_EMBEDDED,
|
|
120349
|
+
label: translate('Camunda Form (embedded)')
|
|
120350
|
+
}, {
|
|
120351
|
+
value: FORM_TYPES.CUSTOM_FORM,
|
|
120352
|
+
label: translate('Custom form key')
|
|
120353
|
+
}];
|
|
120354
|
+
}
|
|
120275
120355
|
function FormConfiguration(props) {
|
|
120276
120356
|
const {
|
|
120277
120357
|
element
|
|
@@ -120317,7 +120397,7 @@
|
|
|
120317
120397
|
debounce
|
|
120318
120398
|
});
|
|
120319
120399
|
}
|
|
120320
|
-
function
|
|
120400
|
+
function CustomForm(props) {
|
|
120321
120401
|
const {
|
|
120322
120402
|
element
|
|
120323
120403
|
} = props;
|
|
@@ -120325,7 +120405,8 @@
|
|
|
120325
120405
|
injector = useService$1('injector'),
|
|
120326
120406
|
translate = useService$1('translate');
|
|
120327
120407
|
const getValue = () => {
|
|
120328
|
-
|
|
120408
|
+
const formDefinition = getFormDefinition$1(element);
|
|
120409
|
+
return formDefinition.get('formKey');
|
|
120329
120410
|
};
|
|
120330
120411
|
const setValue = value => {
|
|
120331
120412
|
setCustomFormKey(injector, element, isUndefined$6(value) ? '' : value);
|
|
@@ -120333,7 +120414,31 @@
|
|
|
120333
120414
|
return TextfieldEntry({
|
|
120334
120415
|
element,
|
|
120335
120416
|
id: 'customFormKey',
|
|
120336
|
-
label: translate('
|
|
120417
|
+
label: translate('Custom form key'),
|
|
120418
|
+
getValue,
|
|
120419
|
+
setValue,
|
|
120420
|
+
debounce
|
|
120421
|
+
});
|
|
120422
|
+
}
|
|
120423
|
+
function ExternalReference(props) {
|
|
120424
|
+
const {
|
|
120425
|
+
element
|
|
120426
|
+
} = props;
|
|
120427
|
+
const debounce = useService$1('debounceInput'),
|
|
120428
|
+
injector = useService$1('injector'),
|
|
120429
|
+
translate = useService$1('translate');
|
|
120430
|
+
const getValue = () => {
|
|
120431
|
+
const formDefinition = getFormDefinition$1(element);
|
|
120432
|
+
return formDefinition.get('externalReference');
|
|
120433
|
+
};
|
|
120434
|
+
const setValue = value => {
|
|
120435
|
+
setExternalReference(injector, element, isUndefined$6(value) ? '' : value);
|
|
120436
|
+
};
|
|
120437
|
+
return FeelEntryWithVariableContext$1({
|
|
120438
|
+
element,
|
|
120439
|
+
id: 'externalReference',
|
|
120440
|
+
label: translate('External form reference'),
|
|
120441
|
+
feel: 'optional',
|
|
120337
120442
|
getValue,
|
|
120338
120443
|
setValue,
|
|
120339
120444
|
debounce
|
|
@@ -120474,6 +120579,16 @@
|
|
|
120474
120579
|
formKey
|
|
120475
120580
|
})]);
|
|
120476
120581
|
}
|
|
120582
|
+
function setExternalReference(injector, element, externalReference) {
|
|
120583
|
+
let {
|
|
120584
|
+
commands,
|
|
120585
|
+
formDefinition
|
|
120586
|
+
} = getOrCreateFormDefintition(injector, element);
|
|
120587
|
+
const commandStack = injector.get('commandStack');
|
|
120588
|
+
commandStack.execute('properties-panel.multi-command-executor', [...commands, createUpdateModdlePropertiesCommand(element, formDefinition, {
|
|
120589
|
+
externalReference
|
|
120590
|
+
})]);
|
|
120591
|
+
}
|
|
120477
120592
|
function setUserTaskForm(injector, element, body) {
|
|
120478
120593
|
let {
|
|
120479
120594
|
commands,
|
|
@@ -121861,7 +121976,7 @@
|
|
|
121861
121976
|
}
|
|
121862
121977
|
|
|
121863
121978
|
const SCRIPT_IMPLEMENTATION_OPTION = 'script',
|
|
121864
|
-
JOB_WORKER_IMPLEMENTATION_OPTION = 'jobWorker',
|
|
121979
|
+
JOB_WORKER_IMPLEMENTATION_OPTION$1 = 'jobWorker',
|
|
121865
121980
|
DEFAULT_IMPLEMENTATION_OPTION = '';
|
|
121866
121981
|
function ScriptImplementationProps(props) {
|
|
121867
121982
|
const {
|
|
@@ -121889,7 +122004,7 @@
|
|
|
121889
122004
|
return SCRIPT_IMPLEMENTATION_OPTION;
|
|
121890
122005
|
}
|
|
121891
122006
|
if (getTaskDefinition$1(element)) {
|
|
121892
|
-
return JOB_WORKER_IMPLEMENTATION_OPTION;
|
|
122007
|
+
return JOB_WORKER_IMPLEMENTATION_OPTION$1;
|
|
121893
122008
|
}
|
|
121894
122009
|
return DEFAULT_IMPLEMENTATION_OPTION;
|
|
121895
122010
|
};
|
|
@@ -121904,7 +122019,7 @@
|
|
|
121904
122019
|
if (value === SCRIPT_IMPLEMENTATION_OPTION) {
|
|
121905
122020
|
extensionElement = getScript$1(element);
|
|
121906
122021
|
extensionElementType = 'zeebe:Script';
|
|
121907
|
-
} else if (value === JOB_WORKER_IMPLEMENTATION_OPTION) {
|
|
122022
|
+
} else if (value === JOB_WORKER_IMPLEMENTATION_OPTION$1) {
|
|
121908
122023
|
extensionElement = getTaskDefinition$1(element);
|
|
121909
122024
|
extensionElementType = 'zeebe:TaskDefinition';
|
|
121910
122025
|
} else {
|
|
@@ -121923,7 +122038,7 @@
|
|
|
121923
122038
|
value: SCRIPT_IMPLEMENTATION_OPTION,
|
|
121924
122039
|
label: translate('FEEL expression')
|
|
121925
122040
|
}, {
|
|
121926
|
-
value: JOB_WORKER_IMPLEMENTATION_OPTION,
|
|
122041
|
+
value: JOB_WORKER_IMPLEMENTATION_OPTION$1,
|
|
121927
122042
|
label: translate('Job worker')
|
|
121928
122043
|
}];
|
|
121929
122044
|
return options;
|
|
@@ -122990,6 +123105,86 @@
|
|
|
122990
123105
|
}
|
|
122991
123106
|
}
|
|
122992
123107
|
|
|
123108
|
+
const ZEEBE_USER_TASK_IMPLEMENTATION_OPTION = 'zeebeUserTask',
|
|
123109
|
+
JOB_WORKER_IMPLEMENTATION_OPTION = 'jobWorker';
|
|
123110
|
+
function UserTaskImplementationProps(props) {
|
|
123111
|
+
const {
|
|
123112
|
+
element
|
|
123113
|
+
} = props;
|
|
123114
|
+
if (!is$6(element, 'bpmn:UserTask')) {
|
|
123115
|
+
return [];
|
|
123116
|
+
}
|
|
123117
|
+
return [{
|
|
123118
|
+
id: 'userTaskImplementation',
|
|
123119
|
+
component: UserTaskImplementation,
|
|
123120
|
+
isEdited: () => isUserTaskImplementationEdited(element)
|
|
123121
|
+
}];
|
|
123122
|
+
}
|
|
123123
|
+
function UserTaskImplementation(props) {
|
|
123124
|
+
const {
|
|
123125
|
+
element,
|
|
123126
|
+
id
|
|
123127
|
+
} = props;
|
|
123128
|
+
const commandStack = useService$1('commandStack');
|
|
123129
|
+
const bpmnFactory = useService$1('bpmnFactory');
|
|
123130
|
+
const translate = useService$1('translate');
|
|
123131
|
+
const getValue = () => {
|
|
123132
|
+
if (getZeebeUserTask(element)) {
|
|
123133
|
+
return ZEEBE_USER_TASK_IMPLEMENTATION_OPTION;
|
|
123134
|
+
}
|
|
123135
|
+
return JOB_WORKER_IMPLEMENTATION_OPTION;
|
|
123136
|
+
};
|
|
123137
|
+
|
|
123138
|
+
/**
|
|
123139
|
+
* Set value by either creating or removing zeebe:userTask extension element.
|
|
123140
|
+
* Note that they must not exist both at the same time, however this
|
|
123141
|
+
* will be ensured by a camunda-bpmn-js behavior (and not by the propPanel).
|
|
123142
|
+
*/
|
|
123143
|
+
const setValue = value => {
|
|
123144
|
+
if (value === ZEEBE_USER_TASK_IMPLEMENTATION_OPTION) {
|
|
123145
|
+
createZeebeUserTask(element, bpmnFactory, commandStack);
|
|
123146
|
+
} else if (value === JOB_WORKER_IMPLEMENTATION_OPTION) {
|
|
123147
|
+
removeZeebeUserTask(element, commandStack);
|
|
123148
|
+
}
|
|
123149
|
+
};
|
|
123150
|
+
const getOptions = () => {
|
|
123151
|
+
const options = [{
|
|
123152
|
+
value: ZEEBE_USER_TASK_IMPLEMENTATION_OPTION,
|
|
123153
|
+
label: translate('Zeebe user task')
|
|
123154
|
+
}, {
|
|
123155
|
+
value: JOB_WORKER_IMPLEMENTATION_OPTION,
|
|
123156
|
+
label: translate('Job worker')
|
|
123157
|
+
}];
|
|
123158
|
+
return options;
|
|
123159
|
+
};
|
|
123160
|
+
return SelectEntry({
|
|
123161
|
+
element,
|
|
123162
|
+
id,
|
|
123163
|
+
label: translate('Type'),
|
|
123164
|
+
getValue,
|
|
123165
|
+
setValue,
|
|
123166
|
+
getOptions
|
|
123167
|
+
});
|
|
123168
|
+
}
|
|
123169
|
+
|
|
123170
|
+
// helper ///////////////////////
|
|
123171
|
+
function createZeebeUserTask(element, bpmnFactory, commandStack) {
|
|
123172
|
+
const businessObject = getBusinessObject$2(element);
|
|
123173
|
+
const zeebeUserTask = createElement$3('zeebe:UserTask', {}, businessObject, bpmnFactory);
|
|
123174
|
+
addExtensionElements(element, businessObject, zeebeUserTask, bpmnFactory, commandStack);
|
|
123175
|
+
}
|
|
123176
|
+
function removeZeebeUserTask(element, commandStack) {
|
|
123177
|
+
const zeebeUserTask = getZeebeUserTask(element);
|
|
123178
|
+
removeExtensionElements$1(element, getBusinessObject$2(element), zeebeUserTask, commandStack);
|
|
123179
|
+
}
|
|
123180
|
+
function isUserTaskImplementationEdited(element) {
|
|
123181
|
+
return getZeebeUserTask(element);
|
|
123182
|
+
}
|
|
123183
|
+
function getZeebeUserTask(element) {
|
|
123184
|
+
const businessObject = getBusinessObject$2(element);
|
|
123185
|
+
return getExtensionElementsList$2(businessObject, 'zeebe:UserTask')[0];
|
|
123186
|
+
}
|
|
123187
|
+
|
|
122993
123188
|
function ExtensionProperty(props) {
|
|
122994
123189
|
const {
|
|
122995
123190
|
idPrefix,
|
|
@@ -123256,7 +123451,7 @@
|
|
|
123256
123451
|
*/
|
|
123257
123452
|
|
|
123258
123453
|
const LOW_PRIORITY$1$1 = 500;
|
|
123259
|
-
const ZEEBE_GROUPS = [BusinessRuleImplementationGroup, CalledDecisionGroup, ScriptImplementationGroup, ScriptGroup$1, TaskDefinitionGroup, AssignmentDefinitionGroup, FormGroup$1, ConditionGroup$1, TargetGroup, InputPropagationGroup, InputGroup$1, OutputPropagationGroup, OutputGroup$1, HeaderGroup, ExtensionPropertiesGroup$1];
|
|
123454
|
+
const ZEEBE_GROUPS = [BusinessRuleImplementationGroup, CalledDecisionGroup, ScriptImplementationGroup, ScriptGroup$1, UserTaskImplementationGroup, TaskDefinitionGroup, AssignmentDefinitionGroup, FormGroup$1, ConditionGroup$1, TargetGroup, InputPropagationGroup, InputGroup$1, OutputPropagationGroup, OutputGroup$1, HeaderGroup, ExtensionPropertiesGroup$1];
|
|
123260
123455
|
let ZeebePropertiesProvider$1 = class ZeebePropertiesProvider {
|
|
123261
123456
|
constructor(propertiesPanel, injector) {
|
|
123262
123457
|
propertiesPanel.registerProvider(LOW_PRIORITY$1$1, this);
|
|
@@ -123433,6 +123628,17 @@
|
|
|
123433
123628
|
};
|
|
123434
123629
|
return group.entries.length ? group : null;
|
|
123435
123630
|
}
|
|
123631
|
+
function UserTaskImplementationGroup(element) {
|
|
123632
|
+
const group = {
|
|
123633
|
+
id: 'userTaskImplementation',
|
|
123634
|
+
label: 'Implementation',
|
|
123635
|
+
entries: [...UserTaskImplementationProps({
|
|
123636
|
+
element
|
|
123637
|
+
})],
|
|
123638
|
+
component: Group$1
|
|
123639
|
+
};
|
|
123640
|
+
return group.entries.length ? group : null;
|
|
123641
|
+
}
|
|
123436
123642
|
function AssignmentDefinitionGroup(element) {
|
|
123437
123643
|
const group = {
|
|
123438
123644
|
id: 'assignmentDefinition',
|
|
@@ -124644,6 +124850,8 @@
|
|
|
124644
124850
|
constructor(bpmnFactory, eventBus, modeling) {
|
|
124645
124851
|
super(eventBus);
|
|
124646
124852
|
|
|
124853
|
+
this._modeling = modeling;
|
|
124854
|
+
|
|
124647
124855
|
function removeUserTaskForm(element, moddleElement, userTaskForm) {
|
|
124648
124856
|
const extensionElements = moddleElement.get('extensionElements');
|
|
124649
124857
|
|
|
@@ -124752,6 +124960,7 @@
|
|
|
124752
124960
|
* 1. zeebe:FormDefinition with zeebe:formId (linked Camunda form)
|
|
124753
124961
|
* 2. zeebe:FormDefinition with zeebe:formKey in the format of camunda-forms:bpmn:UserTaskForm_1 (embedded Camunda form)
|
|
124754
124962
|
* 3. zeebe:FormDefinition with zeebe:formKey (custom form)
|
|
124963
|
+
* 4. zeebe:FormDefinition with zeebe:externalReference (external form)
|
|
124755
124964
|
*/
|
|
124756
124965
|
this.preExecute('element.updateModdleProperties', function(context) {
|
|
124757
124966
|
const {
|
|
@@ -124762,8 +124971,13 @@
|
|
|
124762
124971
|
if (is$6(moddleElement, 'zeebe:FormDefinition')) {
|
|
124763
124972
|
if ('formId' in properties) {
|
|
124764
124973
|
properties.formKey = undefined;
|
|
124974
|
+
properties.externalReference = undefined;
|
|
124765
124975
|
} else if ('formKey' in properties) {
|
|
124766
124976
|
properties.formId = undefined;
|
|
124977
|
+
properties.externalReference = undefined;
|
|
124978
|
+
} else if ('externalReference' in properties) {
|
|
124979
|
+
properties.formId = undefined;
|
|
124980
|
+
properties.formKey = undefined;
|
|
124767
124981
|
}
|
|
124768
124982
|
}
|
|
124769
124983
|
}, true);
|
|
@@ -124806,6 +125020,69 @@
|
|
|
124806
125020
|
}
|
|
124807
125021
|
}, true);
|
|
124808
125022
|
|
|
125023
|
+
this._registerZeebeUserTaskSupport();
|
|
125024
|
+
}
|
|
125025
|
+
|
|
125026
|
+
_registerZeebeUserTaskSupport() {
|
|
125027
|
+
|
|
125028
|
+
/**
|
|
125029
|
+
* Handle `formKey` for `zeebe:UserTask`.
|
|
125030
|
+
* 1. Remove if embedded form is used.
|
|
125031
|
+
* 2. Convert to externalReference if custom form key.
|
|
125032
|
+
*/
|
|
125033
|
+
this.postExecute('element.updateModdleProperties', ({ element }) => {
|
|
125034
|
+
|
|
125035
|
+
if (!is$6(element, 'bpmn:UserTask') || !hasZeebeUserTask(element)) {
|
|
125036
|
+
return;
|
|
125037
|
+
}
|
|
125038
|
+
|
|
125039
|
+
const formDefinition = getFormDefinition(element);
|
|
125040
|
+
|
|
125041
|
+
if (!formDefinition) {
|
|
125042
|
+
return;
|
|
125043
|
+
}
|
|
125044
|
+
|
|
125045
|
+
const formKey = formDefinition.get('formKey');
|
|
125046
|
+
|
|
125047
|
+
if (isUndefined$6(formKey)) {
|
|
125048
|
+
return;
|
|
125049
|
+
}
|
|
125050
|
+
|
|
125051
|
+
if (isUserTaskFormKey(formKey)) {
|
|
125052
|
+
this._modeling.updateModdleProperties(element, formDefinition, { formKey: undefined });
|
|
125053
|
+
} else {
|
|
125054
|
+
this._modeling.updateModdleProperties(element, formDefinition, {
|
|
125055
|
+
externalReference: formKey
|
|
125056
|
+
});
|
|
125057
|
+
}
|
|
125058
|
+
}, true);
|
|
125059
|
+
|
|
125060
|
+
/**
|
|
125061
|
+
* Replace `externalReference` with `formKey` for non-`zeebe:UserTask`.
|
|
125062
|
+
*/
|
|
125063
|
+
this.postExecute('element.updateModdleProperties', ({ element }) => {
|
|
125064
|
+
|
|
125065
|
+
if (!is$6(element, 'bpmn:UserTask') || hasZeebeUserTask(element)) {
|
|
125066
|
+
return;
|
|
125067
|
+
}
|
|
125068
|
+
|
|
125069
|
+
const formDefinition = getFormDefinition(element);
|
|
125070
|
+
|
|
125071
|
+
if (!formDefinition) {
|
|
125072
|
+
return;
|
|
125073
|
+
}
|
|
125074
|
+
|
|
125075
|
+
const externalReference = formDefinition.get('externalReference');
|
|
125076
|
+
|
|
125077
|
+
if (isUndefined$6(externalReference)) {
|
|
125078
|
+
return;
|
|
125079
|
+
}
|
|
125080
|
+
|
|
125081
|
+
this._modeling.updateModdleProperties(element, formDefinition, {
|
|
125082
|
+
externalReference: undefined,
|
|
125083
|
+
formKey: externalReference
|
|
125084
|
+
});
|
|
125085
|
+
}, true);
|
|
124809
125086
|
}
|
|
124810
125087
|
}
|
|
124811
125088
|
|
|
@@ -124829,6 +125106,10 @@
|
|
|
124829
125106
|
&& !properties.values.find(value => is$6(value, type));
|
|
124830
125107
|
}
|
|
124831
125108
|
|
|
125109
|
+
function hasZeebeUserTask(userTask) {
|
|
125110
|
+
return getExtensionElementsList$1(userTask, 'zeebe:UserTask').length;
|
|
125111
|
+
}
|
|
125112
|
+
|
|
124832
125113
|
const HIGH_PRIORITY$4 = 5000;
|
|
124833
125114
|
|
|
124834
125115
|
|
|
@@ -155934,9 +156215,27 @@
|
|
|
155934
156215
|
name: "formId",
|
|
155935
156216
|
type: "String",
|
|
155936
156217
|
isAttr: true
|
|
156218
|
+
},
|
|
156219
|
+
{
|
|
156220
|
+
name: "externalReference",
|
|
156221
|
+
type: "String",
|
|
156222
|
+
isAttr: true
|
|
155937
156223
|
}
|
|
155938
156224
|
]
|
|
155939
156225
|
},
|
|
156226
|
+
{
|
|
156227
|
+
name: "UserTask",
|
|
156228
|
+
superClass: [
|
|
156229
|
+
"Element"
|
|
156230
|
+
],
|
|
156231
|
+
meta: {
|
|
156232
|
+
allowedIn: [
|
|
156233
|
+
"bpmn:UserTask"
|
|
156234
|
+
]
|
|
156235
|
+
},
|
|
156236
|
+
properties: [
|
|
156237
|
+
]
|
|
156238
|
+
},
|
|
155940
156239
|
{
|
|
155941
156240
|
name: "CalledDecision",
|
|
155942
156241
|
superClass: [
|