camunda-bpmn-js 5.0.0 → 5.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/base-modeler.development.js +220 -222
- package/dist/base-modeler.production.min.js +1 -1
- package/dist/camunda-cloud-modeler.development.js +3610 -3429
- package/dist/camunda-cloud-modeler.production.min.js +6 -5
- package/dist/camunda-cloud-navigated-viewer.development.js +46 -0
- package/dist/camunda-cloud-navigated-viewer.production.min.js +1 -1
- package/dist/camunda-cloud-viewer.development.js +46 -0
- package/dist/camunda-cloud-viewer.production.min.js +1 -1
- package/dist/camunda-platform-modeler.development.js +1497 -1499
- package/dist/camunda-platform-modeler.production.min.js +1 -1
- package/package.json +14 -14
|
@@ -104149,8 +104149,8 @@
|
|
|
104149
104149
|
});
|
|
104150
104150
|
const selectedElement = state.selectedElement;
|
|
104151
104151
|
|
|
104152
|
-
/**
|
|
104153
|
-
* @param {djs.model.Base | Array<djs.model.Base>} element
|
|
104152
|
+
/**
|
|
104153
|
+
* @param {djs.model.Base | Array<djs.model.Base>} element
|
|
104154
104154
|
*/
|
|
104155
104155
|
const _update = element => {
|
|
104156
104156
|
if (!element) {
|
|
@@ -104324,8 +104324,7 @@
|
|
|
104324
104324
|
// helpers //////////////////////////
|
|
104325
104325
|
|
|
104326
104326
|
function isImplicitRoot$1(element) {
|
|
104327
|
-
|
|
104328
|
-
return element && (element.isImplicit || element.id === '__implicitroot');
|
|
104327
|
+
return element && element.isImplicit;
|
|
104329
104328
|
}
|
|
104330
104329
|
function findElement(elements, element) {
|
|
104331
104330
|
return find$2(elements, e => e === element);
|
|
@@ -104336,10 +104335,10 @@
|
|
|
104336
104335
|
|
|
104337
104336
|
const DEFAULT_PRIORITY$1 = 1000;
|
|
104338
104337
|
|
|
104339
|
-
/**
|
|
104340
|
-
* @typedef { import('@bpmn-io/properties-panel').GroupDefinition } GroupDefinition
|
|
104341
|
-
* @typedef { import('@bpmn-io/properties-panel').ListGroupDefinition } ListGroupDefinition
|
|
104342
|
-
* @typedef { { getGroups: (ModdleElement) => (Array{GroupDefinition|ListGroupDefinition}) => Array{GroupDefinition|ListGroupDefinition}) } PropertiesProvider
|
|
104338
|
+
/**
|
|
104339
|
+
* @typedef { import('@bpmn-io/properties-panel').GroupDefinition } GroupDefinition
|
|
104340
|
+
* @typedef { import('@bpmn-io/properties-panel').ListGroupDefinition } ListGroupDefinition
|
|
104341
|
+
* @typedef { { getGroups: (ModdleElement) => (Array{GroupDefinition|ListGroupDefinition}) => Array{GroupDefinition|ListGroupDefinition}) } PropertiesProvider
|
|
104343
104342
|
*/
|
|
104344
104343
|
|
|
104345
104344
|
class BpmnPropertiesPanelRenderer {
|
|
@@ -104378,10 +104377,10 @@
|
|
|
104378
104377
|
});
|
|
104379
104378
|
}
|
|
104380
104379
|
|
|
104381
|
-
/**
|
|
104382
|
-
* Attach the properties panel to a parent node.
|
|
104383
|
-
*
|
|
104384
|
-
* @param {HTMLElement} container
|
|
104380
|
+
/**
|
|
104381
|
+
* Attach the properties panel to a parent node.
|
|
104382
|
+
*
|
|
104383
|
+
* @param {HTMLElement} container
|
|
104385
104384
|
*/
|
|
104386
104385
|
attachTo(container) {
|
|
104387
104386
|
if (!container) {
|
|
@@ -104406,8 +104405,8 @@
|
|
|
104406
104405
|
this._eventBus.fire('propertiesPanel.attach');
|
|
104407
104406
|
}
|
|
104408
104407
|
|
|
104409
|
-
/**
|
|
104410
|
-
* Detach the properties panel from its parent node.
|
|
104408
|
+
/**
|
|
104409
|
+
* Detach the properties panel from its parent node.
|
|
104411
104410
|
*/
|
|
104412
104411
|
detach() {
|
|
104413
104412
|
const parentNode = this._container.parentNode;
|
|
@@ -104417,11 +104416,11 @@
|
|
|
104417
104416
|
}
|
|
104418
104417
|
}
|
|
104419
104418
|
|
|
104420
|
-
/**
|
|
104421
|
-
* Register a new properties provider to the properties panel.
|
|
104422
|
-
*
|
|
104423
|
-
* @param {Number} [priority]
|
|
104424
|
-
* @param {PropertiesProvider} provider
|
|
104419
|
+
/**
|
|
104420
|
+
* Register a new properties provider to the properties panel.
|
|
104421
|
+
*
|
|
104422
|
+
* @param {Number} [priority]
|
|
104423
|
+
* @param {PropertiesProvider} provider
|
|
104425
104424
|
*/
|
|
104426
104425
|
registerProvider(priority, provider) {
|
|
104427
104426
|
if (!provider) {
|
|
@@ -104438,9 +104437,9 @@
|
|
|
104438
104437
|
this._eventBus.fire('propertiesPanel.providersChanged');
|
|
104439
104438
|
}
|
|
104440
104439
|
|
|
104441
|
-
/**
|
|
104442
|
-
* Updates the layout of the properties panel.
|
|
104443
|
-
* @param {Object} layout
|
|
104440
|
+
/**
|
|
104441
|
+
* Updates the layout of the properties panel.
|
|
104442
|
+
* @param {Object} layout
|
|
104444
104443
|
*/
|
|
104445
104444
|
setLayout(layout) {
|
|
104446
104445
|
this._eventBus.fire('propertiesPanel.setLayout', {
|
|
@@ -104487,16 +104486,15 @@
|
|
|
104487
104486
|
// helpers ///////////////////////
|
|
104488
104487
|
|
|
104489
104488
|
function isImplicitRoot(element) {
|
|
104490
|
-
|
|
104491
|
-
return element && (element.isImplicit || element.id === '__implicitroot');
|
|
104489
|
+
return element && element.isImplicit;
|
|
104492
104490
|
}
|
|
104493
104491
|
|
|
104494
|
-
/**
|
|
104495
|
-
* Setup keyboard bindings (undo, redo) on the given container.
|
|
104496
|
-
*
|
|
104497
|
-
* @param {Element} container
|
|
104498
|
-
* @param {EventBus} eventBus
|
|
104499
|
-
* @param {CommandStack} commandStack
|
|
104492
|
+
/**
|
|
104493
|
+
* Setup keyboard bindings (undo, redo) on the given container.
|
|
104494
|
+
*
|
|
104495
|
+
* @param {Element} container
|
|
104496
|
+
* @param {EventBus} eventBus
|
|
104497
|
+
* @param {CommandStack} commandStack
|
|
104500
104498
|
*/
|
|
104501
104499
|
function setupKeyboard(container, eventBus, commandStack) {
|
|
104502
104500
|
function cancel(event) {
|
|
@@ -104521,14 +104519,14 @@
|
|
|
104521
104519
|
});
|
|
104522
104520
|
}
|
|
104523
104521
|
|
|
104524
|
-
/**
|
|
104525
|
-
* A handler that combines and executes multiple commands.
|
|
104526
|
-
*
|
|
104527
|
-
* All updates are bundled on the command stack and executed in one step.
|
|
104528
|
-
* This also makes it possible to revert the changes in one step.
|
|
104529
|
-
*
|
|
104530
|
-
* Example use case: remove the camunda:formKey attribute and in addition
|
|
104531
|
-
* add all form fields needed for the camunda:formData property.
|
|
104522
|
+
/**
|
|
104523
|
+
* A handler that combines and executes multiple commands.
|
|
104524
|
+
*
|
|
104525
|
+
* All updates are bundled on the command stack and executed in one step.
|
|
104526
|
+
* This also makes it possible to revert the changes in one step.
|
|
104527
|
+
*
|
|
104528
|
+
* Example use case: remove the camunda:formKey attribute and in addition
|
|
104529
|
+
* add all form fields needed for the camunda:formData property.
|
|
104532
104530
|
*/
|
|
104533
104531
|
let MultiCommandHandler$1 = class MultiCommandHandler {
|
|
104534
104532
|
constructor(commandStack) {
|
|
@@ -104658,12 +104656,12 @@
|
|
|
104658
104656
|
return compensateEventDefinition && compensateEventDefinition.get('activityRef');
|
|
104659
104657
|
}
|
|
104660
104658
|
|
|
104661
|
-
/**
|
|
104662
|
-
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
104659
|
+
/**
|
|
104660
|
+
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
104663
104661
|
*/
|
|
104664
104662
|
|
|
104665
|
-
/**
|
|
104666
|
-
* @returns {Array<Entry>} entries
|
|
104663
|
+
/**
|
|
104664
|
+
* @returns {Array<Entry>} entries
|
|
104667
104665
|
*/
|
|
104668
104666
|
function CompensationProps(props) {
|
|
104669
104667
|
const {
|
|
@@ -104773,12 +104771,12 @@
|
|
|
104773
104771
|
return getFlowElements(element, 'bpmn:BoundaryEvent');
|
|
104774
104772
|
}
|
|
104775
104773
|
|
|
104776
|
-
/**
|
|
104777
|
-
* Checks whether an Activity is attaching a CompensateEvent of the parent container.
|
|
104778
|
-
*
|
|
104779
|
-
* @param {ModdleElement} activity
|
|
104780
|
-
* @param {Array<ModdleElement>} boundaryEvents
|
|
104781
|
-
* @returns {Boolean}
|
|
104774
|
+
/**
|
|
104775
|
+
* Checks whether an Activity is attaching a CompensateEvent of the parent container.
|
|
104776
|
+
*
|
|
104777
|
+
* @param {ModdleElement} activity
|
|
104778
|
+
* @param {Array<ModdleElement>} boundaryEvents
|
|
104779
|
+
* @returns {Boolean}
|
|
104782
104780
|
*/
|
|
104783
104781
|
function hasCompensationEventAttached(activity, boundaryEvents) {
|
|
104784
104782
|
const {
|
|
@@ -104793,15 +104791,15 @@
|
|
|
104793
104791
|
});
|
|
104794
104792
|
}
|
|
104795
104793
|
|
|
104796
|
-
/**
|
|
104797
|
-
* Checks whether an Activity can be compensated. That's the case when it is
|
|
104798
|
-
* a) a CallActivity
|
|
104799
|
-
* b) a SubProcess, when it is not event based and not a compensation
|
|
104800
|
-
* c) any other Activity, when it is attaching a CompensateEvent of the parent container
|
|
104801
|
-
*
|
|
104802
|
-
* @param {ModdleElement} activity
|
|
104803
|
-
* @param {Array<ModdleElement>} boundaryEvents
|
|
104804
|
-
* @returns {Boolean}
|
|
104794
|
+
/**
|
|
104795
|
+
* Checks whether an Activity can be compensated. That's the case when it is
|
|
104796
|
+
* a) a CallActivity
|
|
104797
|
+
* b) a SubProcess, when it is not event based and not a compensation
|
|
104798
|
+
* c) any other Activity, when it is attaching a CompensateEvent of the parent container
|
|
104799
|
+
*
|
|
104800
|
+
* @param {ModdleElement} activity
|
|
104801
|
+
* @param {Array<ModdleElement>} boundaryEvents
|
|
104802
|
+
* @returns {Boolean}
|
|
104805
104803
|
*/
|
|
104806
104804
|
function canBeCompensated(activity, boundaryEvents) {
|
|
104807
104805
|
return is$5(activity, 'bpmn:CallActivity') || is$5(activity, 'bpmn:SubProcess') && !activity.triggeredByEvent && !activity.isForCompensation || hasCompensationEventAttached(activity, boundaryEvents);
|
|
@@ -104814,11 +104812,11 @@
|
|
|
104814
104812
|
});
|
|
104815
104813
|
}
|
|
104816
104814
|
|
|
104817
|
-
/**
|
|
104818
|
-
* Retrieves all possible activities to reference for a Compensation.
|
|
104819
|
-
*
|
|
104820
|
-
* @param {djs.model.Base} element
|
|
104821
|
-
* @returns {Array<ModdleElement>}
|
|
104815
|
+
/**
|
|
104816
|
+
* Retrieves all possible activities to reference for a Compensation.
|
|
104817
|
+
*
|
|
104818
|
+
* @param {djs.model.Base} element
|
|
104819
|
+
* @returns {Array<ModdleElement>}
|
|
104822
104820
|
*/
|
|
104823
104821
|
function findActivityRefs(element) {
|
|
104824
104822
|
const businessObject = getBusinessObject$1(element);
|
|
@@ -104838,13 +104836,13 @@
|
|
|
104838
104836
|
return activities;
|
|
104839
104837
|
}
|
|
104840
104838
|
|
|
104841
|
-
/**
|
|
104842
|
-
* Retrieves an option label in the form
|
|
104843
|
-
* a) with name: "my Task (id=Task_1)"
|
|
104844
|
-
* b) without name: "(id=Task_1)"
|
|
104845
|
-
*
|
|
104846
|
-
* @param {ModdleElement} activity
|
|
104847
|
-
* @returns {String}
|
|
104839
|
+
/**
|
|
104840
|
+
* Retrieves an option label in the form
|
|
104841
|
+
* a) with name: "my Task (id=Task_1)"
|
|
104842
|
+
* b) without name: "(id=Task_1)"
|
|
104843
|
+
*
|
|
104844
|
+
* @param {ModdleElement} activity
|
|
104845
|
+
* @returns {String}
|
|
104848
104846
|
*/
|
|
104849
104847
|
function createOptionLabel(activity) {
|
|
104850
104848
|
const {
|
|
@@ -104859,12 +104857,12 @@
|
|
|
104859
104857
|
|
|
104860
104858
|
const DOCUMENTATION_TEXT_FORMAT = 'text/plain';
|
|
104861
104859
|
|
|
104862
|
-
/**
|
|
104863
|
-
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
104860
|
+
/**
|
|
104861
|
+
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
104864
104862
|
*/
|
|
104865
104863
|
|
|
104866
|
-
/**
|
|
104867
|
-
* @returns {Array<Entry>} entries
|
|
104864
|
+
/**
|
|
104865
|
+
* @returns {Array<Entry>} entries
|
|
104868
104866
|
*/
|
|
104869
104867
|
function DocumentationProps(props) {
|
|
104870
104868
|
const {
|
|
@@ -104935,12 +104933,12 @@
|
|
|
104935
104933
|
});
|
|
104936
104934
|
}
|
|
104937
104935
|
|
|
104938
|
-
/**
|
|
104939
|
-
* Retrieves a documentation element from a given moddle element.
|
|
104940
|
-
*
|
|
104941
|
-
* @param {ModdleElement} businessObject
|
|
104942
|
-
*
|
|
104943
|
-
* @returns {ModdleElement} documentation element inside the given moddle element.
|
|
104936
|
+
/**
|
|
104937
|
+
* Retrieves a documentation element from a given moddle element.
|
|
104938
|
+
*
|
|
104939
|
+
* @param {ModdleElement} businessObject
|
|
104940
|
+
*
|
|
104941
|
+
* @returns {ModdleElement} documentation element inside the given moddle element.
|
|
104944
104942
|
*/
|
|
104945
104943
|
function getDocumentation(businessObject) {
|
|
104946
104944
|
return function () {
|
|
@@ -104949,10 +104947,10 @@
|
|
|
104949
104947
|
};
|
|
104950
104948
|
}
|
|
104951
104949
|
|
|
104952
|
-
/**
|
|
104953
|
-
* Sets a documentation element for a given moddle element.
|
|
104954
|
-
*
|
|
104955
|
-
* @param {ModdleElement} businessObject
|
|
104950
|
+
/**
|
|
104951
|
+
* Sets a documentation element for a given moddle element.
|
|
104952
|
+
*
|
|
104953
|
+
* @param {ModdleElement} businessObject
|
|
104956
104954
|
*/
|
|
104957
104955
|
function setDocumentation(element, businessObject, bpmnFactory, commandStack) {
|
|
104958
104956
|
return function (value) {
|
|
@@ -104995,15 +104993,15 @@
|
|
|
104995
104993
|
};
|
|
104996
104994
|
}
|
|
104997
104995
|
|
|
104998
|
-
/**
|
|
104999
|
-
* Create a new element and (optionally) set its parent.
|
|
105000
|
-
*
|
|
105001
|
-
* @param {string} type
|
|
105002
|
-
* @param {Object} properties
|
|
105003
|
-
* @param {import('bpmn-js/lib/model/Types').ModdleElement} parent
|
|
105004
|
-
* @param {import('bpmn-js/lib/features/modeling/BpmnFactory').default} bpmnFactory
|
|
105005
|
-
*
|
|
105006
|
-
* @returns {import('bpmn-js/lib/model/Types').ModdleElement}
|
|
104996
|
+
/**
|
|
104997
|
+
* Create a new element and (optionally) set its parent.
|
|
104998
|
+
*
|
|
104999
|
+
* @param {string} type
|
|
105000
|
+
* @param {Object} properties
|
|
105001
|
+
* @param {import('bpmn-js/lib/model/Types').ModdleElement} parent
|
|
105002
|
+
* @param {import('bpmn-js/lib/features/modeling/BpmnFactory').default} bpmnFactory
|
|
105003
|
+
*
|
|
105004
|
+
* @returns {import('bpmn-js/lib/model/Types').ModdleElement}
|
|
105007
105005
|
*/
|
|
105008
105006
|
function createElement$1(type, properties, parent, bpmnFactory) {
|
|
105009
105007
|
const element = bpmnFactory.create(type, properties);
|
|
@@ -105013,8 +105011,8 @@
|
|
|
105013
105011
|
return element;
|
|
105014
105012
|
}
|
|
105015
105013
|
|
|
105016
|
-
/**
|
|
105017
|
-
* generate a semantic id with given prefix
|
|
105014
|
+
/**
|
|
105015
|
+
* generate a semantic id with given prefix
|
|
105018
105016
|
*/
|
|
105019
105017
|
function nextId$1(prefix) {
|
|
105020
105018
|
const ids = new Ids$1([32, 32, 1]);
|
|
@@ -105043,12 +105041,12 @@
|
|
|
105043
105041
|
const EMPTY_OPTION$4 = '';
|
|
105044
105042
|
const CREATE_NEW_OPTION$4 = 'create-new';
|
|
105045
105043
|
|
|
105046
|
-
/**
|
|
105047
|
-
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
105044
|
+
/**
|
|
105045
|
+
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
105048
105046
|
*/
|
|
105049
105047
|
|
|
105050
|
-
/**
|
|
105051
|
-
* @returns {Array<Entry>} entries
|
|
105048
|
+
/**
|
|
105049
|
+
* @returns {Array<Entry>} entries
|
|
105052
105050
|
*/
|
|
105053
105051
|
function ErrorProps$2(props) {
|
|
105054
105052
|
const {
|
|
@@ -105224,12 +105222,12 @@
|
|
|
105224
105222
|
|
|
105225
105223
|
const CREATE_NEW_OPTION$3 = 'create-new';
|
|
105226
105224
|
|
|
105227
|
-
/**
|
|
105228
|
-
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
105225
|
+
/**
|
|
105226
|
+
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
105229
105227
|
*/
|
|
105230
105228
|
|
|
105231
|
-
/**
|
|
105232
|
-
* @returns {Array<Entry>} entries
|
|
105229
|
+
/**
|
|
105230
|
+
* @returns {Array<Entry>} entries
|
|
105233
105231
|
*/
|
|
105234
105232
|
function EscalationProps$2(props) {
|
|
105235
105233
|
const {
|
|
@@ -105402,12 +105400,12 @@
|
|
|
105402
105400
|
return sortBy(elements, e => (e.name || '').toLowerCase());
|
|
105403
105401
|
}
|
|
105404
105402
|
|
|
105405
|
-
/**
|
|
105406
|
-
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
105403
|
+
/**
|
|
105404
|
+
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
105407
105405
|
*/
|
|
105408
105406
|
|
|
105409
|
-
/**
|
|
105410
|
-
* @returns {Array<Entry>} entries
|
|
105407
|
+
/**
|
|
105408
|
+
* @returns {Array<Entry>} entries
|
|
105411
105409
|
*/
|
|
105412
105410
|
function ExecutableProps(props) {
|
|
105413
105411
|
const {
|
|
@@ -105478,14 +105476,14 @@
|
|
|
105478
105476
|
// for ID validation as per BPMN Schema (QName - Namespace)
|
|
105479
105477
|
const ID_REGEX = /^[a-z_][\w-.]*$/i;
|
|
105480
105478
|
|
|
105481
|
-
/**
|
|
105482
|
-
* checks whether the id value is valid
|
|
105483
|
-
*
|
|
105484
|
-
* @param {ModdleElement} element
|
|
105485
|
-
* @param {String} idValue
|
|
105486
|
-
* @param {Function} translate
|
|
105487
|
-
*
|
|
105488
|
-
* @return {String} error message
|
|
105479
|
+
/**
|
|
105480
|
+
* checks whether the id value is valid
|
|
105481
|
+
*
|
|
105482
|
+
* @param {ModdleElement} element
|
|
105483
|
+
* @param {String} idValue
|
|
105484
|
+
* @param {Function} translate
|
|
105485
|
+
*
|
|
105486
|
+
* @return {String} error message
|
|
105489
105487
|
*/
|
|
105490
105488
|
function isIdValid(element, idValue, translate) {
|
|
105491
105489
|
const assigned = element.$model.ids.assigned(idValue);
|
|
@@ -105513,12 +105511,12 @@
|
|
|
105513
105511
|
return SPACE_REGEX$1.test(value);
|
|
105514
105512
|
}
|
|
105515
105513
|
|
|
105516
|
-
/**
|
|
105517
|
-
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
105514
|
+
/**
|
|
105515
|
+
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
105518
105516
|
*/
|
|
105519
105517
|
|
|
105520
|
-
/**
|
|
105521
|
-
* @returns {Array<Entry>} entries
|
|
105518
|
+
/**
|
|
105519
|
+
* @returns {Array<Entry>} entries
|
|
105522
105520
|
*/
|
|
105523
105521
|
function IdProps$1() {
|
|
105524
105522
|
return [{
|
|
@@ -105560,12 +105558,12 @@
|
|
|
105560
105558
|
});
|
|
105561
105559
|
}
|
|
105562
105560
|
|
|
105563
|
-
/**
|
|
105564
|
-
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
105561
|
+
/**
|
|
105562
|
+
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
105565
105563
|
*/
|
|
105566
105564
|
|
|
105567
|
-
/**
|
|
105568
|
-
* @returns {Array<Entry>} entries
|
|
105565
|
+
/**
|
|
105566
|
+
* @returns {Array<Entry>} entries
|
|
105569
105567
|
*/
|
|
105570
105568
|
function LinkProps(props) {
|
|
105571
105569
|
const {
|
|
@@ -105613,12 +105611,12 @@
|
|
|
105613
105611
|
const EMPTY_OPTION$3 = '';
|
|
105614
105612
|
const CREATE_NEW_OPTION$2 = 'create-new';
|
|
105615
105613
|
|
|
105616
|
-
/**
|
|
105617
|
-
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
105614
|
+
/**
|
|
105615
|
+
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
105618
105616
|
*/
|
|
105619
105617
|
|
|
105620
|
-
/**
|
|
105621
|
-
* @returns {Array<Entry>} entries
|
|
105618
|
+
/**
|
|
105619
|
+
* @returns {Array<Entry>} entries
|
|
105622
105620
|
*/
|
|
105623
105621
|
function MessageProps$1(props) {
|
|
105624
105622
|
const {
|
|
@@ -105761,12 +105759,12 @@
|
|
|
105761
105759
|
return sortBy(elements, e => (e.name || '').toLowerCase());
|
|
105762
105760
|
}
|
|
105763
105761
|
|
|
105764
|
-
/**
|
|
105765
|
-
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
105762
|
+
/**
|
|
105763
|
+
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
105766
105764
|
*/
|
|
105767
105765
|
|
|
105768
|
-
/**
|
|
105769
|
-
* @returns {Array<Entry>} entries
|
|
105766
|
+
/**
|
|
105767
|
+
* @returns {Array<Entry>} entries
|
|
105770
105768
|
*/
|
|
105771
105769
|
function MultiInstanceProps$2(props) {
|
|
105772
105770
|
const {
|
|
@@ -105837,59 +105835,59 @@
|
|
|
105837
105835
|
|
|
105838
105836
|
// generic ///////////////////////////
|
|
105839
105837
|
|
|
105840
|
-
/**
|
|
105841
|
-
* isMultiInstanceSupported - check whether given element supports MultiInstanceLoopCharacteristics.
|
|
105842
|
-
*
|
|
105843
|
-
* @param {djs.model.Base} element
|
|
105844
|
-
* @return {boolean}
|
|
105838
|
+
/**
|
|
105839
|
+
* isMultiInstanceSupported - check whether given element supports MultiInstanceLoopCharacteristics.
|
|
105840
|
+
*
|
|
105841
|
+
* @param {djs.model.Base} element
|
|
105842
|
+
* @return {boolean}
|
|
105845
105843
|
*/
|
|
105846
105844
|
function isMultiInstanceSupported$1(element) {
|
|
105847
105845
|
const loopCharacteristics = getLoopCharacteristics$2(element);
|
|
105848
105846
|
return !!loopCharacteristics && is$5(loopCharacteristics, 'bpmn:MultiInstanceLoopCharacteristics');
|
|
105849
105847
|
}
|
|
105850
105848
|
|
|
105851
|
-
/**
|
|
105852
|
-
* getBody - get the body of a given expression.
|
|
105853
|
-
*
|
|
105854
|
-
* @param {ModdleElement<bpmn:FormalExpression>} expression
|
|
105855
|
-
* @return {string} the body (value) of the expression
|
|
105849
|
+
/**
|
|
105850
|
+
* getBody - get the body of a given expression.
|
|
105851
|
+
*
|
|
105852
|
+
* @param {ModdleElement<bpmn:FormalExpression>} expression
|
|
105853
|
+
* @return {string} the body (value) of the expression
|
|
105856
105854
|
*/
|
|
105857
105855
|
function getBody(expression) {
|
|
105858
105856
|
return expression && expression.get('body');
|
|
105859
105857
|
}
|
|
105860
105858
|
|
|
105861
|
-
/**
|
|
105862
|
-
* getProperty - get a property value of the loop characteristics.
|
|
105863
|
-
*
|
|
105864
|
-
* @param {djs.model.Base} element
|
|
105865
|
-
* @param {string} propertyName
|
|
105866
|
-
*
|
|
105867
|
-
* @return {any} the property value
|
|
105859
|
+
/**
|
|
105860
|
+
* getProperty - get a property value of the loop characteristics.
|
|
105861
|
+
*
|
|
105862
|
+
* @param {djs.model.Base} element
|
|
105863
|
+
* @param {string} propertyName
|
|
105864
|
+
*
|
|
105865
|
+
* @return {any} the property value
|
|
105868
105866
|
*/
|
|
105869
105867
|
function getProperty$2(element, propertyName) {
|
|
105870
105868
|
const loopCharacteristics = getLoopCharacteristics$2(element);
|
|
105871
105869
|
return loopCharacteristics && loopCharacteristics.get(propertyName);
|
|
105872
105870
|
}
|
|
105873
105871
|
|
|
105874
|
-
/**
|
|
105875
|
-
* getLoopCharacteristics - get loopCharacteristics of a given element.
|
|
105876
|
-
*
|
|
105877
|
-
* @param {djs.model.Base} element
|
|
105878
|
-
* @return {ModdleElement<bpmn:MultiInstanceLoopCharacteristics> | undefined}
|
|
105872
|
+
/**
|
|
105873
|
+
* getLoopCharacteristics - get loopCharacteristics of a given element.
|
|
105874
|
+
*
|
|
105875
|
+
* @param {djs.model.Base} element
|
|
105876
|
+
* @return {ModdleElement<bpmn:MultiInstanceLoopCharacteristics> | undefined}
|
|
105879
105877
|
*/
|
|
105880
105878
|
function getLoopCharacteristics$2(element) {
|
|
105881
105879
|
const bo = getBusinessObject$1(element);
|
|
105882
105880
|
return bo.loopCharacteristics;
|
|
105883
105881
|
}
|
|
105884
105882
|
|
|
105885
|
-
/**
|
|
105886
|
-
* createFormalExpression - creates a 'bpmn:FormalExpression' element.
|
|
105887
|
-
*
|
|
105888
|
-
* @param {ModdleElement} parent
|
|
105889
|
-
* @param {string} body
|
|
105890
|
-
* @param {BpmnFactory} bpmnFactory
|
|
105891
|
-
*
|
|
105892
|
-
* @result {ModdleElement<bpmn:FormalExpression>} a formal expression
|
|
105883
|
+
/**
|
|
105884
|
+
* createFormalExpression - creates a 'bpmn:FormalExpression' element.
|
|
105885
|
+
*
|
|
105886
|
+
* @param {ModdleElement} parent
|
|
105887
|
+
* @param {string} body
|
|
105888
|
+
* @param {BpmnFactory} bpmnFactory
|
|
105889
|
+
*
|
|
105890
|
+
* @result {ModdleElement<bpmn:FormalExpression>} a formal expression
|
|
105893
105891
|
*/
|
|
105894
105892
|
function createFormalExpression$1(parent, body, bpmnFactory) {
|
|
105895
105893
|
return createElement$1('bpmn:FormalExpression', {
|
|
@@ -105897,13 +105895,13 @@
|
|
|
105897
105895
|
}, parent, bpmnFactory);
|
|
105898
105896
|
}
|
|
105899
105897
|
|
|
105900
|
-
/**
|
|
105901
|
-
* updateFormalExpression - updates a specific formal expression of the loop characteristics.
|
|
105902
|
-
*
|
|
105903
|
-
* @param {djs.model.Base} element
|
|
105904
|
-
* @param {string} propertyName
|
|
105905
|
-
* @param {string} newValue
|
|
105906
|
-
* @param {BpmnFactory} bpmnFactory
|
|
105898
|
+
/**
|
|
105899
|
+
* updateFormalExpression - updates a specific formal expression of the loop characteristics.
|
|
105900
|
+
*
|
|
105901
|
+
* @param {djs.model.Base} element
|
|
105902
|
+
* @param {string} propertyName
|
|
105903
|
+
* @param {string} newValue
|
|
105904
|
+
* @param {BpmnFactory} bpmnFactory
|
|
105907
105905
|
*/
|
|
105908
105906
|
function updateFormalExpression(element, propertyName, newValue, bpmnFactory) {
|
|
105909
105907
|
const loopCharacteristics = getLoopCharacteristics$2(element);
|
|
@@ -105940,23 +105938,23 @@
|
|
|
105940
105938
|
|
|
105941
105939
|
// loopCardinality
|
|
105942
105940
|
|
|
105943
|
-
/**
|
|
105944
|
-
* getLoopCardinality - get the loop cardinality of the loop characteristics.
|
|
105945
|
-
*
|
|
105946
|
-
* @param {djs.model.Base} element
|
|
105947
|
-
*
|
|
105948
|
-
* @return {ModdleElement<bpmn:FormalExpression>} an expression representing the loop cardinality
|
|
105941
|
+
/**
|
|
105942
|
+
* getLoopCardinality - get the loop cardinality of the loop characteristics.
|
|
105943
|
+
*
|
|
105944
|
+
* @param {djs.model.Base} element
|
|
105945
|
+
*
|
|
105946
|
+
* @return {ModdleElement<bpmn:FormalExpression>} an expression representing the loop cardinality
|
|
105949
105947
|
*/
|
|
105950
105948
|
function getLoopCardinality(element) {
|
|
105951
105949
|
return getProperty$2(element, 'loopCardinality');
|
|
105952
105950
|
}
|
|
105953
105951
|
|
|
105954
|
-
/**
|
|
105955
|
-
* getLoopCardinalityValue - get the loop cardinality value of the loop characteristics.
|
|
105956
|
-
*
|
|
105957
|
-
* @param {djs.model.Base} element
|
|
105958
|
-
*
|
|
105959
|
-
* @return {string} the loop cardinality value
|
|
105952
|
+
/**
|
|
105953
|
+
* getLoopCardinalityValue - get the loop cardinality value of the loop characteristics.
|
|
105954
|
+
*
|
|
105955
|
+
* @param {djs.model.Base} element
|
|
105956
|
+
*
|
|
105957
|
+
* @return {string} the loop cardinality value
|
|
105960
105958
|
*/
|
|
105961
105959
|
function getLoopCardinalityValue(element) {
|
|
105962
105960
|
const loopCardinality = getLoopCardinality(element);
|
|
@@ -105965,35 +105963,35 @@
|
|
|
105965
105963
|
|
|
105966
105964
|
// completionCondition /////////////////////
|
|
105967
105965
|
|
|
105968
|
-
/**
|
|
105969
|
-
* getCompletionCondition - get the completion condition of the loop characteristics.
|
|
105970
|
-
*
|
|
105971
|
-
* @param {djs.model.Base} element
|
|
105972
|
-
*
|
|
105973
|
-
* @return {ModdleElement<bpmn:FormalExpression>} an expression representing the completion condition
|
|
105966
|
+
/**
|
|
105967
|
+
* getCompletionCondition - get the completion condition of the loop characteristics.
|
|
105968
|
+
*
|
|
105969
|
+
* @param {djs.model.Base} element
|
|
105970
|
+
*
|
|
105971
|
+
* @return {ModdleElement<bpmn:FormalExpression>} an expression representing the completion condition
|
|
105974
105972
|
*/
|
|
105975
105973
|
function getCompletionCondition$1(element) {
|
|
105976
105974
|
return getProperty$2(element, 'completionCondition');
|
|
105977
105975
|
}
|
|
105978
105976
|
|
|
105979
|
-
/**
|
|
105980
|
-
* getCompletionConditionValue - get the completion condition value of the loop characteristics.
|
|
105981
|
-
*
|
|
105982
|
-
* @param {djs.model.Base} element
|
|
105983
|
-
*
|
|
105984
|
-
* @return {string} the completion condition value
|
|
105977
|
+
/**
|
|
105978
|
+
* getCompletionConditionValue - get the completion condition value of the loop characteristics.
|
|
105979
|
+
*
|
|
105980
|
+
* @param {djs.model.Base} element
|
|
105981
|
+
*
|
|
105982
|
+
* @return {string} the completion condition value
|
|
105985
105983
|
*/
|
|
105986
105984
|
function getCompletionConditionValue(element) {
|
|
105987
105985
|
const completionCondition = getCompletionCondition$1(element);
|
|
105988
105986
|
return getBody(completionCondition);
|
|
105989
105987
|
}
|
|
105990
105988
|
|
|
105991
|
-
/**
|
|
105992
|
-
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
105989
|
+
/**
|
|
105990
|
+
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
105993
105991
|
*/
|
|
105994
105992
|
|
|
105995
|
-
/**
|
|
105996
|
-
* @returns {Array<Entry>} entries
|
|
105993
|
+
/**
|
|
105994
|
+
* @returns {Array<Entry>} entries
|
|
105997
105995
|
*/
|
|
105998
105996
|
function NameProps(props) {
|
|
105999
105997
|
const {
|
|
@@ -106097,12 +106095,12 @@
|
|
|
106097
106095
|
return categoryValue;
|
|
106098
106096
|
}
|
|
106099
106097
|
|
|
106100
|
-
/**
|
|
106101
|
-
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
106098
|
+
/**
|
|
106099
|
+
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
106102
106100
|
*/
|
|
106103
106101
|
|
|
106104
|
-
/**
|
|
106105
|
-
* @returns {Array<Entry>} entries
|
|
106102
|
+
/**
|
|
106103
|
+
* @returns {Array<Entry>} entries
|
|
106106
106104
|
*/
|
|
106107
106105
|
function ProcessProps$1(props) {
|
|
106108
106106
|
const {
|
|
@@ -106193,15 +106191,15 @@
|
|
|
106193
106191
|
return is$5(element, 'bpmn:Participant') && element.businessObject.get('processRef');
|
|
106194
106192
|
}
|
|
106195
106193
|
|
|
106196
|
-
/**
|
|
106197
|
-
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
106194
|
+
/**
|
|
106195
|
+
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
106198
106196
|
*/
|
|
106199
106197
|
|
|
106200
106198
|
const EMPTY_OPTION$2 = '';
|
|
106201
106199
|
const CREATE_NEW_OPTION$1 = 'create-new';
|
|
106202
106200
|
|
|
106203
|
-
/**
|
|
106204
|
-
* @returns {Entry[]}
|
|
106201
|
+
/**
|
|
106202
|
+
* @returns {Entry[]}
|
|
106205
106203
|
*/
|
|
106206
106204
|
function SignalProps$1(props) {
|
|
106207
106205
|
const {
|
|
@@ -106347,12 +106345,12 @@
|
|
|
106347
106345
|
return isAny$1(element, ['bpmn:StartEvent', 'bpmn:IntermediateCatchEvent', 'bpmn:BoundaryEvent']) && !!getTimerEventDefinition$2(element);
|
|
106348
106346
|
}
|
|
106349
106347
|
|
|
106350
|
-
/**
|
|
106351
|
-
* Get the timer definition type for a given timer event definition.
|
|
106352
|
-
*
|
|
106353
|
-
* @param {ModdleElement<bpmn:TimerEventDefinition>} timer
|
|
106354
|
-
*
|
|
106355
|
-
* @return {string|undefined} the timer definition type
|
|
106348
|
+
/**
|
|
106349
|
+
* Get the timer definition type for a given timer event definition.
|
|
106350
|
+
*
|
|
106351
|
+
* @param {ModdleElement<bpmn:TimerEventDefinition>} timer
|
|
106352
|
+
*
|
|
106353
|
+
* @return {string|undefined} the timer definition type
|
|
106356
106354
|
*/
|
|
106357
106355
|
function getTimerDefinitionType(timer) {
|
|
106358
106356
|
if (!timer) {
|
|
@@ -106422,12 +106420,12 @@
|
|
|
106422
106420
|
return entries;
|
|
106423
106421
|
}
|
|
106424
106422
|
|
|
106425
|
-
/**
|
|
106426
|
-
* TimerEventDefinitionType - Generic select entry allowing to select a specific
|
|
106427
|
-
* timerEventDefintionType. To be used together with timerEventDefinitionValue.
|
|
106428
|
-
*
|
|
106429
|
-
* @param {type} props
|
|
106430
|
-
* @return {SelectEntry}
|
|
106423
|
+
/**
|
|
106424
|
+
* TimerEventDefinitionType - Generic select entry allowing to select a specific
|
|
106425
|
+
* timerEventDefintionType. To be used together with timerEventDefinitionValue.
|
|
106426
|
+
*
|
|
106427
|
+
* @param {type} props
|
|
106428
|
+
* @return {SelectEntry}
|
|
106431
106429
|
*/
|
|
106432
106430
|
function TimerEventDefinitionType$2(props) {
|
|
106433
106431
|
const {
|
|
@@ -106495,13 +106493,13 @@
|
|
|
106495
106493
|
});
|
|
106496
106494
|
}
|
|
106497
106495
|
|
|
106498
|
-
/**
|
|
106499
|
-
* TimerEventDefinitionValue - Generic textField entry allowing to specify the
|
|
106500
|
-
* timerEventDefintionValue based on the set timerEventDefintionType. To be used
|
|
106501
|
-
* together with timerEventDefinitionType.
|
|
106502
|
-
*
|
|
106503
|
-
* @param {type} props
|
|
106504
|
-
* @return {TextFieldEntry}
|
|
106496
|
+
/**
|
|
106497
|
+
* TimerEventDefinitionValue - Generic textField entry allowing to specify the
|
|
106498
|
+
* timerEventDefintionValue based on the set timerEventDefintionType. To be used
|
|
106499
|
+
* together with timerEventDefinitionType.
|
|
106500
|
+
*
|
|
106501
|
+
* @param {type} props
|
|
106502
|
+
* @return {TextFieldEntry}
|
|
106505
106503
|
*/
|
|
106506
106504
|
function TimerEventDefinitionValue$2(props) {
|
|
106507
106505
|
const {
|
|
@@ -106786,12 +106784,12 @@
|
|
|
106786
106784
|
bpmnPropertiesProvider: ['type', BpmnPropertiesProvider]
|
|
106787
106785
|
};
|
|
106788
106786
|
|
|
106789
|
-
/**
|
|
106790
|
-
* Get extension elements of business object. Optionally filter by type.
|
|
106791
|
-
*
|
|
106792
|
-
* @param {ModdleElement} businessObject
|
|
106793
|
-
* @param {string} [type=undefined]
|
|
106794
|
-
* @returns {Array<ModdleElement>}
|
|
106787
|
+
/**
|
|
106788
|
+
* Get extension elements of business object. Optionally filter by type.
|
|
106789
|
+
*
|
|
106790
|
+
* @param {ModdleElement} businessObject
|
|
106791
|
+
* @param {string} [type=undefined]
|
|
106792
|
+
* @returns {Array<ModdleElement>}
|
|
106795
106793
|
*/
|
|
106796
106794
|
function getExtensionElementsList$1(businessObject, type = undefined) {
|
|
106797
106795
|
const extensionElements = businessObject.get('extensionElements');
|
|
@@ -106808,13 +106806,13 @@
|
|
|
106808
106806
|
return values;
|
|
106809
106807
|
}
|
|
106810
106808
|
|
|
106811
|
-
/**
|
|
106812
|
-
* Add one or more extension elements. Create bpmn:ExtensionElements if it doesn't exist.
|
|
106813
|
-
*
|
|
106814
|
-
* @param {ModdleElement} element
|
|
106815
|
-
* @param {ModdleElement} businessObject
|
|
106816
|
-
* @param {ModdleElement|Array<ModdleElement>} extensionElementsToAdd
|
|
106817
|
-
* @param {CommandStack} commandStack
|
|
106809
|
+
/**
|
|
106810
|
+
* Add one or more extension elements. Create bpmn:ExtensionElements if it doesn't exist.
|
|
106811
|
+
*
|
|
106812
|
+
* @param {ModdleElement} element
|
|
106813
|
+
* @param {ModdleElement} businessObject
|
|
106814
|
+
* @param {ModdleElement|Array<ModdleElement>} extensionElementsToAdd
|
|
106815
|
+
* @param {CommandStack} commandStack
|
|
106818
106816
|
*/
|
|
106819
106817
|
function addExtensionElements(element, businessObject, extensionElementToAdd, bpmnFactory, commandStack) {
|
|
106820
106818
|
const commands = [];
|
|
@@ -106852,13 +106850,13 @@
|
|
|
106852
106850
|
commandStack.execute('properties-panel.multi-command-executor', commands);
|
|
106853
106851
|
}
|
|
106854
106852
|
|
|
106855
|
-
/**
|
|
106856
|
-
* Remove one or more extension elements. Remove bpmn:ExtensionElements afterwards if it's empty.
|
|
106857
|
-
*
|
|
106858
|
-
* @param {ModdleElement} element
|
|
106859
|
-
* @param {ModdleElement} businessObject
|
|
106860
|
-
* @param {ModdleElement|Array<ModdleElement>} extensionElementsToRemove
|
|
106861
|
-
* @param {CommandStack} commandStack
|
|
106853
|
+
/**
|
|
106854
|
+
* Remove one or more extension elements. Remove bpmn:ExtensionElements afterwards if it's empty.
|
|
106855
|
+
*
|
|
106856
|
+
* @param {ModdleElement} element
|
|
106857
|
+
* @param {ModdleElement} businessObject
|
|
106858
|
+
* @param {ModdleElement|Array<ModdleElement>} extensionElementsToRemove
|
|
106859
|
+
* @param {CommandStack} commandStack
|
|
106862
106860
|
*/
|
|
106863
106861
|
function removeExtensionElements$1(element, businessObject, extensionElementsToRemove, commandStack) {
|
|
106864
106862
|
if (!isArray$4(extensionElementsToRemove)) {
|
|
@@ -107251,37 +107249,37 @@
|
|
|
107251
107249
|
|
|
107252
107250
|
// helper //////////////////
|
|
107253
107251
|
|
|
107254
|
-
/**
|
|
107255
|
-
* Returns true if the attribute 'camunda:asyncBefore' is set
|
|
107256
|
-
* to true.
|
|
107257
|
-
*
|
|
107258
|
-
* @param {ModdleElement} bo
|
|
107259
|
-
*
|
|
107260
|
-
* @return {boolean} a boolean value
|
|
107252
|
+
/**
|
|
107253
|
+
* Returns true if the attribute 'camunda:asyncBefore' is set
|
|
107254
|
+
* to true.
|
|
107255
|
+
*
|
|
107256
|
+
* @param {ModdleElement} bo
|
|
107257
|
+
*
|
|
107258
|
+
* @return {boolean} a boolean value
|
|
107261
107259
|
*/
|
|
107262
107260
|
function isAsyncBefore$2(bo) {
|
|
107263
107261
|
return !!(bo.get('camunda:asyncBefore') || bo.get('camunda:async'));
|
|
107264
107262
|
}
|
|
107265
107263
|
|
|
107266
|
-
/**
|
|
107267
|
-
* Returns true if the attribute 'camunda:asyncAfter' is set
|
|
107268
|
-
* to true.
|
|
107269
|
-
*
|
|
107270
|
-
* @param {ModdleElement} bo
|
|
107271
|
-
*
|
|
107272
|
-
* @return {boolean} a boolean value
|
|
107264
|
+
/**
|
|
107265
|
+
* Returns true if the attribute 'camunda:asyncAfter' is set
|
|
107266
|
+
* to true.
|
|
107267
|
+
*
|
|
107268
|
+
* @param {ModdleElement} bo
|
|
107269
|
+
*
|
|
107270
|
+
* @return {boolean} a boolean value
|
|
107273
107271
|
*/
|
|
107274
107272
|
function isAsyncAfter$2(bo) {
|
|
107275
107273
|
return !!bo.get('camunda:asyncAfter');
|
|
107276
107274
|
}
|
|
107277
107275
|
|
|
107278
|
-
/**
|
|
107279
|
-
* Returns true if the attribute 'camunda:exclusive' is set
|
|
107280
|
-
* to true.
|
|
107281
|
-
*
|
|
107282
|
-
* @param {ModdleElement} bo
|
|
107283
|
-
*
|
|
107284
|
-
* @return {boolean} a boolean value
|
|
107276
|
+
/**
|
|
107277
|
+
* Returns true if the attribute 'camunda:exclusive' is set
|
|
107278
|
+
* to true.
|
|
107279
|
+
*
|
|
107280
|
+
* @param {ModdleElement} bo
|
|
107281
|
+
*
|
|
107282
|
+
* @return {boolean} a boolean value
|
|
107285
107283
|
*/
|
|
107286
107284
|
function isExclusive$1(bo) {
|
|
107287
107285
|
return !!bo.get('camunda:exclusive');
|
|
@@ -108097,12 +108095,12 @@
|
|
|
108097
108095
|
|
|
108098
108096
|
// helper //////////////////
|
|
108099
108097
|
|
|
108100
|
-
/**
|
|
108101
|
-
* getProcess - get the businessObject of the process referred to by a bpmn:Process
|
|
108102
|
-
* or by a bpmn:Participant
|
|
108103
|
-
*
|
|
108104
|
-
* @param {ModdleElement} element either a bpmn:Process or a bpmn:Participant
|
|
108105
|
-
* @return {BusinessObject}
|
|
108098
|
+
/**
|
|
108099
|
+
* getProcess - get the businessObject of the process referred to by a bpmn:Process
|
|
108100
|
+
* or by a bpmn:Participant
|
|
108101
|
+
*
|
|
108102
|
+
* @param {ModdleElement} element either a bpmn:Process or a bpmn:Participant
|
|
108103
|
+
* @return {BusinessObject}
|
|
108106
108104
|
*/
|
|
108107
108105
|
function getProcess$3(element) {
|
|
108108
108106
|
return is$5(element, 'bpmn:Process') ? getBusinessObject$1(element) : getBusinessObject$1(element).get('processRef');
|
|
@@ -108494,12 +108492,12 @@
|
|
|
108494
108492
|
}
|
|
108495
108493
|
}
|
|
108496
108494
|
|
|
108497
|
-
/**
|
|
108498
|
-
* getConditionExpression - get the body value of a condition expression for a given element
|
|
108499
|
-
*
|
|
108500
|
-
* @param {ModdleElement} element
|
|
108501
|
-
*
|
|
108502
|
-
* @return {string|undefined}
|
|
108495
|
+
/**
|
|
108496
|
+
* getConditionExpression - get the body value of a condition expression for a given element
|
|
108497
|
+
*
|
|
108498
|
+
* @param {ModdleElement} element
|
|
108499
|
+
*
|
|
108500
|
+
* @return {string|undefined}
|
|
108503
108501
|
*/
|
|
108504
108502
|
function getConditionExpression(element) {
|
|
108505
108503
|
const businessObject = getBusinessObject$1(element);
|
|
@@ -108545,8 +108543,8 @@
|
|
|
108545
108543
|
return is$5(parent, 'bpmn:SubProcess') && parent.triggeredByEvent;
|
|
108546
108544
|
}
|
|
108547
108545
|
|
|
108548
|
-
/**
|
|
108549
|
-
* Cf. https://docs.camunda.org/manual/latest/user-guide/process-engine/scripting/
|
|
108546
|
+
/**
|
|
108547
|
+
* Cf. https://docs.camunda.org/manual/latest/user-guide/process-engine/scripting/
|
|
108550
108548
|
*/
|
|
108551
108549
|
function ScriptProps(props) {
|
|
108552
108550
|
const {
|
|
@@ -108774,12 +108772,12 @@
|
|
|
108774
108772
|
return inputOutput && inputOutput.get(prop) || [];
|
|
108775
108773
|
}
|
|
108776
108774
|
|
|
108777
|
-
/**
|
|
108778
|
-
* Get a camunda:inputOutput from the business object
|
|
108779
|
-
*
|
|
108780
|
-
* @param {djs.model.Base | ModdleElement} element
|
|
108781
|
-
*
|
|
108782
|
-
* @return {ModdleElement} the inputOutput object
|
|
108775
|
+
/**
|
|
108776
|
+
* Get a camunda:inputOutput from the business object
|
|
108777
|
+
*
|
|
108778
|
+
* @param {djs.model.Base | ModdleElement} element
|
|
108779
|
+
*
|
|
108780
|
+
* @return {ModdleElement} the inputOutput object
|
|
108783
108781
|
*/
|
|
108784
108782
|
function getInputOutput$1(element) {
|
|
108785
108783
|
if (is$5(element, 'camunda:Connector')) {
|
|
@@ -108789,25 +108787,25 @@
|
|
|
108789
108787
|
return (getElements(businessObject, 'camunda:InputOutput') || [])[0];
|
|
108790
108788
|
}
|
|
108791
108789
|
|
|
108792
|
-
/**
|
|
108793
|
-
* Return all input parameters existing in the business object, and
|
|
108794
|
-
* an empty array if none exist.
|
|
108795
|
-
*
|
|
108796
|
-
* @param {djs.model.Base} element
|
|
108797
|
-
*
|
|
108798
|
-
* @return {Array} a list of input parameter objects
|
|
108790
|
+
/**
|
|
108791
|
+
* Return all input parameters existing in the business object, and
|
|
108792
|
+
* an empty array if none exist.
|
|
108793
|
+
*
|
|
108794
|
+
* @param {djs.model.Base} element
|
|
108795
|
+
*
|
|
108796
|
+
* @return {Array} a list of input parameter objects
|
|
108799
108797
|
*/
|
|
108800
108798
|
function getInputParameters$2(element) {
|
|
108801
108799
|
return getParameters$1(element, 'inputParameters');
|
|
108802
108800
|
}
|
|
108803
108801
|
|
|
108804
|
-
/**
|
|
108805
|
-
* Return all output parameters existing in the business object, and
|
|
108806
|
-
* an empty array if none exist.
|
|
108807
|
-
*
|
|
108808
|
-
* @param {djs.model.Base} element
|
|
108809
|
-
*
|
|
108810
|
-
* @return {Array} a list of output parameter objects
|
|
108802
|
+
/**
|
|
108803
|
+
* Return all output parameters existing in the business object, and
|
|
108804
|
+
* an empty array if none exist.
|
|
108805
|
+
*
|
|
108806
|
+
* @param {djs.model.Base} element
|
|
108807
|
+
*
|
|
108808
|
+
* @return {Array} a list of output parameter objects
|
|
108811
108809
|
*/
|
|
108812
108810
|
function getOutputParameters$2(element) {
|
|
108813
108811
|
return getParameters$1(element, 'outputParameters');
|
|
@@ -109383,47 +109381,47 @@
|
|
|
109383
109381
|
return is$5(parameter, 'camunda:InputParameter');
|
|
109384
109382
|
}
|
|
109385
109383
|
|
|
109386
|
-
/**
|
|
109387
|
-
* Check whether an element is camunda:ServiceTaskLike
|
|
109388
|
-
*
|
|
109389
|
-
* @param {djs.model.Base} element
|
|
109390
|
-
*
|
|
109391
|
-
* @return {boolean} a boolean value
|
|
109384
|
+
/**
|
|
109385
|
+
* Check whether an element is camunda:ServiceTaskLike
|
|
109386
|
+
*
|
|
109387
|
+
* @param {djs.model.Base} element
|
|
109388
|
+
*
|
|
109389
|
+
* @return {boolean} a boolean value
|
|
109392
109390
|
*/
|
|
109393
109391
|
function isServiceTaskLike(element) {
|
|
109394
109392
|
return is$5(element, 'camunda:ServiceTaskLike');
|
|
109395
109393
|
}
|
|
109396
109394
|
|
|
109397
|
-
/**
|
|
109398
|
-
* Returns 'true' if the given element is 'camunda:DmnCapable'
|
|
109399
|
-
*
|
|
109400
|
-
* @param {djs.model.Base} element
|
|
109401
|
-
*
|
|
109402
|
-
* @return {boolean} a boolean value
|
|
109395
|
+
/**
|
|
109396
|
+
* Returns 'true' if the given element is 'camunda:DmnCapable'
|
|
109397
|
+
*
|
|
109398
|
+
* @param {djs.model.Base} element
|
|
109399
|
+
*
|
|
109400
|
+
* @return {boolean} a boolean value
|
|
109403
109401
|
*/
|
|
109404
109402
|
function isDmnCapable(element) {
|
|
109405
109403
|
return is$5(element, 'camunda:DmnCapable');
|
|
109406
109404
|
}
|
|
109407
109405
|
|
|
109408
|
-
/**
|
|
109409
|
-
* Returns 'true' if the given element is 'camunda:ExternalCapable'
|
|
109410
|
-
*
|
|
109411
|
-
* @param {djs.model.Base} element
|
|
109412
|
-
*
|
|
109413
|
-
* @return {boolean} a boolean value
|
|
109406
|
+
/**
|
|
109407
|
+
* Returns 'true' if the given element is 'camunda:ExternalCapable'
|
|
109408
|
+
*
|
|
109409
|
+
* @param {djs.model.Base} element
|
|
109410
|
+
*
|
|
109411
|
+
* @return {boolean} a boolean value
|
|
109414
109412
|
*/
|
|
109415
109413
|
function isExternalCapable(element) {
|
|
109416
109414
|
return is$5(element, 'camunda:ExternalCapable');
|
|
109417
109415
|
}
|
|
109418
109416
|
|
|
109419
|
-
/**
|
|
109420
|
-
* getServiceTaskLikeBusinessObject - Get a 'camunda:ServiceTaskLike' business object.
|
|
109421
|
-
*
|
|
109422
|
-
* If the given element is not a 'camunda:ServiceTaskLike', then 'false'
|
|
109423
|
-
* is returned.
|
|
109424
|
-
*
|
|
109425
|
-
* @param {djs.model.Base} element
|
|
109426
|
-
* @return {ModdleElement} the 'camunda:ServiceTaskLike' business object
|
|
109417
|
+
/**
|
|
109418
|
+
* getServiceTaskLikeBusinessObject - Get a 'camunda:ServiceTaskLike' business object.
|
|
109419
|
+
*
|
|
109420
|
+
* If the given element is not a 'camunda:ServiceTaskLike', then 'false'
|
|
109421
|
+
* is returned.
|
|
109422
|
+
*
|
|
109423
|
+
* @param {djs.model.Base} element
|
|
109424
|
+
* @return {ModdleElement} the 'camunda:ServiceTaskLike' business object
|
|
109427
109425
|
*/
|
|
109428
109426
|
function getServiceTaskLikeBusinessObject(element) {
|
|
109429
109427
|
if (is$5(element, 'bpmn:IntermediateThrowEvent') || is$5(element, 'bpmn:EndEvent')) {
|
|
@@ -109439,22 +109437,22 @@
|
|
|
109439
109437
|
return isServiceTaskLike(element) && getBusinessObject$1(element);
|
|
109440
109438
|
}
|
|
109441
109439
|
|
|
109442
|
-
/**
|
|
109443
|
-
* Returns the implementation type of the given element.
|
|
109444
|
-
*
|
|
109445
|
-
* Possible implementation types are:
|
|
109446
|
-
* - dmn
|
|
109447
|
-
* - connector
|
|
109448
|
-
* - external
|
|
109449
|
-
* - class
|
|
109450
|
-
* - expression
|
|
109451
|
-
* - delegateExpression
|
|
109452
|
-
* - script
|
|
109453
|
-
* - or undefined, when no matching implementation type is found
|
|
109454
|
-
*
|
|
109455
|
-
* @param {djs.model.Base} element
|
|
109456
|
-
*
|
|
109457
|
-
* @return {String} the implementation type
|
|
109440
|
+
/**
|
|
109441
|
+
* Returns the implementation type of the given element.
|
|
109442
|
+
*
|
|
109443
|
+
* Possible implementation types are:
|
|
109444
|
+
* - dmn
|
|
109445
|
+
* - connector
|
|
109446
|
+
* - external
|
|
109447
|
+
* - class
|
|
109448
|
+
* - expression
|
|
109449
|
+
* - delegateExpression
|
|
109450
|
+
* - script
|
|
109451
|
+
* - or undefined, when no matching implementation type is found
|
|
109452
|
+
*
|
|
109453
|
+
* @param {djs.model.Base} element
|
|
109454
|
+
*
|
|
109455
|
+
* @return {String} the implementation type
|
|
109458
109456
|
*/
|
|
109459
109457
|
function getImplementationType(element) {
|
|
109460
109458
|
const businessObject = getListenerBusinessObject(element) || getServiceTaskLikeBusinessObject(element);
|
|
@@ -110162,12 +110160,12 @@
|
|
|
110162
110160
|
return name;
|
|
110163
110161
|
}
|
|
110164
110162
|
|
|
110165
|
-
/**
|
|
110166
|
-
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
110163
|
+
/**
|
|
110164
|
+
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
110167
110165
|
*/
|
|
110168
110166
|
|
|
110169
|
-
/**
|
|
110170
|
-
* @returns {Array<Entry>} entries
|
|
110167
|
+
/**
|
|
110168
|
+
* @returns {Array<Entry>} entries
|
|
110171
110169
|
*/
|
|
110172
110170
|
function EscalationProps(props) {
|
|
110173
110171
|
const {
|
|
@@ -110421,12 +110419,12 @@
|
|
|
110421
110419
|
|
|
110422
110420
|
// helper ///////////////////
|
|
110423
110421
|
|
|
110424
|
-
/**
|
|
110425
|
-
* determineType - get the type of a fieldInjection based on the attributes
|
|
110426
|
-
* set on it
|
|
110427
|
-
*
|
|
110428
|
-
* @param {ModdleElement} field
|
|
110429
|
-
* @return {('string'|'expression')}
|
|
110422
|
+
/**
|
|
110423
|
+
* determineType - get the type of a fieldInjection based on the attributes
|
|
110424
|
+
* set on it
|
|
110425
|
+
*
|
|
110426
|
+
* @param {ModdleElement} field
|
|
110427
|
+
* @return {('string'|'expression')}
|
|
110430
110428
|
*/
|
|
110431
110429
|
function determineType(field) {
|
|
110432
110430
|
// string is the default type
|
|
@@ -112558,8 +112556,8 @@
|
|
|
112558
112556
|
return is$5(element, 'camunda:Initiator') && !is$5(element.parent, 'bpmn:SubProcess');
|
|
112559
112557
|
}
|
|
112560
112558
|
|
|
112561
|
-
/**
|
|
112562
|
-
* Cf. https://docs.camunda.org/manual/7.15/reference/bpmn20/subprocesses/call-activity/#passing-variables
|
|
112559
|
+
/**
|
|
112560
|
+
* Cf. https://docs.camunda.org/manual/7.15/reference/bpmn20/subprocesses/call-activity/#passing-variables
|
|
112563
112561
|
*/
|
|
112564
112562
|
function InMappingPropagationProps(props) {
|
|
112565
112563
|
const {
|
|
@@ -112901,8 +112899,8 @@
|
|
|
112901
112899
|
return inOutType;
|
|
112902
112900
|
}
|
|
112903
112901
|
|
|
112904
|
-
/**
|
|
112905
|
-
* Cf. https://docs.camunda.org/manual/latest/reference/bpmn20/custom-extensions/extension-elements/#in
|
|
112902
|
+
/**
|
|
112903
|
+
* Cf. https://docs.camunda.org/manual/latest/reference/bpmn20/custom-extensions/extension-elements/#in
|
|
112906
112904
|
*/
|
|
112907
112905
|
function InMappingProps({
|
|
112908
112906
|
element,
|
|
@@ -113185,49 +113183,49 @@
|
|
|
113185
113183
|
|
|
113186
113184
|
// helper //////////////////
|
|
113187
113185
|
|
|
113188
|
-
/**
|
|
113189
|
-
* @param {ModdleElement} bo
|
|
113190
|
-
* @return {boolean} a boolean value
|
|
113186
|
+
/**
|
|
113187
|
+
* @param {ModdleElement} bo
|
|
113188
|
+
* @return {boolean} a boolean value
|
|
113191
113189
|
*/
|
|
113192
113190
|
function isAsyncBefore$1$1(bo) {
|
|
113193
113191
|
return !!(bo.get('camunda:asyncBefore') || bo.get('camunda:async'));
|
|
113194
113192
|
}
|
|
113195
113193
|
|
|
113196
|
-
/**
|
|
113197
|
-
* @param {ModdleElement} bo
|
|
113198
|
-
* @return {boolean}
|
|
113194
|
+
/**
|
|
113195
|
+
* @param {ModdleElement} bo
|
|
113196
|
+
* @return {boolean}
|
|
113199
113197
|
*/
|
|
113200
113198
|
function isAsyncAfter$1$1(bo) {
|
|
113201
113199
|
return !!bo.get('camunda:asyncAfter');
|
|
113202
113200
|
}
|
|
113203
113201
|
|
|
113204
|
-
/**
|
|
113205
|
-
* isAsync - returns true if the attribute 'camunda:asyncAfter' or 'camunda:asyncBefore'
|
|
113206
|
-
* is set to true.
|
|
113207
|
-
*
|
|
113208
|
-
* @param {ModdleElement} bo
|
|
113209
|
-
* @return {boolean}
|
|
113202
|
+
/**
|
|
113203
|
+
* isAsync - returns true if the attribute 'camunda:asyncAfter' or 'camunda:asyncBefore'
|
|
113204
|
+
* is set to true.
|
|
113205
|
+
*
|
|
113206
|
+
* @param {ModdleElement} bo
|
|
113207
|
+
* @return {boolean}
|
|
113210
113208
|
*/
|
|
113211
113209
|
function isAsync$1(bo) {
|
|
113212
113210
|
return isAsyncAfter$1$1(bo) || isAsyncBefore$1$1(bo);
|
|
113213
113211
|
}
|
|
113214
113212
|
|
|
113215
|
-
/**
|
|
113216
|
-
* isTimerEvent - returns true if the element is a bpmn:Event with a timerEventDefinition
|
|
113217
|
-
*
|
|
113218
|
-
* @param {ModdleElement} element
|
|
113219
|
-
* @return {boolean}
|
|
113213
|
+
/**
|
|
113214
|
+
* isTimerEvent - returns true if the element is a bpmn:Event with a timerEventDefinition
|
|
113215
|
+
*
|
|
113216
|
+
* @param {ModdleElement} element
|
|
113217
|
+
* @return {boolean}
|
|
113220
113218
|
*/
|
|
113221
113219
|
function isTimerEvent(element) {
|
|
113222
113220
|
return is$5(element, 'bpmn:Event') && getTimerEventDefinition$1(element);
|
|
113223
113221
|
}
|
|
113224
113222
|
|
|
113225
|
-
/**
|
|
113226
|
-
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
113223
|
+
/**
|
|
113224
|
+
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
113227
113225
|
*/
|
|
113228
113226
|
|
|
113229
|
-
/**
|
|
113230
|
-
* @returns {Array<Entry>} entries
|
|
113227
|
+
/**
|
|
113228
|
+
* @returns {Array<Entry>} entries
|
|
113231
113229
|
*/
|
|
113232
113230
|
function MultiInstanceProps(props) {
|
|
113233
113231
|
const {
|
|
@@ -113489,36 +113487,36 @@
|
|
|
113489
113487
|
|
|
113490
113488
|
// generic ///////////////////////////
|
|
113491
113489
|
|
|
113492
|
-
/**
|
|
113493
|
-
* isMultiInstanceSupported - check whether given element supports camunda specific props
|
|
113494
|
-
* for multiInstance (ref. <camunda:Cllectable>).
|
|
113495
|
-
*
|
|
113496
|
-
* @param {djs.model.Base} element
|
|
113497
|
-
* @return {boolean}
|
|
113490
|
+
/**
|
|
113491
|
+
* isMultiInstanceSupported - check whether given element supports camunda specific props
|
|
113492
|
+
* for multiInstance (ref. <camunda:Cllectable>).
|
|
113493
|
+
*
|
|
113494
|
+
* @param {djs.model.Base} element
|
|
113495
|
+
* @return {boolean}
|
|
113498
113496
|
*/
|
|
113499
113497
|
function isMultiInstanceSupported(element) {
|
|
113500
113498
|
const loopCharacteristics = getLoopCharacteristics(element);
|
|
113501
113499
|
return !!loopCharacteristics && is$5(loopCharacteristics, 'camunda:Collectable');
|
|
113502
113500
|
}
|
|
113503
113501
|
|
|
113504
|
-
/**
|
|
113505
|
-
* getProperty - get a property value of the loop characteristics.
|
|
113506
|
-
*
|
|
113507
|
-
* @param {djs.model.Base} element
|
|
113508
|
-
* @param {string} propertyName
|
|
113509
|
-
*
|
|
113510
|
-
* @return {any} the property value
|
|
113502
|
+
/**
|
|
113503
|
+
* getProperty - get a property value of the loop characteristics.
|
|
113504
|
+
*
|
|
113505
|
+
* @param {djs.model.Base} element
|
|
113506
|
+
* @param {string} propertyName
|
|
113507
|
+
*
|
|
113508
|
+
* @return {any} the property value
|
|
113511
113509
|
*/
|
|
113512
113510
|
function getProperty(element, propertyName) {
|
|
113513
113511
|
var loopCharacteristics = getLoopCharacteristics(element);
|
|
113514
113512
|
return loopCharacteristics && loopCharacteristics.get(propertyName);
|
|
113515
113513
|
}
|
|
113516
113514
|
|
|
113517
|
-
/**
|
|
113518
|
-
* getLoopCharacteristics - get loopCharacteristics of a given element.
|
|
113519
|
-
*
|
|
113520
|
-
* @param {djs.model.Base} element
|
|
113521
|
-
* @return {ModdleElement<bpmn:MultiInstanceLoopCharacteristics> | undefined}
|
|
113515
|
+
/**
|
|
113516
|
+
* getLoopCharacteristics - get loopCharacteristics of a given element.
|
|
113517
|
+
*
|
|
113518
|
+
* @param {djs.model.Base} element
|
|
113519
|
+
* @return {ModdleElement<bpmn:MultiInstanceLoopCharacteristics> | undefined}
|
|
113522
113520
|
*/
|
|
113523
113521
|
function getLoopCharacteristics(element) {
|
|
113524
113522
|
const bo = getBusinessObject$1(element);
|
|
@@ -113527,12 +113525,12 @@
|
|
|
113527
113525
|
|
|
113528
113526
|
// collection
|
|
113529
113527
|
|
|
113530
|
-
/**
|
|
113531
|
-
* getCollection - get the 'camunda:collection' attribute value of the loop characteristics.
|
|
113532
|
-
*
|
|
113533
|
-
* @param {djs.model.Base} element
|
|
113534
|
-
*
|
|
113535
|
-
* @return {string} the 'camunda:collection' value
|
|
113528
|
+
/**
|
|
113529
|
+
* getCollection - get the 'camunda:collection' attribute value of the loop characteristics.
|
|
113530
|
+
*
|
|
113531
|
+
* @param {djs.model.Base} element
|
|
113532
|
+
*
|
|
113533
|
+
* @return {string} the 'camunda:collection' value
|
|
113536
113534
|
*/
|
|
113537
113535
|
function getCollection(element) {
|
|
113538
113536
|
return getProperty(element, 'camunda:collection');
|
|
@@ -113540,12 +113538,12 @@
|
|
|
113540
113538
|
|
|
113541
113539
|
// elementVariable
|
|
113542
113540
|
|
|
113543
|
-
/**
|
|
113544
|
-
* getElementVariable - get the 'camunda:elementVariable' attribute value of the loop characteristics.
|
|
113545
|
-
*
|
|
113546
|
-
* @param {djs.model.Base} element
|
|
113547
|
-
*
|
|
113548
|
-
* @return {string} the 'camunda:elementVariable' value
|
|
113541
|
+
/**
|
|
113542
|
+
* getElementVariable - get the 'camunda:elementVariable' attribute value of the loop characteristics.
|
|
113543
|
+
*
|
|
113544
|
+
* @param {djs.model.Base} element
|
|
113545
|
+
*
|
|
113546
|
+
* @return {string} the 'camunda:elementVariable' value
|
|
113549
113547
|
*/
|
|
113550
113548
|
function getElementVariable(element) {
|
|
113551
113549
|
return getProperty(element, 'camunda:elementVariable');
|
|
@@ -113553,48 +113551,48 @@
|
|
|
113553
113551
|
|
|
113554
113552
|
// asyncBefore asyncAfter
|
|
113555
113553
|
|
|
113556
|
-
/**
|
|
113557
|
-
* Returns true if the attribute 'camunda:asyncBefore' is set
|
|
113558
|
-
* to true.
|
|
113559
|
-
*
|
|
113560
|
-
* @param {ModdleElement} bo
|
|
113561
|
-
*
|
|
113562
|
-
* @return {boolean} a boolean value
|
|
113554
|
+
/**
|
|
113555
|
+
* Returns true if the attribute 'camunda:asyncBefore' is set
|
|
113556
|
+
* to true.
|
|
113557
|
+
*
|
|
113558
|
+
* @param {ModdleElement} bo
|
|
113559
|
+
*
|
|
113560
|
+
* @return {boolean} a boolean value
|
|
113563
113561
|
*/
|
|
113564
113562
|
function isAsyncBefore$3(bo) {
|
|
113565
113563
|
return !!(bo.get('camunda:asyncBefore') || bo.get('camunda:async'));
|
|
113566
113564
|
}
|
|
113567
113565
|
|
|
113568
|
-
/**
|
|
113569
|
-
* Returns true if the attribute 'camunda:asyncAfter' is set
|
|
113570
|
-
* to true.
|
|
113571
|
-
*
|
|
113572
|
-
* @param {ModdleElement} bo
|
|
113573
|
-
*
|
|
113574
|
-
* @return {boolean} a boolean value
|
|
113566
|
+
/**
|
|
113567
|
+
* Returns true if the attribute 'camunda:asyncAfter' is set
|
|
113568
|
+
* to true.
|
|
113569
|
+
*
|
|
113570
|
+
* @param {ModdleElement} bo
|
|
113571
|
+
*
|
|
113572
|
+
* @return {boolean} a boolean value
|
|
113575
113573
|
*/
|
|
113576
113574
|
function isAsyncAfter$3(bo) {
|
|
113577
113575
|
return !!bo.get('camunda:asyncAfter');
|
|
113578
113576
|
}
|
|
113579
113577
|
|
|
113580
|
-
/**
|
|
113581
|
-
* Returns true if the attribute 'camunda:exclusive' is set
|
|
113582
|
-
* to true.
|
|
113583
|
-
*
|
|
113584
|
-
* @param {ModdleElement} bo
|
|
113585
|
-
*
|
|
113586
|
-
* @return {boolean} a boolean value
|
|
113578
|
+
/**
|
|
113579
|
+
* Returns true if the attribute 'camunda:exclusive' is set
|
|
113580
|
+
* to true.
|
|
113581
|
+
*
|
|
113582
|
+
* @param {ModdleElement} bo
|
|
113583
|
+
*
|
|
113584
|
+
* @return {boolean} a boolean value
|
|
113587
113585
|
*/
|
|
113588
113586
|
function isExclusive$2(bo) {
|
|
113589
113587
|
return !!bo.get('camunda:exclusive');
|
|
113590
113588
|
}
|
|
113591
113589
|
|
|
113592
|
-
/**
|
|
113593
|
-
* isAsync - returns true if the attribute 'camunda:asyncAfter' or 'camunda:asyncBefore'
|
|
113594
|
-
* is set to true.
|
|
113595
|
-
*
|
|
113596
|
-
* @param {ModdleElement} bo
|
|
113597
|
-
* @return {boolean}
|
|
113590
|
+
/**
|
|
113591
|
+
* isAsync - returns true if the attribute 'camunda:asyncAfter' or 'camunda:asyncBefore'
|
|
113592
|
+
* is set to true.
|
|
113593
|
+
*
|
|
113594
|
+
* @param {ModdleElement} bo
|
|
113595
|
+
* @return {boolean}
|
|
113598
113596
|
*/
|
|
113599
113597
|
function isAsync(bo) {
|
|
113600
113598
|
return isAsyncAfter$3(bo) || isAsyncBefore$3(bo);
|
|
@@ -113606,8 +113604,8 @@
|
|
|
113606
113604
|
return node && !node.checked;
|
|
113607
113605
|
}
|
|
113608
113606
|
|
|
113609
|
-
/**
|
|
113610
|
-
* Cf. https://docs.camunda.org/manual/7.15/reference/bpmn20/subprocesses/call-activity/#passing-variables
|
|
113607
|
+
/**
|
|
113608
|
+
* Cf. https://docs.camunda.org/manual/7.15/reference/bpmn20/subprocesses/call-activity/#passing-variables
|
|
113611
113609
|
*/
|
|
113612
113610
|
function OutMappingPropagationProps(props) {
|
|
113613
113611
|
const {
|
|
@@ -113715,8 +113713,8 @@
|
|
|
113715
113713
|
return !!mappings.length;
|
|
113716
113714
|
}
|
|
113717
113715
|
|
|
113718
|
-
/**
|
|
113719
|
-
* Cf. https://docs.camunda.org/manual/latest/reference/bpmn20/custom-extensions/extension-elements/#out
|
|
113716
|
+
/**
|
|
113717
|
+
* Cf. https://docs.camunda.org/manual/latest/reference/bpmn20/custom-extensions/extension-elements/#out
|
|
113720
113718
|
*/
|
|
113721
113719
|
function OutMappingProps({
|
|
113722
113720
|
element,
|
|
@@ -113907,12 +113905,12 @@
|
|
|
113907
113905
|
return entries;
|
|
113908
113906
|
}
|
|
113909
113907
|
|
|
113910
|
-
/**
|
|
113911
|
-
* TimerEventDefinitionType - Generic select entry allowing to select a specific
|
|
113912
|
-
* timerEventDefintionType. To be used together with timerEventDefinitionValue.
|
|
113913
|
-
*
|
|
113914
|
-
* @param {type} props
|
|
113915
|
-
* @return {SelectEntry}
|
|
113908
|
+
/**
|
|
113909
|
+
* TimerEventDefinitionType - Generic select entry allowing to select a specific
|
|
113910
|
+
* timerEventDefintionType. To be used together with timerEventDefinitionValue.
|
|
113911
|
+
*
|
|
113912
|
+
* @param {type} props
|
|
113913
|
+
* @return {SelectEntry}
|
|
113916
113914
|
*/
|
|
113917
113915
|
function TimerEventDefinitionType(props) {
|
|
113918
113916
|
const {
|
|
@@ -113980,13 +113978,13 @@
|
|
|
113980
113978
|
});
|
|
113981
113979
|
}
|
|
113982
113980
|
|
|
113983
|
-
/**
|
|
113984
|
-
* TimerEventDefinitionValue - Generic textField entry allowing to specify the
|
|
113985
|
-
* timerEventDefintionValue based on the set timerEventDefintionType. To be used
|
|
113986
|
-
* together with timerEventDefinitionType.
|
|
113987
|
-
*
|
|
113988
|
-
* @param {type} props
|
|
113989
|
-
* @return {TextFieldEntry}
|
|
113981
|
+
/**
|
|
113982
|
+
* TimerEventDefinitionValue - Generic textField entry allowing to specify the
|
|
113983
|
+
* timerEventDefintionValue based on the set timerEventDefintionType. To be used
|
|
113984
|
+
* together with timerEventDefinitionType.
|
|
113985
|
+
*
|
|
113986
|
+
* @param {type} props
|
|
113987
|
+
* @return {TextFieldEntry}
|
|
113990
113988
|
*/
|
|
113991
113989
|
function TimerEventDefinitionValue(props) {
|
|
113992
113990
|
const {
|
|
@@ -114148,8 +114146,8 @@
|
|
|
114148
114146
|
timeout: 'Timeout'
|
|
114149
114147
|
};
|
|
114150
114148
|
|
|
114151
|
-
/**
|
|
114152
|
-
* Cf. https://docs.camunda.org/manual/latest/user-guide/process-engine/delegation-code/#execution-listener
|
|
114149
|
+
/**
|
|
114150
|
+
* Cf. https://docs.camunda.org/manual/latest/user-guide/process-engine/delegation-code/#execution-listener
|
|
114153
114151
|
*/
|
|
114154
114152
|
function ExecutionListenerProps({
|
|
114155
114153
|
element,
|
|
@@ -114561,11 +114559,11 @@
|
|
|
114561
114559
|
|
|
114562
114560
|
// helper
|
|
114563
114561
|
|
|
114564
|
-
/**
|
|
114565
|
-
* Get a readable label for a listener.
|
|
114566
|
-
*
|
|
114567
|
-
* @param {ModdleElement} listener
|
|
114568
|
-
* @param {string => string} [translate]
|
|
114562
|
+
/**
|
|
114563
|
+
* Get a readable label for a listener.
|
|
114564
|
+
*
|
|
114565
|
+
* @param {ModdleElement} listener
|
|
114566
|
+
* @param {string => string} [translate]
|
|
114569
114567
|
*/
|
|
114570
114568
|
function getListenerLabel(listener, translate = value => value) {
|
|
114571
114569
|
const event = listener.get('event');
|
|
@@ -114912,8 +114910,8 @@
|
|
|
114912
114910
|
return is$5(element, 'bpmn:Process') ? getBusinessObject$1(element) : getBusinessObject$1(element).get('processRef');
|
|
114913
114911
|
}
|
|
114914
114912
|
|
|
114915
|
-
/**
|
|
114916
|
-
* Cf. https://docs.camunda.org/manual/latest/reference/bpmn20/tasks/user-task/
|
|
114913
|
+
/**
|
|
114914
|
+
* Cf. https://docs.camunda.org/manual/latest/reference/bpmn20/tasks/user-task/
|
|
114917
114915
|
*/
|
|
114918
114916
|
function UserAssignmentProps(props) {
|
|
114919
114917
|
const {
|
|
@@ -115175,12 +115173,12 @@
|
|
|
115175
115173
|
return is$5(element, 'bpmn:Process') ? getBusinessObject$1(element) : getBusinessObject$1(element).get('processRef');
|
|
115176
115174
|
}
|
|
115177
115175
|
|
|
115178
|
-
/**
|
|
115179
|
-
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
115176
|
+
/**
|
|
115177
|
+
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
115180
115178
|
*/
|
|
115181
115179
|
|
|
115182
|
-
/**
|
|
115183
|
-
* @returns {Array<Entry>} entries
|
|
115180
|
+
/**
|
|
115181
|
+
* @returns {Array<Entry>} entries
|
|
115184
115182
|
*/
|
|
115185
115183
|
function IdProps() {
|
|
115186
115184
|
return [{
|
|
@@ -115224,12 +115222,12 @@
|
|
|
115224
115222
|
});
|
|
115225
115223
|
}
|
|
115226
115224
|
|
|
115227
|
-
/**
|
|
115228
|
-
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
115225
|
+
/**
|
|
115226
|
+
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
115229
115227
|
*/
|
|
115230
115228
|
|
|
115231
|
-
/**
|
|
115232
|
-
* @returns {Array<Entry>} entries
|
|
115229
|
+
/**
|
|
115230
|
+
* @returns {Array<Entry>} entries
|
|
115233
115231
|
*/
|
|
115234
115232
|
function ProcessProps(props) {
|
|
115235
115233
|
const {
|
|
@@ -115292,30 +115290,30 @@
|
|
|
115292
115290
|
const LOW_PRIORITY$4 = 500;
|
|
115293
115291
|
const CAMUNDA_PLATFORM_GROUPS = [HistoryCleanupGroup, TasklistGroup, CandidateStarterGroup, ImplementationGroup, ExternalTaskGroup, ProcessVariablesGroup, ErrorsGroup, UserAssignmentGroup, FormGroup, FormDataGroup, TaskListenerGroup, StartInitiatorGroup, ScriptGroup, ConditionGroup, CallActivityGroup, AsynchronousContinuationsGroup, JobExecutionGroup, InMappingPropagationGroup, InMappingGroup, InputGroup, ConnectorInputGroup, OutMappingPropagationGroup, OutMappingGroup, OutputGroup, ConnectorOutputGroup, ExecutionListenerGroup, ExtensionPropertiesGroup, FieldInjectionGroup, BusinessKeyGroup];
|
|
115294
115292
|
|
|
115295
|
-
/**
|
|
115296
|
-
* Provides `camunda` namespace properties.
|
|
115297
|
-
*
|
|
115298
|
-
* @example
|
|
115299
|
-
* ```javascript
|
|
115300
|
-
* import BpmnModeler from 'bpmn-js/lib/Modeler';
|
|
115301
|
-
* import {
|
|
115302
|
-
* BpmnPropertiesPanelModule,
|
|
115303
|
-
* BpmnPropertiesProviderModule,
|
|
115304
|
-
* CamundaPlatformPropertiesProviderModule
|
|
115305
|
-
* } from 'bpmn-js-properties-panel';
|
|
115306
|
-
*
|
|
115307
|
-
* const modeler = new BpmnModeler({
|
|
115308
|
-
* container: '#canvas',
|
|
115309
|
-
* propertiesPanel: {
|
|
115310
|
-
* parent: '#properties'
|
|
115311
|
-
* },
|
|
115312
|
-
* additionalModules: [
|
|
115313
|
-
* BpmnPropertiesPanelModule,
|
|
115314
|
-
* BpmnPropertiesProviderModule,
|
|
115315
|
-
* CamundaPlatformPropertiesProviderModule
|
|
115316
|
-
* ]
|
|
115317
|
-
* });
|
|
115318
|
-
* ```
|
|
115293
|
+
/**
|
|
115294
|
+
* Provides `camunda` namespace properties.
|
|
115295
|
+
*
|
|
115296
|
+
* @example
|
|
115297
|
+
* ```javascript
|
|
115298
|
+
* import BpmnModeler from 'bpmn-js/lib/Modeler';
|
|
115299
|
+
* import {
|
|
115300
|
+
* BpmnPropertiesPanelModule,
|
|
115301
|
+
* BpmnPropertiesProviderModule,
|
|
115302
|
+
* CamundaPlatformPropertiesProviderModule
|
|
115303
|
+
* } from 'bpmn-js-properties-panel';
|
|
115304
|
+
*
|
|
115305
|
+
* const modeler = new BpmnModeler({
|
|
115306
|
+
* container: '#canvas',
|
|
115307
|
+
* propertiesPanel: {
|
|
115308
|
+
* parent: '#properties'
|
|
115309
|
+
* },
|
|
115310
|
+
* additionalModules: [
|
|
115311
|
+
* BpmnPropertiesPanelModule,
|
|
115312
|
+
* BpmnPropertiesProviderModule,
|
|
115313
|
+
* CamundaPlatformPropertiesProviderModule
|
|
115314
|
+
* ]
|
|
115315
|
+
* });
|
|
115316
|
+
* ```
|
|
115319
115317
|
*/
|
|
115320
115318
|
class CamundaPlatformPropertiesProvider {
|
|
115321
115319
|
constructor(propertiesPanel, injector) {
|
|
@@ -115348,8 +115346,8 @@
|
|
|
115348
115346
|
}
|
|
115349
115347
|
CamundaPlatformPropertiesProvider.$inject = ['propertiesPanel', 'injector'];
|
|
115350
115348
|
|
|
115351
|
-
/**
|
|
115352
|
-
* This ensures the <Implementation> group always locates after <Documentation>
|
|
115349
|
+
/**
|
|
115350
|
+
* This ensures the <Implementation> group always locates after <Documentation>
|
|
115353
115351
|
*/
|
|
115354
115352
|
function moveImplementationGroup(groups) {
|
|
115355
115353
|
const documentationGroupIdx = findGroupIndex(groups, 'documentation');
|
|
@@ -115972,1035 +115970,1035 @@
|
|
|
115972
115970
|
Modeler$1.prototype._extensionModules
|
|
115973
115971
|
);
|
|
115974
115972
|
|
|
115975
|
-
const WILDCARD = '*';
|
|
115976
|
-
|
|
115977
|
-
|
|
115978
|
-
class CopyPasteBehavior {
|
|
115979
|
-
constructor(eventBus) {
|
|
115980
|
-
eventBus.on('moddleCopy.canCopyProperty', (context) => {
|
|
115981
|
-
const {
|
|
115982
|
-
parent,
|
|
115983
|
-
property
|
|
115984
|
-
} = context;
|
|
115985
|
-
|
|
115986
|
-
return this.canCopyProperty(property, parent);
|
|
115987
|
-
});
|
|
115988
|
-
}
|
|
115989
|
-
|
|
115990
|
-
/**
|
|
115991
|
-
* Check wether to disallow copying property.
|
|
115992
|
-
*/
|
|
115993
|
-
canCopyProperty(property, parent) {
|
|
115994
|
-
|
|
115995
|
-
// (1) check wether property is allowed in parent
|
|
115996
|
-
if (isObject$1(property) && !isAllowedInParent(property, parent)) {
|
|
115997
|
-
|
|
115998
|
-
return false;
|
|
115999
|
-
}
|
|
116000
|
-
|
|
116001
|
-
// (2) check more complex scenarios
|
|
116002
|
-
if (is$5(property, 'camunda:InputOutput') && !this.canHostInputOutput(parent)) {
|
|
116003
|
-
return false;
|
|
116004
|
-
}
|
|
116005
|
-
|
|
116006
|
-
if (isAny$1(property, [ 'camunda:Connector', 'camunda:Field' ]) && !this.canHostConnector(parent)) {
|
|
116007
|
-
return false;
|
|
116008
|
-
}
|
|
116009
|
-
|
|
116010
|
-
if (is$5(property, 'camunda:In') && !this.canHostIn(parent)) {
|
|
116011
|
-
return false;
|
|
116012
|
-
}
|
|
116013
|
-
}
|
|
116014
|
-
|
|
116015
|
-
canHostInputOutput(parent) {
|
|
116016
|
-
|
|
116017
|
-
// allowed in camunda:Connector
|
|
116018
|
-
const connector = getParent(parent, 'camunda:Connector');
|
|
116019
|
-
|
|
116020
|
-
if (connector) {
|
|
116021
|
-
return true;
|
|
116022
|
-
}
|
|
116023
|
-
|
|
116024
|
-
// special rules inside bpmn:FlowNode
|
|
116025
|
-
const flowNode = getParent(parent, 'bpmn:FlowNode');
|
|
116026
|
-
|
|
116027
|
-
if (!flowNode) {
|
|
116028
|
-
return false;
|
|
116029
|
-
}
|
|
116030
|
-
|
|
116031
|
-
if (isAny$1(flowNode, [ 'bpmn:StartEvent', 'bpmn:Gateway', 'bpmn:BoundaryEvent' ])) {
|
|
116032
|
-
return false;
|
|
116033
|
-
}
|
|
116034
|
-
|
|
116035
|
-
if (is$5(flowNode, 'bpmn:SubProcess') && flowNode.get('triggeredByEvent')) {
|
|
116036
|
-
return false;
|
|
116037
|
-
}
|
|
116038
|
-
|
|
116039
|
-
return true;
|
|
116040
|
-
}
|
|
116041
|
-
|
|
116042
|
-
canHostConnector(parent) {
|
|
116043
|
-
const serviceTaskLike = getParent(parent, 'camunda:ServiceTaskLike');
|
|
116044
|
-
|
|
116045
|
-
if (is$5(serviceTaskLike, 'bpmn:MessageEventDefinition')) {
|
|
116046
|
-
|
|
116047
|
-
// only allow on throw and end events
|
|
116048
|
-
return (
|
|
116049
|
-
getParent(parent, 'bpmn:IntermediateThrowEvent')
|
|
116050
|
-
|| getParent(parent, 'bpmn:EndEvent')
|
|
116051
|
-
);
|
|
116052
|
-
}
|
|
116053
|
-
|
|
116054
|
-
return true;
|
|
116055
|
-
}
|
|
116056
|
-
|
|
116057
|
-
canHostIn(parent) {
|
|
116058
|
-
const callActivity = getParent(parent, 'bpmn:CallActivity');
|
|
116059
|
-
|
|
116060
|
-
if (callActivity) {
|
|
116061
|
-
return true;
|
|
116062
|
-
}
|
|
116063
|
-
|
|
116064
|
-
const signalEventDefinition = getParent(parent, 'bpmn:SignalEventDefinition');
|
|
116065
|
-
|
|
116066
|
-
if (signalEventDefinition) {
|
|
116067
|
-
|
|
116068
|
-
// only allow on throw and end events
|
|
116069
|
-
return (
|
|
116070
|
-
getParent(parent, 'bpmn:IntermediateThrowEvent')
|
|
116071
|
-
|| getParent(parent, 'bpmn:EndEvent')
|
|
116072
|
-
);
|
|
116073
|
-
}
|
|
116074
|
-
|
|
116075
|
-
return true;
|
|
116076
|
-
}
|
|
116077
|
-
}
|
|
116078
|
-
|
|
116079
|
-
CopyPasteBehavior.$inject = [ 'eventBus' ];
|
|
116080
|
-
|
|
116081
|
-
|
|
116082
|
-
// helpers //////////
|
|
116083
|
-
|
|
116084
|
-
function getParent(element, type) {
|
|
116085
|
-
if (!type) {
|
|
116086
|
-
return element.$parent;
|
|
116087
|
-
}
|
|
116088
|
-
|
|
116089
|
-
if (is$5(element, type)) {
|
|
116090
|
-
return element;
|
|
116091
|
-
}
|
|
116092
|
-
|
|
116093
|
-
if (!element.$parent) {
|
|
116094
|
-
return;
|
|
116095
|
-
}
|
|
116096
|
-
|
|
116097
|
-
return getParent(element.$parent, type);
|
|
116098
|
-
}
|
|
116099
|
-
|
|
116100
|
-
function isAllowedInParent(property, parent) {
|
|
116101
|
-
|
|
116102
|
-
// (1) find property descriptor
|
|
116103
|
-
var descriptor = property.$type && property.$model.getTypeDescriptor(property.$type);
|
|
116104
|
-
|
|
116105
|
-
var allowedIn = descriptor && descriptor.meta && descriptor.meta.allowedIn;
|
|
116106
|
-
|
|
116107
|
-
if (!allowedIn || isWildcard(allowedIn)) {
|
|
116108
|
-
return true;
|
|
116109
|
-
}
|
|
116110
|
-
|
|
116111
|
-
// (2) check wether property has parent of allowed type
|
|
116112
|
-
return some$1(allowedIn, function(type) {
|
|
116113
|
-
return getParent(parent, type);
|
|
116114
|
-
});
|
|
116115
|
-
}
|
|
116116
|
-
|
|
116117
|
-
function isWildcard(allowedIn) {
|
|
116118
|
-
return allowedIn.includes(WILDCARD);
|
|
115973
|
+
const WILDCARD = '*';
|
|
115974
|
+
|
|
115975
|
+
|
|
115976
|
+
class CopyPasteBehavior {
|
|
115977
|
+
constructor(eventBus) {
|
|
115978
|
+
eventBus.on('moddleCopy.canCopyProperty', (context) => {
|
|
115979
|
+
const {
|
|
115980
|
+
parent,
|
|
115981
|
+
property
|
|
115982
|
+
} = context;
|
|
115983
|
+
|
|
115984
|
+
return this.canCopyProperty(property, parent);
|
|
115985
|
+
});
|
|
115986
|
+
}
|
|
115987
|
+
|
|
115988
|
+
/**
|
|
115989
|
+
* Check wether to disallow copying property.
|
|
115990
|
+
*/
|
|
115991
|
+
canCopyProperty(property, parent) {
|
|
115992
|
+
|
|
115993
|
+
// (1) check wether property is allowed in parent
|
|
115994
|
+
if (isObject$1(property) && !isAllowedInParent(property, parent)) {
|
|
115995
|
+
|
|
115996
|
+
return false;
|
|
115997
|
+
}
|
|
115998
|
+
|
|
115999
|
+
// (2) check more complex scenarios
|
|
116000
|
+
if (is$5(property, 'camunda:InputOutput') && !this.canHostInputOutput(parent)) {
|
|
116001
|
+
return false;
|
|
116002
|
+
}
|
|
116003
|
+
|
|
116004
|
+
if (isAny$1(property, [ 'camunda:Connector', 'camunda:Field' ]) && !this.canHostConnector(parent)) {
|
|
116005
|
+
return false;
|
|
116006
|
+
}
|
|
116007
|
+
|
|
116008
|
+
if (is$5(property, 'camunda:In') && !this.canHostIn(parent)) {
|
|
116009
|
+
return false;
|
|
116010
|
+
}
|
|
116011
|
+
}
|
|
116012
|
+
|
|
116013
|
+
canHostInputOutput(parent) {
|
|
116014
|
+
|
|
116015
|
+
// allowed in camunda:Connector
|
|
116016
|
+
const connector = getParent(parent, 'camunda:Connector');
|
|
116017
|
+
|
|
116018
|
+
if (connector) {
|
|
116019
|
+
return true;
|
|
116020
|
+
}
|
|
116021
|
+
|
|
116022
|
+
// special rules inside bpmn:FlowNode
|
|
116023
|
+
const flowNode = getParent(parent, 'bpmn:FlowNode');
|
|
116024
|
+
|
|
116025
|
+
if (!flowNode) {
|
|
116026
|
+
return false;
|
|
116027
|
+
}
|
|
116028
|
+
|
|
116029
|
+
if (isAny$1(flowNode, [ 'bpmn:StartEvent', 'bpmn:Gateway', 'bpmn:BoundaryEvent' ])) {
|
|
116030
|
+
return false;
|
|
116031
|
+
}
|
|
116032
|
+
|
|
116033
|
+
if (is$5(flowNode, 'bpmn:SubProcess') && flowNode.get('triggeredByEvent')) {
|
|
116034
|
+
return false;
|
|
116035
|
+
}
|
|
116036
|
+
|
|
116037
|
+
return true;
|
|
116038
|
+
}
|
|
116039
|
+
|
|
116040
|
+
canHostConnector(parent) {
|
|
116041
|
+
const serviceTaskLike = getParent(parent, 'camunda:ServiceTaskLike');
|
|
116042
|
+
|
|
116043
|
+
if (is$5(serviceTaskLike, 'bpmn:MessageEventDefinition')) {
|
|
116044
|
+
|
|
116045
|
+
// only allow on throw and end events
|
|
116046
|
+
return (
|
|
116047
|
+
getParent(parent, 'bpmn:IntermediateThrowEvent')
|
|
116048
|
+
|| getParent(parent, 'bpmn:EndEvent')
|
|
116049
|
+
);
|
|
116050
|
+
}
|
|
116051
|
+
|
|
116052
|
+
return true;
|
|
116053
|
+
}
|
|
116054
|
+
|
|
116055
|
+
canHostIn(parent) {
|
|
116056
|
+
const callActivity = getParent(parent, 'bpmn:CallActivity');
|
|
116057
|
+
|
|
116058
|
+
if (callActivity) {
|
|
116059
|
+
return true;
|
|
116060
|
+
}
|
|
116061
|
+
|
|
116062
|
+
const signalEventDefinition = getParent(parent, 'bpmn:SignalEventDefinition');
|
|
116063
|
+
|
|
116064
|
+
if (signalEventDefinition) {
|
|
116065
|
+
|
|
116066
|
+
// only allow on throw and end events
|
|
116067
|
+
return (
|
|
116068
|
+
getParent(parent, 'bpmn:IntermediateThrowEvent')
|
|
116069
|
+
|| getParent(parent, 'bpmn:EndEvent')
|
|
116070
|
+
);
|
|
116071
|
+
}
|
|
116072
|
+
|
|
116073
|
+
return true;
|
|
116074
|
+
}
|
|
116075
|
+
}
|
|
116076
|
+
|
|
116077
|
+
CopyPasteBehavior.$inject = [ 'eventBus' ];
|
|
116078
|
+
|
|
116079
|
+
|
|
116080
|
+
// helpers //////////
|
|
116081
|
+
|
|
116082
|
+
function getParent(element, type) {
|
|
116083
|
+
if (!type) {
|
|
116084
|
+
return element.$parent;
|
|
116085
|
+
}
|
|
116086
|
+
|
|
116087
|
+
if (is$5(element, type)) {
|
|
116088
|
+
return element;
|
|
116089
|
+
}
|
|
116090
|
+
|
|
116091
|
+
if (!element.$parent) {
|
|
116092
|
+
return;
|
|
116093
|
+
}
|
|
116094
|
+
|
|
116095
|
+
return getParent(element.$parent, type);
|
|
116096
|
+
}
|
|
116097
|
+
|
|
116098
|
+
function isAllowedInParent(property, parent) {
|
|
116099
|
+
|
|
116100
|
+
// (1) find property descriptor
|
|
116101
|
+
var descriptor = property.$type && property.$model.getTypeDescriptor(property.$type);
|
|
116102
|
+
|
|
116103
|
+
var allowedIn = descriptor && descriptor.meta && descriptor.meta.allowedIn;
|
|
116104
|
+
|
|
116105
|
+
if (!allowedIn || isWildcard(allowedIn)) {
|
|
116106
|
+
return true;
|
|
116107
|
+
}
|
|
116108
|
+
|
|
116109
|
+
// (2) check wether property has parent of allowed type
|
|
116110
|
+
return some$1(allowedIn, function(type) {
|
|
116111
|
+
return getParent(parent, type);
|
|
116112
|
+
});
|
|
116113
|
+
}
|
|
116114
|
+
|
|
116115
|
+
function isWildcard(allowedIn) {
|
|
116116
|
+
return allowedIn.includes(WILDCARD);
|
|
116117
|
+
}
|
|
116118
|
+
|
|
116119
|
+
const LOW_PRIORITY$3 = 500;
|
|
116120
|
+
|
|
116121
|
+
|
|
116122
|
+
/**
|
|
116123
|
+
* Add referenced root elements (bpmn:Error) if they don't exist.
|
|
116124
|
+
* Copy referenced root elements on copy & paste.
|
|
116125
|
+
*/
|
|
116126
|
+
class CopyPasteRootElementBehavior extends CommandInterceptor$1 {
|
|
116127
|
+
constructor(bpmnFactory, bpmnjs, eventBus, moddleCopy) {
|
|
116128
|
+
super(eventBus);
|
|
116129
|
+
|
|
116130
|
+
function hasRootElement(rootElement) {
|
|
116131
|
+
const definitions = bpmnjs.getDefinitions(),
|
|
116132
|
+
rootElements = definitions.get('rootElements');
|
|
116133
|
+
|
|
116134
|
+
return !!find$2(rootElements, matchPattern({ id: rootElement.get('id') }));
|
|
116135
|
+
}
|
|
116136
|
+
|
|
116137
|
+
// create shape
|
|
116138
|
+
this.executed('shape.create', (context) => {
|
|
116139
|
+
const { shape } = context;
|
|
116140
|
+
|
|
116141
|
+
const businessObject = getBusinessObject$1(shape);
|
|
116142
|
+
|
|
116143
|
+
if (!canHaveNestedRootElementReference(businessObject)) {
|
|
116144
|
+
return;
|
|
116145
|
+
}
|
|
116146
|
+
|
|
116147
|
+
const referencedRootElements = getRootElements(businessObject, getReferencingElement(shape)),
|
|
116148
|
+
rootElements = bpmnjs.getDefinitions().get('rootElements');
|
|
116149
|
+
|
|
116150
|
+
context.addedRootElements = [];
|
|
116151
|
+
|
|
116152
|
+
referencedRootElements.forEach((reference) => {
|
|
116153
|
+
const { referencedElement } = reference;
|
|
116154
|
+
|
|
116155
|
+
if (referencedElement && !hasRootElement(referencedElement)) {
|
|
116156
|
+
|
|
116157
|
+
// add root element
|
|
116158
|
+
add$2(rootElements, referencedElement);
|
|
116159
|
+
|
|
116160
|
+
context.addedRootElements.push(referencedElement);
|
|
116161
|
+
}
|
|
116162
|
+
});
|
|
116163
|
+
}, true);
|
|
116164
|
+
|
|
116165
|
+
this.reverted('shape.create', (context) => {
|
|
116166
|
+
const { addedRootElements } = context;
|
|
116167
|
+
|
|
116168
|
+
if (!addedRootElements) {
|
|
116169
|
+
return;
|
|
116170
|
+
}
|
|
116171
|
+
|
|
116172
|
+
const rootElements = bpmnjs.getDefinitions().get('rootElements');
|
|
116173
|
+
|
|
116174
|
+
// remove root elements
|
|
116175
|
+
addedRootElements.forEach((addedRootElement) => {
|
|
116176
|
+
remove$2(rootElements, addedRootElement);
|
|
116177
|
+
});
|
|
116178
|
+
}, true);
|
|
116179
|
+
|
|
116180
|
+
eventBus.on('copyPaste.copyElement', function(context) {
|
|
116181
|
+
const {
|
|
116182
|
+
descriptor,
|
|
116183
|
+
element
|
|
116184
|
+
} = context;
|
|
116185
|
+
|
|
116186
|
+
const businessObject = getBusinessObject$1(element);
|
|
116187
|
+
|
|
116188
|
+
if (element.labelTarget || !canHaveNestedRootElementReference(businessObject)) {
|
|
116189
|
+
return;
|
|
116190
|
+
}
|
|
116191
|
+
|
|
116192
|
+
const rootElements = getRootElements(businessObject, getReferencingElement(element));
|
|
116193
|
+
|
|
116194
|
+
if (rootElements) {
|
|
116195
|
+
descriptor.referencedRootElements = rootElements;
|
|
116196
|
+
}
|
|
116197
|
+
});
|
|
116198
|
+
|
|
116199
|
+
eventBus.on('copyPaste.pasteElement', LOW_PRIORITY$3, (context) => {
|
|
116200
|
+
const { descriptor } = context;
|
|
116201
|
+
|
|
116202
|
+
const {
|
|
116203
|
+
businessObject,
|
|
116204
|
+
referencedRootElements
|
|
116205
|
+
} = descriptor;
|
|
116206
|
+
|
|
116207
|
+
if (!referencedRootElements) {
|
|
116208
|
+
return;
|
|
116209
|
+
}
|
|
116210
|
+
|
|
116211
|
+
referencedRootElements.forEach((reference) => {
|
|
116212
|
+
let {
|
|
116213
|
+
idx,
|
|
116214
|
+
referencedElement
|
|
116215
|
+
} = reference;
|
|
116216
|
+
|
|
116217
|
+
if (!referencedElement) {
|
|
116218
|
+
return;
|
|
116219
|
+
}
|
|
116220
|
+
|
|
116221
|
+
if (!hasRootElement(referencedElement)) {
|
|
116222
|
+
referencedElement = moddleCopy.copyElement(
|
|
116223
|
+
referencedElement,
|
|
116224
|
+
bpmnFactory.create(referencedElement.$type)
|
|
116225
|
+
);
|
|
116226
|
+
}
|
|
116227
|
+
|
|
116228
|
+
setRootElement(businessObject, referencedElement, idx);
|
|
116229
|
+
});
|
|
116230
|
+
|
|
116231
|
+
delete descriptor.referencedRootElements;
|
|
116232
|
+
});
|
|
116233
|
+
}
|
|
116234
|
+
}
|
|
116235
|
+
|
|
116236
|
+
CopyPasteRootElementBehavior.$inject = [
|
|
116237
|
+
'bpmnFactory',
|
|
116238
|
+
'bpmnjs',
|
|
116239
|
+
'eventBus',
|
|
116240
|
+
'moddleCopy'
|
|
116241
|
+
];
|
|
116242
|
+
|
|
116243
|
+
|
|
116244
|
+
// helpers //////////
|
|
116245
|
+
|
|
116246
|
+
function getReferencingElement(element) {
|
|
116247
|
+
if (is$5(element, 'bpmn:ServiceTask')) {
|
|
116248
|
+
return 'camunda:ErrorEventDefinition';
|
|
116249
|
+
}
|
|
116250
|
+
}
|
|
116251
|
+
|
|
116252
|
+
function getRootElementReferencePropertyName(bo) {
|
|
116253
|
+
if (is$5(bo, 'camunda:ErrorEventDefinition')) {
|
|
116254
|
+
return 'errorRef';
|
|
116255
|
+
}
|
|
116256
|
+
}
|
|
116257
|
+
|
|
116258
|
+
function canHaveNestedRootElementReference(businessObject) {
|
|
116259
|
+
return is$5(businessObject, 'bpmn:ServiceTask') && businessObject.get('type') === 'external';
|
|
116260
|
+
}
|
|
116261
|
+
|
|
116262
|
+
/**
|
|
116263
|
+
* Retrieves a list of to-be copied references for the extension elements
|
|
116264
|
+
* of a given element in the following form.
|
|
116265
|
+
*
|
|
116266
|
+
* [
|
|
116267
|
+
* {
|
|
116268
|
+
* idx: 0, // position of extension in the list of extension elements
|
|
116269
|
+
* referencedElement: {ModdleElement} // reference to root element
|
|
116270
|
+
* }
|
|
116271
|
+
* ]
|
|
116272
|
+
*
|
|
116273
|
+
*
|
|
116274
|
+
* @param {ModdleElement} businessObject
|
|
116275
|
+
* @param {String} extensionElementType
|
|
116276
|
+
*
|
|
116277
|
+
* @returns {Array}
|
|
116278
|
+
*/
|
|
116279
|
+
function getRootElements(businessObject, extensionElementType) {
|
|
116280
|
+
const extensionElements = businessObject.get('extensionElements');
|
|
116281
|
+
|
|
116282
|
+
if (!extensionElements) {
|
|
116283
|
+
return [];
|
|
116284
|
+
}
|
|
116285
|
+
|
|
116286
|
+
return extensionElements
|
|
116287
|
+
.get('values')
|
|
116288
|
+
.filter((element) => is$5(element, extensionElementType))
|
|
116289
|
+
.reduce((result, element) => {
|
|
116290
|
+
const referencedElement = element.get(getRootElementReferencePropertyName(element));
|
|
116291
|
+
|
|
116292
|
+
if (referencedElement) {
|
|
116293
|
+
result.push({
|
|
116294
|
+
idx: getExtensionElementId(businessObject, element),
|
|
116295
|
+
referencedElement
|
|
116296
|
+
});
|
|
116297
|
+
}
|
|
116298
|
+
|
|
116299
|
+
return result;
|
|
116300
|
+
}, []);
|
|
116301
|
+
}
|
|
116302
|
+
|
|
116303
|
+
function setRootElement(businessObject, rootElement, index) {
|
|
116304
|
+
const extensionElement = businessObject.get('extensionElements').get('values')[ index ];
|
|
116305
|
+
|
|
116306
|
+
extensionElement.set(getRootElementReferencePropertyName(extensionElement), rootElement);
|
|
116307
|
+
}
|
|
116308
|
+
|
|
116309
|
+
function getExtensionElementId(businessObject, extensionElement) {
|
|
116310
|
+
const extensionElements = businessObject.get('extensionElements');
|
|
116311
|
+
|
|
116312
|
+
if (!extensionElements) {
|
|
116313
|
+
return -1;
|
|
116314
|
+
}
|
|
116315
|
+
|
|
116316
|
+
return extensionElements.get('values').indexOf(extensionElement);
|
|
116317
|
+
}
|
|
116318
|
+
|
|
116319
|
+
/**
|
|
116320
|
+
* Get extension elements of business object. Optionally filter by type.
|
|
116321
|
+
*
|
|
116322
|
+
* @param {djs.model.Base|ModdleElement} element
|
|
116323
|
+
* @param {String} [type=undefined]
|
|
116324
|
+
* @returns {Array<ModdleElement>}
|
|
116325
|
+
*/
|
|
116326
|
+
function getExtensionElementsList(element, type = undefined) {
|
|
116327
|
+
const businessObject = getBusinessObject$1(element),
|
|
116328
|
+
extensionElements = businessObject.get('extensionElements');
|
|
116329
|
+
|
|
116330
|
+
if (!extensionElements) {
|
|
116331
|
+
return [];
|
|
116332
|
+
}
|
|
116333
|
+
|
|
116334
|
+
const values = extensionElements.get('values');
|
|
116335
|
+
|
|
116336
|
+
if (!values || !values.length) {
|
|
116337
|
+
return [];
|
|
116338
|
+
}
|
|
116339
|
+
|
|
116340
|
+
if (type) {
|
|
116341
|
+
return values.filter(value => is$5(value, type));
|
|
116342
|
+
}
|
|
116343
|
+
|
|
116344
|
+
return values;
|
|
116345
|
+
}
|
|
116346
|
+
|
|
116347
|
+
/**
|
|
116348
|
+
* Remove one or more extension elements. Remove bpmn:ExtensionElements afterwards if it's empty.
|
|
116349
|
+
*
|
|
116350
|
+
* @param {ModdleElement} element
|
|
116351
|
+
* @param {ModdleElement} businessObject
|
|
116352
|
+
* @param {ModdleElement|Array<ModdleElement>} extensionElementsToRemove
|
|
116353
|
+
* @param {CommandStack} commandStack
|
|
116354
|
+
*/
|
|
116355
|
+
function removeExtensionElements(element, businessObject, extensionElementsToRemove, commandStack) {
|
|
116356
|
+
if (!isArray$4(extensionElementsToRemove)) {
|
|
116357
|
+
extensionElementsToRemove = [ extensionElementsToRemove ];
|
|
116358
|
+
}
|
|
116359
|
+
|
|
116360
|
+
const extensionElements = businessObject.get('extensionElements'),
|
|
116361
|
+
values = extensionElements.get('values').filter(value => !extensionElementsToRemove.includes(value));
|
|
116362
|
+
|
|
116363
|
+
commandStack.execute('element.updateModdleProperties', {
|
|
116364
|
+
element,
|
|
116365
|
+
moddleElement: extensionElements,
|
|
116366
|
+
properties: {
|
|
116367
|
+
values
|
|
116368
|
+
}
|
|
116369
|
+
});
|
|
116370
|
+
}
|
|
116371
|
+
|
|
116372
|
+
const HIGH_PRIORITY$3 = 5000;
|
|
116373
|
+
|
|
116374
|
+
|
|
116375
|
+
/**
|
|
116376
|
+
* Camunda BPMN specific behavior ensuring camunda:ErrorEventDefinition extension elements are removed
|
|
116377
|
+
* if type of e.g. bpmn:ServiceTask is set to something other than external.
|
|
116378
|
+
*/
|
|
116379
|
+
class DeleteErrorEventDefinitionBehavior extends CommandInterceptor$1 {
|
|
116380
|
+
constructor(commandStack, eventBus) {
|
|
116381
|
+
super(eventBus);
|
|
116382
|
+
|
|
116383
|
+
this.postExecute([
|
|
116384
|
+
'element.updateProperties',
|
|
116385
|
+
'element.updateModdleProperties'
|
|
116386
|
+
], HIGH_PRIORITY$3, function(context) {
|
|
116387
|
+
const {
|
|
116388
|
+
element,
|
|
116389
|
+
moddleElement,
|
|
116390
|
+
properties
|
|
116391
|
+
} = context;
|
|
116392
|
+
|
|
116393
|
+
const businessObject = moddleElement || getBusinessObject$1(element);
|
|
116394
|
+
|
|
116395
|
+
if (is$5(element, 'camunda:ExternalCapable')
|
|
116396
|
+
&& is$5(businessObject, 'camunda:ExternalCapable')
|
|
116397
|
+
&& properties[ 'camunda:type' ] !== 'external'
|
|
116398
|
+
) {
|
|
116399
|
+
const errorEventDefinitions = getExtensionElementsList(businessObject, 'camunda:ErrorEventDefinition');
|
|
116400
|
+
|
|
116401
|
+
if (errorEventDefinitions.length) {
|
|
116402
|
+
removeExtensionElements(element, businessObject, errorEventDefinitions, commandStack);
|
|
116403
|
+
}
|
|
116404
|
+
}
|
|
116405
|
+
}, true);
|
|
116406
|
+
|
|
116407
|
+
}
|
|
116408
|
+
}
|
|
116409
|
+
|
|
116410
|
+
DeleteErrorEventDefinitionBehavior.$inject = [
|
|
116411
|
+
'commandStack',
|
|
116412
|
+
'eventBus'
|
|
116413
|
+
];
|
|
116414
|
+
|
|
116415
|
+
const LOW_PRIORITY$2 = 250;
|
|
116416
|
+
|
|
116417
|
+
/**
|
|
116418
|
+
* Camunda-specific behavior ensuring `isExecutable` is kept after deleting
|
|
116419
|
+
* the last participant.
|
|
116420
|
+
*/
|
|
116421
|
+
class DeleteParticipantBehaviour extends CommandInterceptor$1 {
|
|
116422
|
+
constructor(eventBus, canvas, modeling) {
|
|
116423
|
+
super(eventBus);
|
|
116424
|
+
|
|
116425
|
+
this.postExecuted('shape.delete', LOW_PRIORITY$2, function(context) {
|
|
116426
|
+
const {
|
|
116427
|
+
collaborationRoot,
|
|
116428
|
+
shape
|
|
116429
|
+
} = context;
|
|
116430
|
+
|
|
116431
|
+
const newRoot = canvas.getRootElement();
|
|
116432
|
+
|
|
116433
|
+
if (is$5(shape, 'bpmn:Participant') &&
|
|
116434
|
+
collaborationRoot &&
|
|
116435
|
+
!collaborationRoot.businessObject.get('participants').length &&
|
|
116436
|
+
is$5(newRoot, 'bpmn:Process')) {
|
|
116437
|
+
|
|
116438
|
+
const oldProcessBusinessObject = shape.businessObject.get('processRef');
|
|
116439
|
+
|
|
116440
|
+
if (!oldProcessBusinessObject) {
|
|
116441
|
+
return;
|
|
116442
|
+
}
|
|
116443
|
+
|
|
116444
|
+
modeling.updateProperties(newRoot, { isExecutable: oldProcessBusinessObject.get('isExecutable') });
|
|
116445
|
+
}
|
|
116446
|
+
|
|
116447
|
+
}, true);
|
|
116448
|
+
}
|
|
116449
|
+
}
|
|
116450
|
+
|
|
116451
|
+
DeleteParticipantBehaviour.$inject = [
|
|
116452
|
+
'eventBus',
|
|
116453
|
+
'canvas',
|
|
116454
|
+
'modeling'
|
|
116455
|
+
];
|
|
116456
|
+
|
|
116457
|
+
const HIGH_PRIORITY$2 = 5000;
|
|
116458
|
+
|
|
116459
|
+
|
|
116460
|
+
/**
|
|
116461
|
+
* Camunda BPMN specific behavior ensuring camunda:FailedJobRetryTimeCycle is
|
|
116462
|
+
* removed when both camunda:asyncAfter and camunda:asyncBefore set to false.
|
|
116463
|
+
* Doesn't apply if element has bpmn:TimerEventDefinition.
|
|
116464
|
+
*/
|
|
116465
|
+
class DeleteRetryTimeCycleBehavior extends CommandInterceptor$1 {
|
|
116466
|
+
constructor(commandStack, eventBus) {
|
|
116467
|
+
super(eventBus);
|
|
116468
|
+
|
|
116469
|
+
this.postExecute([
|
|
116470
|
+
'element.updateProperties',
|
|
116471
|
+
'element.updateModdleProperties'
|
|
116472
|
+
], HIGH_PRIORITY$2, function(context) {
|
|
116473
|
+
const {
|
|
116474
|
+
element,
|
|
116475
|
+
moddleElement,
|
|
116476
|
+
properties = {}
|
|
116477
|
+
} = context;
|
|
116478
|
+
|
|
116479
|
+
const asyncAfter = properties[ 'camunda:asyncAfter' ],
|
|
116480
|
+
asyncBefore = properties[ 'camunda:asyncBefore' ];
|
|
116481
|
+
|
|
116482
|
+
const businessObject = moddleElement || getBusinessObject$1(element);
|
|
116483
|
+
|
|
116484
|
+
const failedJobRetryTimeCycle = getFailedJobRetryTimeCycle(element);
|
|
116485
|
+
|
|
116486
|
+
if (
|
|
116487
|
+
!is$5(element, 'camunda:AsyncCapable')
|
|
116488
|
+
|| !is$5(businessObject, 'camunda:AsyncCapable')
|
|
116489
|
+
|| (asyncAfter !== false && asyncBefore !== false)
|
|
116490
|
+
|| !failedJobRetryTimeCycle
|
|
116491
|
+
|| getTimerEventDefinition(element)
|
|
116492
|
+
|| isAsyncBefore$1(businessObject)
|
|
116493
|
+
|| isAsyncAfter$1(businessObject)
|
|
116494
|
+
) {
|
|
116495
|
+
return;
|
|
116496
|
+
}
|
|
116497
|
+
|
|
116498
|
+
removeExtensionElements(element, businessObject, failedJobRetryTimeCycle, commandStack);
|
|
116499
|
+
}, true);
|
|
116500
|
+
|
|
116501
|
+
}
|
|
116502
|
+
}
|
|
116503
|
+
|
|
116504
|
+
DeleteRetryTimeCycleBehavior.$inject = [
|
|
116505
|
+
'commandStack',
|
|
116506
|
+
'eventBus'
|
|
116507
|
+
];
|
|
116508
|
+
|
|
116509
|
+
|
|
116510
|
+
// helpers //////////
|
|
116511
|
+
|
|
116512
|
+
function isAsyncBefore$1(businessObject) {
|
|
116513
|
+
return !!(businessObject.get('camunda:asyncBefore') || businessObject.get('camunda:async'));
|
|
116514
|
+
}
|
|
116515
|
+
|
|
116516
|
+
function isAsyncAfter$1(businessObject) {
|
|
116517
|
+
return !!businessObject.get('camunda:asyncAfter');
|
|
116518
|
+
}
|
|
116519
|
+
|
|
116520
|
+
function getFailedJobRetryTimeCycle(element) {
|
|
116521
|
+
return getExtensionElementsList(element, 'camunda:FailedJobRetryTimeCycle')[ 0 ];
|
|
116522
|
+
}
|
|
116523
|
+
|
|
116524
|
+
function getTimerEventDefinition(element) {
|
|
116525
|
+
return getEventDefinition$1(element, 'bpmn:TimerEventDefinition');
|
|
116526
|
+
}
|
|
116527
|
+
|
|
116528
|
+
function getEventDefinition$1(element, type) {
|
|
116529
|
+
const businessObject = getBusinessObject$1(element);
|
|
116530
|
+
|
|
116531
|
+
const eventDefinitions = businessObject.get('eventDefinitions');
|
|
116532
|
+
|
|
116533
|
+
if (!eventDefinitions || !eventDefinitions.length) {
|
|
116534
|
+
return;
|
|
116535
|
+
}
|
|
116536
|
+
|
|
116537
|
+
return eventDefinitions.find((eventDefinition) => {
|
|
116538
|
+
return is$5(eventDefinition, type);
|
|
116539
|
+
});
|
|
116540
|
+
}
|
|
116541
|
+
|
|
116542
|
+
/**
|
|
116543
|
+
* Camunda BPMN specific behavior ensuring camunda:initiator property is removed
|
|
116544
|
+
* when start event is created in or moved to sub process.
|
|
116545
|
+
*/
|
|
116546
|
+
class RemoveInitiatorBehaviour extends CommandInterceptor$1 {
|
|
116547
|
+
constructor(eventBus, modeling) {
|
|
116548
|
+
super(eventBus);
|
|
116549
|
+
|
|
116550
|
+
this.postExecuted([ 'shape.create','shape.move' ], (context) => {
|
|
116551
|
+
const {
|
|
116552
|
+
shape,
|
|
116553
|
+
parent,
|
|
116554
|
+
newParent = parent
|
|
116555
|
+
} = context;
|
|
116556
|
+
|
|
116557
|
+
const businessObject = getBusinessObject$1(shape);
|
|
116558
|
+
|
|
116559
|
+
if (is$5(shape, 'bpmn:StartEvent') && isDefined(businessObject.get('camunda:initiator'))) {
|
|
116560
|
+
if ((is$5(newParent || parent, 'bpmn:SubProcess'))) {
|
|
116561
|
+
modeling.updateProperties(shape, { 'camunda:initiator': undefined });
|
|
116562
|
+
}
|
|
116563
|
+
}
|
|
116564
|
+
}, true);
|
|
116565
|
+
}
|
|
116566
|
+
}
|
|
116567
|
+
|
|
116568
|
+
RemoveInitiatorBehaviour.$inject = [
|
|
116569
|
+
'eventBus',
|
|
116570
|
+
'modeling'
|
|
116571
|
+
];
|
|
116572
|
+
|
|
116573
|
+
/**
|
|
116574
|
+
* Camunda BPMN specific behavior ensuring camunda:variableEvents property is
|
|
116575
|
+
* removed when start event is moved out of event sub process.
|
|
116576
|
+
*/
|
|
116577
|
+
class RemoveVariableEventBehaviour extends CommandInterceptor$1 {
|
|
116578
|
+
constructor(bpmnFactory, eventBus, moddleCopy, modeling) {
|
|
116579
|
+
super(eventBus);
|
|
116580
|
+
|
|
116581
|
+
this.postExecuted([ 'shape.create', 'shape.move' ], (context) => {
|
|
116582
|
+
const {
|
|
116583
|
+
parent,
|
|
116584
|
+
newParent = parent,
|
|
116585
|
+
shape
|
|
116586
|
+
} = context;
|
|
116587
|
+
|
|
116588
|
+
const newParentBusinessObject = getBusinessObject$1(newParent),
|
|
116589
|
+
shapeBusinessObject = getBusinessObject$1(shape);
|
|
116590
|
+
|
|
116591
|
+
if (is$5(shape, 'bpmn:StartEvent')) {
|
|
116592
|
+
|
|
116593
|
+
if (!(is$5(newParent, 'bpmn:SubProcess') && newParentBusinessObject.get('triggeredByEvent'))) {
|
|
116594
|
+
const eventDefinitions = shapeBusinessObject.get('eventDefinitions').slice();
|
|
116595
|
+
|
|
116596
|
+
const update = eventDefinitions.reduce((update, eventDefinition, index) => {
|
|
116597
|
+
if (!is$5(eventDefinition, 'bpmn:ConditionalEventDefinition')) {
|
|
116598
|
+
return;
|
|
116599
|
+
}
|
|
116600
|
+
|
|
116601
|
+
if (eventDefinition.get('camunda:variableEvents')) {
|
|
116602
|
+
const conditionalEventDefinition = bpmnFactory.create('bpmn:ConditionalEventDefinition');
|
|
116603
|
+
|
|
116604
|
+
moddleCopy.copyElement(eventDefinition, conditionalEventDefinition);
|
|
116605
|
+
|
|
116606
|
+
conditionalEventDefinition.$parent = eventDefinition.$parent;
|
|
116607
|
+
|
|
116608
|
+
// remove camunda:variableEvents property
|
|
116609
|
+
conditionalEventDefinition.variableEvents = undefined;
|
|
116610
|
+
|
|
116611
|
+
eventDefinitions[ index ] = conditionalEventDefinition;
|
|
116612
|
+
|
|
116613
|
+
return true;
|
|
116614
|
+
}
|
|
116615
|
+
|
|
116616
|
+
return update;
|
|
116617
|
+
}, false);
|
|
116618
|
+
|
|
116619
|
+
if (update) {
|
|
116620
|
+
modeling.updateProperties(shape, {
|
|
116621
|
+
eventDefinitions: eventDefinitions
|
|
116622
|
+
});
|
|
116623
|
+
}
|
|
116624
|
+
}
|
|
116625
|
+
}
|
|
116626
|
+
}, true);
|
|
116627
|
+
}
|
|
116628
|
+
}
|
|
116629
|
+
|
|
116630
|
+
RemoveVariableEventBehaviour.$inject = [
|
|
116631
|
+
'bpmnFactory',
|
|
116632
|
+
'eventBus',
|
|
116633
|
+
'moddleCopy',
|
|
116634
|
+
'modeling'
|
|
116635
|
+
];
|
|
116636
|
+
|
|
116637
|
+
const HIGH_PRIORITY$1 = 5000;
|
|
116638
|
+
|
|
116639
|
+
|
|
116640
|
+
/**
|
|
116641
|
+
* Camunda BPMN specific behavior ensuring camunda:exclusive is set to true if
|
|
116642
|
+
* camunda:asyncBefore or camunda:asyncAfter is set to false.
|
|
116643
|
+
*/
|
|
116644
|
+
class UpdateCamundaExclusiveBehavior extends CommandInterceptor$1 {
|
|
116645
|
+
constructor(eventBus) {
|
|
116646
|
+
super(eventBus);
|
|
116647
|
+
|
|
116648
|
+
this.preExecute([
|
|
116649
|
+
'element.updateProperties',
|
|
116650
|
+
'element.updateModdleProperties',
|
|
116651
|
+
], HIGH_PRIORITY$1, function(context) {
|
|
116652
|
+
const {
|
|
116653
|
+
element,
|
|
116654
|
+
moddleElement,
|
|
116655
|
+
properties = {}
|
|
116656
|
+
} = context;
|
|
116657
|
+
|
|
116658
|
+
const businessObject = moddleElement || getBusinessObject$1(element);
|
|
116659
|
+
|
|
116660
|
+
const asyncAfter = properties[ 'camunda:asyncAfter' ],
|
|
116661
|
+
asyncBefore = properties[ 'camunda:asyncBefore' ];
|
|
116662
|
+
|
|
116663
|
+
if (!is$5(element, 'camunda:AsyncCapable')
|
|
116664
|
+
|| !is$5(businessObject, 'camunda:AsyncCapable')
|
|
116665
|
+
|| (asyncAfter !== false && asyncBefore !== false)
|
|
116666
|
+
|| isExclusive(businessObject)
|
|
116667
|
+
|| (isAsyncAfter(businessObject) && asyncAfter !== false)
|
|
116668
|
+
|| (isAsyncBefore(businessObject) && asyncBefore !== false)
|
|
116669
|
+
|| (asyncAfter === true || asyncBefore === true)
|
|
116670
|
+
) {
|
|
116671
|
+
return;
|
|
116672
|
+
}
|
|
116673
|
+
|
|
116674
|
+
properties[ 'camunda:exclusive' ] = true;
|
|
116675
|
+
}, true);
|
|
116676
|
+
|
|
116677
|
+
}
|
|
116678
|
+
}
|
|
116679
|
+
|
|
116680
|
+
UpdateCamundaExclusiveBehavior.$inject = [
|
|
116681
|
+
'eventBus'
|
|
116682
|
+
];
|
|
116683
|
+
|
|
116684
|
+
|
|
116685
|
+
// helpers //////////
|
|
116686
|
+
|
|
116687
|
+
function isAsyncBefore(businessObject) {
|
|
116688
|
+
return !!(businessObject.get('camunda:asyncBefore') || businessObject.get('camunda:async'));
|
|
116119
116689
|
}
|
|
116120
116690
|
|
|
116121
|
-
|
|
116122
|
-
|
|
116123
|
-
|
|
116124
|
-
/**
|
|
116125
|
-
* Add referenced root elements (bpmn:Error) if they don't exist.
|
|
116126
|
-
* Copy referenced root elements on copy & paste.
|
|
116127
|
-
*/
|
|
116128
|
-
class CopyPasteRootElementBehavior extends CommandInterceptor$1 {
|
|
116129
|
-
constructor(bpmnFactory, bpmnjs, eventBus, moddleCopy) {
|
|
116130
|
-
super(eventBus);
|
|
116131
|
-
|
|
116132
|
-
function hasRootElement(rootElement) {
|
|
116133
|
-
const definitions = bpmnjs.getDefinitions(),
|
|
116134
|
-
rootElements = definitions.get('rootElements');
|
|
116135
|
-
|
|
116136
|
-
return !!find$2(rootElements, matchPattern({ id: rootElement.get('id') }));
|
|
116137
|
-
}
|
|
116138
|
-
|
|
116139
|
-
// create shape
|
|
116140
|
-
this.executed('shape.create', (context) => {
|
|
116141
|
-
const { shape } = context;
|
|
116142
|
-
|
|
116143
|
-
const businessObject = getBusinessObject$1(shape);
|
|
116144
|
-
|
|
116145
|
-
if (!canHaveNestedRootElementReference(businessObject)) {
|
|
116146
|
-
return;
|
|
116147
|
-
}
|
|
116148
|
-
|
|
116149
|
-
const referencedRootElements = getRootElements(businessObject, getReferencingElement(shape)),
|
|
116150
|
-
rootElements = bpmnjs.getDefinitions().get('rootElements');
|
|
116151
|
-
|
|
116152
|
-
context.addedRootElements = [];
|
|
116153
|
-
|
|
116154
|
-
referencedRootElements.forEach((reference) => {
|
|
116155
|
-
const { referencedElement } = reference;
|
|
116156
|
-
|
|
116157
|
-
if (referencedElement && !hasRootElement(referencedElement)) {
|
|
116158
|
-
|
|
116159
|
-
// add root element
|
|
116160
|
-
add$2(rootElements, referencedElement);
|
|
116161
|
-
|
|
116162
|
-
context.addedRootElements.push(referencedElement);
|
|
116163
|
-
}
|
|
116164
|
-
});
|
|
116165
|
-
}, true);
|
|
116166
|
-
|
|
116167
|
-
this.reverted('shape.create', (context) => {
|
|
116168
|
-
const { addedRootElements } = context;
|
|
116169
|
-
|
|
116170
|
-
if (!addedRootElements) {
|
|
116171
|
-
return;
|
|
116172
|
-
}
|
|
116173
|
-
|
|
116174
|
-
const rootElements = bpmnjs.getDefinitions().get('rootElements');
|
|
116175
|
-
|
|
116176
|
-
// remove root elements
|
|
116177
|
-
addedRootElements.forEach((addedRootElement) => {
|
|
116178
|
-
remove$2(rootElements, addedRootElement);
|
|
116179
|
-
});
|
|
116180
|
-
}, true);
|
|
116181
|
-
|
|
116182
|
-
eventBus.on('copyPaste.copyElement', function(context) {
|
|
116183
|
-
const {
|
|
116184
|
-
descriptor,
|
|
116185
|
-
element
|
|
116186
|
-
} = context;
|
|
116187
|
-
|
|
116188
|
-
const businessObject = getBusinessObject$1(element);
|
|
116189
|
-
|
|
116190
|
-
if (element.labelTarget || !canHaveNestedRootElementReference(businessObject)) {
|
|
116191
|
-
return;
|
|
116192
|
-
}
|
|
116193
|
-
|
|
116194
|
-
const rootElements = getRootElements(businessObject, getReferencingElement(element));
|
|
116195
|
-
|
|
116196
|
-
if (rootElements) {
|
|
116197
|
-
descriptor.referencedRootElements = rootElements;
|
|
116198
|
-
}
|
|
116199
|
-
});
|
|
116200
|
-
|
|
116201
|
-
eventBus.on('copyPaste.pasteElement', LOW_PRIORITY$3, (context) => {
|
|
116202
|
-
const { descriptor } = context;
|
|
116203
|
-
|
|
116204
|
-
const {
|
|
116205
|
-
businessObject,
|
|
116206
|
-
referencedRootElements
|
|
116207
|
-
} = descriptor;
|
|
116208
|
-
|
|
116209
|
-
if (!referencedRootElements) {
|
|
116210
|
-
return;
|
|
116211
|
-
}
|
|
116212
|
-
|
|
116213
|
-
referencedRootElements.forEach((reference) => {
|
|
116214
|
-
let {
|
|
116215
|
-
idx,
|
|
116216
|
-
referencedElement
|
|
116217
|
-
} = reference;
|
|
116218
|
-
|
|
116219
|
-
if (!referencedElement) {
|
|
116220
|
-
return;
|
|
116221
|
-
}
|
|
116222
|
-
|
|
116223
|
-
if (!hasRootElement(referencedElement)) {
|
|
116224
|
-
referencedElement = moddleCopy.copyElement(
|
|
116225
|
-
referencedElement,
|
|
116226
|
-
bpmnFactory.create(referencedElement.$type)
|
|
116227
|
-
);
|
|
116228
|
-
}
|
|
116229
|
-
|
|
116230
|
-
setRootElement(businessObject, referencedElement, idx);
|
|
116231
|
-
});
|
|
116232
|
-
|
|
116233
|
-
delete descriptor.referencedRootElements;
|
|
116234
|
-
});
|
|
116235
|
-
}
|
|
116236
|
-
}
|
|
116237
|
-
|
|
116238
|
-
CopyPasteRootElementBehavior.$inject = [
|
|
116239
|
-
'bpmnFactory',
|
|
116240
|
-
'bpmnjs',
|
|
116241
|
-
'eventBus',
|
|
116242
|
-
'moddleCopy'
|
|
116243
|
-
];
|
|
116244
|
-
|
|
116245
|
-
|
|
116246
|
-
// helpers //////////
|
|
116247
|
-
|
|
116248
|
-
function getReferencingElement(element) {
|
|
116249
|
-
if (is$5(element, 'bpmn:ServiceTask')) {
|
|
116250
|
-
return 'camunda:ErrorEventDefinition';
|
|
116251
|
-
}
|
|
116252
|
-
}
|
|
116253
|
-
|
|
116254
|
-
function getRootElementReferencePropertyName(bo) {
|
|
116255
|
-
if (is$5(bo, 'camunda:ErrorEventDefinition')) {
|
|
116256
|
-
return 'errorRef';
|
|
116257
|
-
}
|
|
116258
|
-
}
|
|
116259
|
-
|
|
116260
|
-
function canHaveNestedRootElementReference(businessObject) {
|
|
116261
|
-
return is$5(businessObject, 'bpmn:ServiceTask') && businessObject.get('type') === 'external';
|
|
116262
|
-
}
|
|
116263
|
-
|
|
116264
|
-
/**
|
|
116265
|
-
* Retrieves a list of to-be copied references for the extension elements
|
|
116266
|
-
* of a given element in the following form.
|
|
116267
|
-
*
|
|
116268
|
-
* [
|
|
116269
|
-
* {
|
|
116270
|
-
* idx: 0, // position of extension in the list of extension elements
|
|
116271
|
-
* referencedElement: {ModdleElement} // reference to root element
|
|
116272
|
-
* }
|
|
116273
|
-
* ]
|
|
116274
|
-
*
|
|
116275
|
-
*
|
|
116276
|
-
* @param {ModdleElement} businessObject
|
|
116277
|
-
* @param {String} extensionElementType
|
|
116278
|
-
*
|
|
116279
|
-
* @returns {Array}
|
|
116280
|
-
*/
|
|
116281
|
-
function getRootElements(businessObject, extensionElementType) {
|
|
116282
|
-
const extensionElements = businessObject.get('extensionElements');
|
|
116283
|
-
|
|
116284
|
-
if (!extensionElements) {
|
|
116285
|
-
return [];
|
|
116286
|
-
}
|
|
116287
|
-
|
|
116288
|
-
return extensionElements
|
|
116289
|
-
.get('values')
|
|
116290
|
-
.filter((element) => is$5(element, extensionElementType))
|
|
116291
|
-
.reduce((result, element) => {
|
|
116292
|
-
const referencedElement = element.get(getRootElementReferencePropertyName(element));
|
|
116293
|
-
|
|
116294
|
-
if (referencedElement) {
|
|
116295
|
-
result.push({
|
|
116296
|
-
idx: getExtensionElementId(businessObject, element),
|
|
116297
|
-
referencedElement
|
|
116298
|
-
});
|
|
116299
|
-
}
|
|
116300
|
-
|
|
116301
|
-
return result;
|
|
116302
|
-
}, []);
|
|
116303
|
-
}
|
|
116304
|
-
|
|
116305
|
-
function setRootElement(businessObject, rootElement, index) {
|
|
116306
|
-
const extensionElement = businessObject.get('extensionElements').get('values')[ index ];
|
|
116307
|
-
|
|
116308
|
-
extensionElement.set(getRootElementReferencePropertyName(extensionElement), rootElement);
|
|
116309
|
-
}
|
|
116310
|
-
|
|
116311
|
-
function getExtensionElementId(businessObject, extensionElement) {
|
|
116312
|
-
const extensionElements = businessObject.get('extensionElements');
|
|
116313
|
-
|
|
116314
|
-
if (!extensionElements) {
|
|
116315
|
-
return -1;
|
|
116316
|
-
}
|
|
116317
|
-
|
|
116318
|
-
return extensionElements.get('values').indexOf(extensionElement);
|
|
116691
|
+
function isAsyncAfter(businessObject) {
|
|
116692
|
+
return !!businessObject.get('camunda:asyncAfter');
|
|
116319
116693
|
}
|
|
116320
116694
|
|
|
116321
|
-
|
|
116322
|
-
|
|
116323
|
-
*
|
|
116324
|
-
* @param {djs.model.Base|ModdleElement} element
|
|
116325
|
-
* @param {String} [type=undefined]
|
|
116326
|
-
* @returns {Array<ModdleElement>}
|
|
116327
|
-
*/
|
|
116328
|
-
function getExtensionElementsList(element, type = undefined) {
|
|
116329
|
-
const businessObject = getBusinessObject$1(element),
|
|
116330
|
-
extensionElements = businessObject.get('extensionElements');
|
|
116331
|
-
|
|
116332
|
-
if (!extensionElements) {
|
|
116333
|
-
return [];
|
|
116334
|
-
}
|
|
116335
|
-
|
|
116336
|
-
const values = extensionElements.get('values');
|
|
116337
|
-
|
|
116338
|
-
if (!values || !values.length) {
|
|
116339
|
-
return [];
|
|
116340
|
-
}
|
|
116341
|
-
|
|
116342
|
-
if (type) {
|
|
116343
|
-
return values.filter(value => is$5(value, type));
|
|
116344
|
-
}
|
|
116345
|
-
|
|
116346
|
-
return values;
|
|
116347
|
-
}
|
|
116348
|
-
|
|
116349
|
-
/**
|
|
116350
|
-
* Remove one or more extension elements. Remove bpmn:ExtensionElements afterwards if it's empty.
|
|
116351
|
-
*
|
|
116352
|
-
* @param {ModdleElement} element
|
|
116353
|
-
* @param {ModdleElement} businessObject
|
|
116354
|
-
* @param {ModdleElement|Array<ModdleElement>} extensionElementsToRemove
|
|
116355
|
-
* @param {CommandStack} commandStack
|
|
116356
|
-
*/
|
|
116357
|
-
function removeExtensionElements(element, businessObject, extensionElementsToRemove, commandStack) {
|
|
116358
|
-
if (!isArray$4(extensionElementsToRemove)) {
|
|
116359
|
-
extensionElementsToRemove = [ extensionElementsToRemove ];
|
|
116360
|
-
}
|
|
116361
|
-
|
|
116362
|
-
const extensionElements = businessObject.get('extensionElements'),
|
|
116363
|
-
values = extensionElements.get('values').filter(value => !extensionElementsToRemove.includes(value));
|
|
116364
|
-
|
|
116365
|
-
commandStack.execute('element.updateModdleProperties', {
|
|
116366
|
-
element,
|
|
116367
|
-
moddleElement: extensionElements,
|
|
116368
|
-
properties: {
|
|
116369
|
-
values
|
|
116370
|
-
}
|
|
116371
|
-
});
|
|
116695
|
+
function isExclusive(businessObject) {
|
|
116696
|
+
return !!businessObject.get('camunda:exclusive');
|
|
116372
116697
|
}
|
|
116373
116698
|
|
|
116374
|
-
|
|
116375
|
-
|
|
116376
|
-
|
|
116377
|
-
|
|
116378
|
-
|
|
116379
|
-
|
|
116380
|
-
|
|
116381
|
-
|
|
116382
|
-
|
|
116383
|
-
|
|
116384
|
-
|
|
116385
|
-
|
|
116386
|
-
|
|
116387
|
-
|
|
116388
|
-
|
|
116389
|
-
|
|
116390
|
-
|
|
116391
|
-
|
|
116392
|
-
|
|
116393
|
-
|
|
116394
|
-
|
|
116395
|
-
|
|
116396
|
-
|
|
116397
|
-
|
|
116398
|
-
|
|
116399
|
-
|
|
116400
|
-
|
|
116401
|
-
|
|
116402
|
-
|
|
116403
|
-
|
|
116404
|
-
|
|
116405
|
-
|
|
116406
|
-
|
|
116407
|
-
|
|
116408
|
-
|
|
116409
|
-
|
|
116410
|
-
|
|
116411
|
-
|
|
116412
|
-
|
|
116413
|
-
|
|
116414
|
-
|
|
116699
|
+
function getInputParameters$1(inputOutput) {
|
|
116700
|
+
return inputOutput.get('inputParameters');
|
|
116701
|
+
}
|
|
116702
|
+
|
|
116703
|
+
function getOutputParameters$1(inputOutput) {
|
|
116704
|
+
return inputOutput.get('outputParameters');
|
|
116705
|
+
}
|
|
116706
|
+
|
|
116707
|
+
function isInputOutputEmpty(inputOutput) {
|
|
116708
|
+
const inputParameters = getInputParameters$1(inputOutput);
|
|
116709
|
+
const outputParameters = getOutputParameters$1(inputOutput);
|
|
116710
|
+
|
|
116711
|
+
return !inputParameters.length && !outputParameters.length;
|
|
116712
|
+
}
|
|
116713
|
+
|
|
116714
|
+
const LOW_PRIORITY$1 = 250;
|
|
116715
|
+
|
|
116716
|
+
|
|
116717
|
+
/**
|
|
116718
|
+
* Camunda BPMN specific behavior ensuring empty camunda:InputOutput is removed.
|
|
116719
|
+
*/
|
|
116720
|
+
class UpdateInputOutputBehavior extends CommandInterceptor$1 {
|
|
116721
|
+
constructor(commandStack, eventBus) {
|
|
116722
|
+
super(eventBus);
|
|
116723
|
+
|
|
116724
|
+
this.postExecuted('element.updateModdleProperties', LOW_PRIORITY$1, function(context) {
|
|
116725
|
+
const {
|
|
116726
|
+
element,
|
|
116727
|
+
moddleElement
|
|
116728
|
+
} = context;
|
|
116729
|
+
|
|
116730
|
+
if (!is$5(moddleElement, 'camunda:InputOutput')) {
|
|
116731
|
+
return;
|
|
116732
|
+
}
|
|
116733
|
+
|
|
116734
|
+
if (isInputOutputEmpty(moddleElement)) {
|
|
116735
|
+
removeExtensionElements(element, getBusinessObject$1(element), moddleElement, commandStack);
|
|
116736
|
+
}
|
|
116737
|
+
}, true);
|
|
116738
|
+
}
|
|
116739
|
+
}
|
|
116740
|
+
|
|
116741
|
+
UpdateInputOutputBehavior.$inject = [
|
|
116742
|
+
'commandStack',
|
|
116743
|
+
'eventBus'
|
|
116744
|
+
];
|
|
116745
|
+
|
|
116746
|
+
const HIGH_PRIORITY = 5000;
|
|
116747
|
+
|
|
116748
|
+
|
|
116749
|
+
/**
|
|
116750
|
+
* Camunda BPMN specific camunda:resultVariable behavior ensuring
|
|
116751
|
+
* camunda:mapDecisionResult is removed when camunda:resultVariable is removed.
|
|
116752
|
+
*/
|
|
116753
|
+
class UpdateResultVariableBehavior extends CommandInterceptor$1 {
|
|
116754
|
+
constructor(eventBus) {
|
|
116755
|
+
super(eventBus);
|
|
116756
|
+
|
|
116757
|
+
this.preExecute([
|
|
116758
|
+
'element.updateProperties',
|
|
116759
|
+
'element.updateModdleProperties'
|
|
116760
|
+
], HIGH_PRIORITY, function(context) {
|
|
116761
|
+
const {
|
|
116762
|
+
element,
|
|
116763
|
+
moddleElement,
|
|
116764
|
+
properties
|
|
116765
|
+
} = context;
|
|
116766
|
+
|
|
116767
|
+
const businessObject = moddleElement || getBusinessObject$1(element);
|
|
116768
|
+
|
|
116769
|
+
if (
|
|
116770
|
+
is$5(element, 'camunda:DmnCapable')
|
|
116771
|
+
&& is$5(businessObject, 'camunda:DmnCapable')
|
|
116772
|
+
&& has$2(properties, 'camunda:resultVariable')
|
|
116773
|
+
&& isEmpty(properties[ 'camunda:resultVariable' ])
|
|
116774
|
+
) {
|
|
116775
|
+
properties[ 'camunda:mapDecisionResult' ] = undefined;
|
|
116776
|
+
}
|
|
116777
|
+
}, true);
|
|
116778
|
+
|
|
116779
|
+
}
|
|
116780
|
+
}
|
|
116781
|
+
|
|
116782
|
+
UpdateResultVariableBehavior.$inject = [
|
|
116783
|
+
'eventBus'
|
|
116415
116784
|
];
|
|
116416
116785
|
|
|
116417
|
-
|
|
116418
|
-
|
|
116419
|
-
|
|
116420
|
-
|
|
116421
|
-
|
|
116422
|
-
|
|
116423
|
-
|
|
116424
|
-
|
|
116425
|
-
|
|
116426
|
-
|
|
116427
|
-
|
|
116428
|
-
|
|
116429
|
-
|
|
116430
|
-
|
|
116431
|
-
|
|
116432
|
-
|
|
116433
|
-
|
|
116434
|
-
|
|
116435
|
-
|
|
116436
|
-
|
|
116437
|
-
|
|
116438
|
-
|
|
116439
|
-
|
|
116440
|
-
|
|
116441
|
-
|
|
116442
|
-
|
|
116443
|
-
|
|
116444
|
-
|
|
116445
|
-
|
|
116446
|
-
|
|
116447
|
-
|
|
116448
|
-
|
|
116449
|
-
|
|
116450
|
-
|
|
116451
|
-
|
|
116452
|
-
|
|
116453
|
-
|
|
116454
|
-
|
|
116455
|
-
|
|
116456
|
-
|
|
116457
|
-
|
|
116786
|
+
// helpers //////////
|
|
116787
|
+
|
|
116788
|
+
function isEmpty(value) {
|
|
116789
|
+
return value == undefined || value === '';
|
|
116790
|
+
}
|
|
116791
|
+
|
|
116792
|
+
/**
|
|
116793
|
+
* Camunda BPMN specific user task forms behavior.
|
|
116794
|
+
*/
|
|
116795
|
+
let UserTaskFormsBehavior$1 = class UserTaskFormsBehavior extends CommandInterceptor$1 {
|
|
116796
|
+
constructor(eventBus) {
|
|
116797
|
+
super(eventBus);
|
|
116798
|
+
|
|
116799
|
+
/**
|
|
116800
|
+
* Ensure that only one of the following options is configured:
|
|
116801
|
+
*
|
|
116802
|
+
* 1. embedded, external or Camunda forms using camunda:formKey
|
|
116803
|
+
* 2. Camunda forms using camunda:formRef
|
|
116804
|
+
*/
|
|
116805
|
+
this.preExecute([
|
|
116806
|
+
'element.updateProperties',
|
|
116807
|
+
'element.updateModdleProperties'
|
|
116808
|
+
], function(context) {
|
|
116809
|
+
const {
|
|
116810
|
+
element,
|
|
116811
|
+
moddleElement,
|
|
116812
|
+
properties
|
|
116813
|
+
} = context;
|
|
116814
|
+
|
|
116815
|
+
const businessObject = moddleElement || getBusinessObject$1(element);
|
|
116816
|
+
|
|
116817
|
+
if (has$2(properties, 'camunda:formKey')) {
|
|
116818
|
+
Object.assign(properties, {
|
|
116819
|
+
'camunda:formRef': undefined,
|
|
116820
|
+
'camunda:formRefBinding': undefined,
|
|
116821
|
+
'camunda:formRefVersion': undefined
|
|
116822
|
+
});
|
|
116823
|
+
} else if (has$2(properties, 'camunda:formRef')) {
|
|
116824
|
+
Object.assign(properties, {
|
|
116825
|
+
'camunda:formKey': undefined
|
|
116826
|
+
});
|
|
116827
|
+
|
|
116828
|
+
if (isUndefined$4(properties[ 'camunda:formRef' ])) {
|
|
116829
|
+
Object.assign(properties, {
|
|
116830
|
+
'camunda:formRefBinding': undefined,
|
|
116831
|
+
'camunda:formRefVersion': undefined
|
|
116832
|
+
});
|
|
116833
|
+
}
|
|
116834
|
+
|
|
116835
|
+
if (!has$2(properties, 'camunda:formRefBinding') && isUndefined$4(businessObject.get('camunda:formRefBinding'))) {
|
|
116836
|
+
Object.assign(properties, {
|
|
116837
|
+
'camunda:formRefBinding': 'latest'
|
|
116838
|
+
});
|
|
116839
|
+
}
|
|
116840
|
+
}
|
|
116841
|
+
|
|
116842
|
+
if (has$2(properties, 'camunda:formRefBinding') && properties[ 'camunda:formRefBinding' ] !== 'version') {
|
|
116843
|
+
Object.assign(properties, {
|
|
116844
|
+
'camunda:formRefVersion': undefined
|
|
116845
|
+
});
|
|
116846
|
+
}
|
|
116847
|
+
}, true);
|
|
116848
|
+
|
|
116849
|
+
}
|
|
116850
|
+
};
|
|
116851
|
+
|
|
116852
|
+
UserTaskFormsBehavior$1.$inject = [ 'eventBus' ];
|
|
116853
|
+
|
|
116854
|
+
/**
|
|
116855
|
+
* Camunda BPMN specific user task generated forms behavior.
|
|
116856
|
+
*
|
|
116857
|
+
* 1. Removes camunda:FormField#values if camunda:FormField#type is changed to something other than enum.
|
|
116858
|
+
* 2. Updates camunda:FormData#businessKey if camunda:FormField#id is changed.
|
|
116859
|
+
* 3. Removes camunda:FormData#businessKey if camunda:FormField is removed.
|
|
116860
|
+
*/
|
|
116861
|
+
class UserTaskFormsBehavior extends CommandInterceptor$1 {
|
|
116862
|
+
constructor(eventBus, modeling) {
|
|
116863
|
+
super(eventBus);
|
|
116864
|
+
|
|
116865
|
+
/**
|
|
116866
|
+
* Remove camunda:FormField#values if camunda:FormField#type is changed to
|
|
116867
|
+
* something other than enum.
|
|
116868
|
+
*/
|
|
116869
|
+
this.preExecute('element.updateModdleProperties', function(context) {
|
|
116870
|
+
const {
|
|
116871
|
+
moddleElement,
|
|
116872
|
+
properties
|
|
116873
|
+
} = context;
|
|
116874
|
+
|
|
116875
|
+
if (!is$5(moddleElement, 'camunda:FormField')) {
|
|
116876
|
+
return;
|
|
116877
|
+
}
|
|
116878
|
+
|
|
116879
|
+
if (
|
|
116880
|
+
('type' in properties && properties[ 'type' ] !== 'enum')
|
|
116881
|
+
|| 'camunda:type' in properties && properties[ 'camunda:type' ] !== 'enum'
|
|
116882
|
+
) {
|
|
116883
|
+
properties[ 'camunda:values' ] = undefined;
|
|
116884
|
+
}
|
|
116885
|
+
}, true);
|
|
116886
|
+
|
|
116887
|
+
/**
|
|
116888
|
+
* Update camunda:FormData#businessKey if camunda:FormField#id is changed.
|
|
116889
|
+
*/
|
|
116890
|
+
this.preExecute('element.updateModdleProperties', function(context) {
|
|
116891
|
+
const {
|
|
116892
|
+
element,
|
|
116893
|
+
moddleElement,
|
|
116894
|
+
properties
|
|
116895
|
+
} = context;
|
|
116896
|
+
|
|
116897
|
+
if (!is$5(moddleElement, 'camunda:FormField')
|
|
116898
|
+
|| (!has$2(properties, 'id') && !has$2(properties, 'camunda:id'))
|
|
116899
|
+
) {
|
|
116900
|
+
return;
|
|
116901
|
+
}
|
|
116902
|
+
|
|
116903
|
+
const formData = getFormData(element);
|
|
116904
|
+
|
|
116905
|
+
const businessKey = formData.get('camunda:businessKey');
|
|
116906
|
+
|
|
116907
|
+
if (!businessKey) {
|
|
116908
|
+
return;
|
|
116909
|
+
}
|
|
116910
|
+
|
|
116911
|
+
if (isBusinessKey(moddleElement, formData)) {
|
|
116912
|
+
modeling.updateModdleProperties(element, formData, {
|
|
116913
|
+
'camunda:businessKey': has$2(properties, 'id') ? properties.id : properties[ 'camunda:id' ]
|
|
116914
|
+
});
|
|
116915
|
+
}
|
|
116916
|
+
}, true);
|
|
116917
|
+
|
|
116918
|
+
/**
|
|
116919
|
+
* Remove camunda:FormData#businessKey if camunda:FormField is removed.
|
|
116920
|
+
*/
|
|
116921
|
+
this.postExecute('element.updateModdleProperties', function(context) {
|
|
116922
|
+
const {
|
|
116923
|
+
element,
|
|
116924
|
+
moddleElement,
|
|
116925
|
+
properties
|
|
116926
|
+
} = context;
|
|
116458
116927
|
|
|
116459
|
-
|
|
116460
|
-
|
|
116461
|
-
|
|
116462
|
-
/**
|
|
116463
|
-
* Camunda BPMN specific behavior ensuring camunda:FailedJobRetryTimeCycle is
|
|
116464
|
-
* removed when both camunda:asyncAfter and camunda:asyncBefore set to false.
|
|
116465
|
-
* Doesn't apply if element has bpmn:TimerEventDefinition.
|
|
116466
|
-
*/
|
|
116467
|
-
class DeleteRetryTimeCycleBehavior extends CommandInterceptor$1 {
|
|
116468
|
-
constructor(commandStack, eventBus) {
|
|
116469
|
-
super(eventBus);
|
|
116470
|
-
|
|
116471
|
-
this.postExecute([
|
|
116472
|
-
'element.updateProperties',
|
|
116473
|
-
'element.updateModdleProperties'
|
|
116474
|
-
], HIGH_PRIORITY$2, function(context) {
|
|
116475
|
-
const {
|
|
116476
|
-
element,
|
|
116477
|
-
moddleElement,
|
|
116478
|
-
properties = {}
|
|
116479
|
-
} = context;
|
|
116480
|
-
|
|
116481
|
-
const asyncAfter = properties[ 'camunda:asyncAfter' ],
|
|
116482
|
-
asyncBefore = properties[ 'camunda:asyncBefore' ];
|
|
116483
|
-
|
|
116484
|
-
const businessObject = moddleElement || getBusinessObject$1(element);
|
|
116485
|
-
|
|
116486
|
-
const failedJobRetryTimeCycle = getFailedJobRetryTimeCycle(element);
|
|
116487
|
-
|
|
116488
|
-
if (
|
|
116489
|
-
!is$5(element, 'camunda:AsyncCapable')
|
|
116490
|
-
|| !is$5(businessObject, 'camunda:AsyncCapable')
|
|
116491
|
-
|| (asyncAfter !== false && asyncBefore !== false)
|
|
116492
|
-
|| !failedJobRetryTimeCycle
|
|
116493
|
-
|| getTimerEventDefinition(element)
|
|
116494
|
-
|| isAsyncBefore$1(businessObject)
|
|
116495
|
-
|| isAsyncAfter$1(businessObject)
|
|
116496
|
-
) {
|
|
116497
|
-
return;
|
|
116498
|
-
}
|
|
116499
|
-
|
|
116500
|
-
removeExtensionElements(element, businessObject, failedJobRetryTimeCycle, commandStack);
|
|
116501
|
-
}, true);
|
|
116502
|
-
|
|
116503
|
-
}
|
|
116504
|
-
}
|
|
116505
|
-
|
|
116506
|
-
DeleteRetryTimeCycleBehavior.$inject = [
|
|
116507
|
-
'commandStack',
|
|
116508
|
-
'eventBus'
|
|
116509
|
-
];
|
|
116510
|
-
|
|
116511
|
-
|
|
116512
|
-
// helpers //////////
|
|
116513
|
-
|
|
116514
|
-
function isAsyncBefore$1(businessObject) {
|
|
116515
|
-
return !!(businessObject.get('camunda:asyncBefore') || businessObject.get('camunda:async'));
|
|
116516
|
-
}
|
|
116517
|
-
|
|
116518
|
-
function isAsyncAfter$1(businessObject) {
|
|
116519
|
-
return !!businessObject.get('camunda:asyncAfter');
|
|
116520
|
-
}
|
|
116521
|
-
|
|
116522
|
-
function getFailedJobRetryTimeCycle(element) {
|
|
116523
|
-
return getExtensionElementsList(element, 'camunda:FailedJobRetryTimeCycle')[ 0 ];
|
|
116524
|
-
}
|
|
116525
|
-
|
|
116526
|
-
function getTimerEventDefinition(element) {
|
|
116527
|
-
return getEventDefinition$1(element, 'bpmn:TimerEventDefinition');
|
|
116528
|
-
}
|
|
116529
|
-
|
|
116530
|
-
function getEventDefinition$1(element, type) {
|
|
116531
|
-
const businessObject = getBusinessObject$1(element);
|
|
116532
|
-
|
|
116533
|
-
const eventDefinitions = businessObject.get('eventDefinitions');
|
|
116534
|
-
|
|
116535
|
-
if (!eventDefinitions || !eventDefinitions.length) {
|
|
116536
|
-
return;
|
|
116537
|
-
}
|
|
116538
|
-
|
|
116539
|
-
return eventDefinitions.find((eventDefinition) => {
|
|
116540
|
-
return is$5(eventDefinition, type);
|
|
116541
|
-
});
|
|
116542
|
-
}
|
|
116928
|
+
if (!is$5(moddleElement, 'camunda:FormData') || !has$2(properties, 'fields')) {
|
|
116929
|
+
return;
|
|
116930
|
+
}
|
|
116543
116931
|
|
|
116544
|
-
|
|
116545
|
-
* Camunda BPMN specific behavior ensuring camunda:initiator property is removed
|
|
116546
|
-
* when start event is created in or moved to sub process.
|
|
116547
|
-
*/
|
|
116548
|
-
class RemoveInitiatorBehaviour extends CommandInterceptor$1 {
|
|
116549
|
-
constructor(eventBus, modeling) {
|
|
116550
|
-
super(eventBus);
|
|
116551
|
-
|
|
116552
|
-
this.postExecuted([ 'shape.create','shape.move' ], (context) => {
|
|
116553
|
-
const {
|
|
116554
|
-
shape,
|
|
116555
|
-
parent,
|
|
116556
|
-
newParent = parent
|
|
116557
|
-
} = context;
|
|
116558
|
-
|
|
116559
|
-
const businessObject = getBusinessObject$1(shape);
|
|
116560
|
-
|
|
116561
|
-
if (is$5(shape, 'bpmn:StartEvent') && isDefined(businessObject.get('camunda:initiator'))) {
|
|
116562
|
-
if ((is$5(newParent || parent, 'bpmn:SubProcess'))) {
|
|
116563
|
-
modeling.updateProperties(shape, { 'camunda:initiator': undefined });
|
|
116564
|
-
}
|
|
116565
|
-
}
|
|
116566
|
-
}, true);
|
|
116567
|
-
}
|
|
116568
|
-
}
|
|
116569
|
-
|
|
116570
|
-
RemoveInitiatorBehaviour.$inject = [
|
|
116571
|
-
'eventBus',
|
|
116572
|
-
'modeling'
|
|
116573
|
-
];
|
|
116932
|
+
const businessKey = moddleElement.get('camunda:businessKey');
|
|
116574
116933
|
|
|
116575
|
-
|
|
116576
|
-
|
|
116577
|
-
|
|
116578
|
-
*/
|
|
116579
|
-
class RemoveVariableEventBehaviour extends CommandInterceptor$1 {
|
|
116580
|
-
constructor(bpmnFactory, eventBus, moddleCopy, modeling) {
|
|
116581
|
-
super(eventBus);
|
|
116582
|
-
|
|
116583
|
-
this.postExecuted([ 'shape.create', 'shape.move' ], (context) => {
|
|
116584
|
-
const {
|
|
116585
|
-
parent,
|
|
116586
|
-
newParent = parent,
|
|
116587
|
-
shape
|
|
116588
|
-
} = context;
|
|
116589
|
-
|
|
116590
|
-
const newParentBusinessObject = getBusinessObject$1(newParent),
|
|
116591
|
-
shapeBusinessObject = getBusinessObject$1(shape);
|
|
116592
|
-
|
|
116593
|
-
if (is$5(shape, 'bpmn:StartEvent')) {
|
|
116594
|
-
|
|
116595
|
-
if (!(is$5(newParent, 'bpmn:SubProcess') && newParentBusinessObject.get('triggeredByEvent'))) {
|
|
116596
|
-
const eventDefinitions = shapeBusinessObject.get('eventDefinitions').slice();
|
|
116597
|
-
|
|
116598
|
-
const update = eventDefinitions.reduce((update, eventDefinition, index) => {
|
|
116599
|
-
if (!is$5(eventDefinition, 'bpmn:ConditionalEventDefinition')) {
|
|
116600
|
-
return;
|
|
116601
|
-
}
|
|
116602
|
-
|
|
116603
|
-
if (eventDefinition.get('camunda:variableEvents')) {
|
|
116604
|
-
const conditionalEventDefinition = bpmnFactory.create('bpmn:ConditionalEventDefinition');
|
|
116605
|
-
|
|
116606
|
-
moddleCopy.copyElement(eventDefinition, conditionalEventDefinition);
|
|
116607
|
-
|
|
116608
|
-
conditionalEventDefinition.$parent = eventDefinition.$parent;
|
|
116609
|
-
|
|
116610
|
-
// remove camunda:variableEvents property
|
|
116611
|
-
conditionalEventDefinition.variableEvents = undefined;
|
|
116612
|
-
|
|
116613
|
-
eventDefinitions[ index ] = conditionalEventDefinition;
|
|
116614
|
-
|
|
116615
|
-
return true;
|
|
116616
|
-
}
|
|
116617
|
-
|
|
116618
|
-
return update;
|
|
116619
|
-
}, false);
|
|
116620
|
-
|
|
116621
|
-
if (update) {
|
|
116622
|
-
modeling.updateProperties(shape, {
|
|
116623
|
-
eventDefinitions: eventDefinitions
|
|
116624
|
-
});
|
|
116625
|
-
}
|
|
116626
|
-
}
|
|
116627
|
-
}
|
|
116628
|
-
}, true);
|
|
116629
|
-
}
|
|
116630
|
-
}
|
|
116631
|
-
|
|
116632
|
-
RemoveVariableEventBehaviour.$inject = [
|
|
116633
|
-
'bpmnFactory',
|
|
116634
|
-
'eventBus',
|
|
116635
|
-
'moddleCopy',
|
|
116636
|
-
'modeling'
|
|
116637
|
-
];
|
|
116934
|
+
if (!businessKey) {
|
|
116935
|
+
return;
|
|
116936
|
+
}
|
|
116638
116937
|
|
|
116639
|
-
|
|
116640
|
-
|
|
116641
|
-
|
|
116642
|
-
/**
|
|
116643
|
-
* Camunda BPMN specific behavior ensuring camunda:exclusive is set to true if
|
|
116644
|
-
* camunda:asyncBefore or camunda:asyncAfter is set to false.
|
|
116645
|
-
*/
|
|
116646
|
-
class UpdateCamundaExclusiveBehavior extends CommandInterceptor$1 {
|
|
116647
|
-
constructor(eventBus) {
|
|
116648
|
-
super(eventBus);
|
|
116649
|
-
|
|
116650
|
-
this.preExecute([
|
|
116651
|
-
'element.updateProperties',
|
|
116652
|
-
'element.updateModdleProperties',
|
|
116653
|
-
], HIGH_PRIORITY$1, function(context) {
|
|
116654
|
-
const {
|
|
116655
|
-
element,
|
|
116656
|
-
moddleElement,
|
|
116657
|
-
properties = {}
|
|
116658
|
-
} = context;
|
|
116659
|
-
|
|
116660
|
-
const businessObject = moddleElement || getBusinessObject$1(element);
|
|
116661
|
-
|
|
116662
|
-
const asyncAfter = properties[ 'camunda:asyncAfter' ],
|
|
116663
|
-
asyncBefore = properties[ 'camunda:asyncBefore' ];
|
|
116664
|
-
|
|
116665
|
-
if (!is$5(element, 'camunda:AsyncCapable')
|
|
116666
|
-
|| !is$5(businessObject, 'camunda:AsyncCapable')
|
|
116667
|
-
|| (asyncAfter !== false && asyncBefore !== false)
|
|
116668
|
-
|| isExclusive(businessObject)
|
|
116669
|
-
|| (isAsyncAfter(businessObject) && asyncAfter !== false)
|
|
116670
|
-
|| (isAsyncBefore(businessObject) && asyncBefore !== false)
|
|
116671
|
-
|| (asyncAfter === true || asyncBefore === true)
|
|
116672
|
-
) {
|
|
116673
|
-
return;
|
|
116674
|
-
}
|
|
116675
|
-
|
|
116676
|
-
properties[ 'camunda:exclusive' ] = true;
|
|
116677
|
-
}, true);
|
|
116678
|
-
|
|
116679
|
-
}
|
|
116680
|
-
}
|
|
116681
|
-
|
|
116682
|
-
UpdateCamundaExclusiveBehavior.$inject = [
|
|
116683
|
-
'eventBus'
|
|
116684
|
-
];
|
|
116685
|
-
|
|
116686
|
-
|
|
116687
|
-
// helpers //////////
|
|
116688
|
-
|
|
116689
|
-
function isAsyncBefore(businessObject) {
|
|
116690
|
-
return !!(businessObject.get('camunda:asyncBefore') || businessObject.get('camunda:async'));
|
|
116691
|
-
}
|
|
116692
|
-
|
|
116693
|
-
function isAsyncAfter(businessObject) {
|
|
116694
|
-
return !!businessObject.get('camunda:asyncAfter');
|
|
116695
|
-
}
|
|
116696
|
-
|
|
116697
|
-
function isExclusive(businessObject) {
|
|
116698
|
-
return !!businessObject.get('camunda:exclusive');
|
|
116699
|
-
}
|
|
116938
|
+
const fieldWithBusinessKey = moddleElement.get('fields').find(field => {
|
|
116939
|
+
return field.get('camunda:id') === businessKey;
|
|
116940
|
+
});
|
|
116700
116941
|
|
|
116701
|
-
|
|
116702
|
-
|
|
116703
|
-
|
|
116704
|
-
|
|
116705
|
-
|
|
116706
|
-
|
|
116707
|
-
|
|
116708
|
-
|
|
116709
|
-
function isInputOutputEmpty(inputOutput) {
|
|
116710
|
-
const inputParameters = getInputParameters$1(inputOutput);
|
|
116711
|
-
const outputParameters = getOutputParameters$1(inputOutput);
|
|
116712
|
-
|
|
116713
|
-
return !inputParameters.length && !outputParameters.length;
|
|
116942
|
+
if (!fieldWithBusinessKey) {
|
|
116943
|
+
modeling.updateModdleProperties(element, moddleElement, {
|
|
116944
|
+
'camunda:businessKey': undefined
|
|
116945
|
+
});
|
|
116946
|
+
}
|
|
116947
|
+
}, true);
|
|
116948
|
+
}
|
|
116714
116949
|
}
|
|
116715
116950
|
|
|
116716
|
-
const LOW_PRIORITY$1 = 250;
|
|
116717
|
-
|
|
116718
|
-
|
|
116719
|
-
/**
|
|
116720
|
-
* Camunda BPMN specific behavior ensuring empty camunda:InputOutput is removed.
|
|
116721
|
-
*/
|
|
116722
|
-
class UpdateInputOutputBehavior extends CommandInterceptor$1 {
|
|
116723
|
-
constructor(commandStack, eventBus) {
|
|
116724
|
-
super(eventBus);
|
|
116725
|
-
|
|
116726
|
-
this.postExecuted('element.updateModdleProperties', LOW_PRIORITY$1, function(context) {
|
|
116727
|
-
const {
|
|
116728
|
-
element,
|
|
116729
|
-
moddleElement
|
|
116730
|
-
} = context;
|
|
116731
|
-
|
|
116732
|
-
if (!is$5(moddleElement, 'camunda:InputOutput')) {
|
|
116733
|
-
return;
|
|
116734
|
-
}
|
|
116735
|
-
|
|
116736
|
-
if (isInputOutputEmpty(moddleElement)) {
|
|
116737
|
-
removeExtensionElements(element, getBusinessObject$1(element), moddleElement, commandStack);
|
|
116738
|
-
}
|
|
116739
|
-
}, true);
|
|
116740
|
-
}
|
|
116741
|
-
}
|
|
116742
|
-
|
|
116743
|
-
UpdateInputOutputBehavior.$inject = [
|
|
116744
|
-
'commandStack',
|
|
116745
|
-
'eventBus'
|
|
116746
|
-
];
|
|
116747
116951
|
|
|
116748
|
-
|
|
116749
|
-
|
|
116750
|
-
|
|
116751
|
-
|
|
116752
|
-
|
|
116753
|
-
|
|
116754
|
-
*/
|
|
116755
|
-
class UpdateResultVariableBehavior extends CommandInterceptor$1 {
|
|
116756
|
-
constructor(eventBus) {
|
|
116757
|
-
super(eventBus);
|
|
116758
|
-
|
|
116759
|
-
this.preExecute([
|
|
116760
|
-
'element.updateProperties',
|
|
116761
|
-
'element.updateModdleProperties'
|
|
116762
|
-
], HIGH_PRIORITY, function(context) {
|
|
116763
|
-
const {
|
|
116764
|
-
element,
|
|
116765
|
-
moddleElement,
|
|
116766
|
-
properties
|
|
116767
|
-
} = context;
|
|
116768
|
-
|
|
116769
|
-
const businessObject = moddleElement || getBusinessObject$1(element);
|
|
116770
|
-
|
|
116771
|
-
if (
|
|
116772
|
-
is$5(element, 'camunda:DmnCapable')
|
|
116773
|
-
&& is$5(businessObject, 'camunda:DmnCapable')
|
|
116774
|
-
&& has$2(properties, 'camunda:resultVariable')
|
|
116775
|
-
&& isEmpty(properties[ 'camunda:resultVariable' ])
|
|
116776
|
-
) {
|
|
116777
|
-
properties[ 'camunda:mapDecisionResult' ] = undefined;
|
|
116778
|
-
}
|
|
116779
|
-
}, true);
|
|
116780
|
-
|
|
116781
|
-
}
|
|
116782
|
-
}
|
|
116783
|
-
|
|
116784
|
-
UpdateResultVariableBehavior.$inject = [
|
|
116785
|
-
'eventBus'
|
|
116786
|
-
];
|
|
116787
|
-
|
|
116788
|
-
// helpers //////////
|
|
116789
|
-
|
|
116790
|
-
function isEmpty(value) {
|
|
116791
|
-
return value == undefined || value === '';
|
|
116952
|
+
UserTaskFormsBehavior.$inject = [ 'eventBus', 'modeling' ];
|
|
116953
|
+
|
|
116954
|
+
// helpers //////////
|
|
116955
|
+
|
|
116956
|
+
function isBusinessKey(formField, formData) {
|
|
116957
|
+
return formField.get('camunda:id') === formData.get('camunda:businessKey');
|
|
116792
116958
|
}
|
|
116793
116959
|
|
|
116794
|
-
|
|
116795
|
-
|
|
116796
|
-
|
|
116797
|
-
let UserTaskFormsBehavior$1 = class UserTaskFormsBehavior extends CommandInterceptor$1 {
|
|
116798
|
-
constructor(eventBus) {
|
|
116799
|
-
super(eventBus);
|
|
116800
|
-
|
|
116801
|
-
/**
|
|
116802
|
-
* Ensure that only one of the following options is configured:
|
|
116803
|
-
*
|
|
116804
|
-
* 1. embedded, external or Camunda forms using camunda:formKey
|
|
116805
|
-
* 2. Camunda forms using camunda:formRef
|
|
116806
|
-
*/
|
|
116807
|
-
this.preExecute([
|
|
116808
|
-
'element.updateProperties',
|
|
116809
|
-
'element.updateModdleProperties'
|
|
116810
|
-
], function(context) {
|
|
116811
|
-
const {
|
|
116812
|
-
element,
|
|
116813
|
-
moddleElement,
|
|
116814
|
-
properties
|
|
116815
|
-
} = context;
|
|
116816
|
-
|
|
116817
|
-
const businessObject = moddleElement || getBusinessObject$1(element);
|
|
116818
|
-
|
|
116819
|
-
if (has$2(properties, 'camunda:formKey')) {
|
|
116820
|
-
Object.assign(properties, {
|
|
116821
|
-
'camunda:formRef': undefined,
|
|
116822
|
-
'camunda:formRefBinding': undefined,
|
|
116823
|
-
'camunda:formRefVersion': undefined
|
|
116824
|
-
});
|
|
116825
|
-
} else if (has$2(properties, 'camunda:formRef')) {
|
|
116826
|
-
Object.assign(properties, {
|
|
116827
|
-
'camunda:formKey': undefined
|
|
116828
|
-
});
|
|
116829
|
-
|
|
116830
|
-
if (isUndefined$4(properties[ 'camunda:formRef' ])) {
|
|
116831
|
-
Object.assign(properties, {
|
|
116832
|
-
'camunda:formRefBinding': undefined,
|
|
116833
|
-
'camunda:formRefVersion': undefined
|
|
116834
|
-
});
|
|
116835
|
-
}
|
|
116836
|
-
|
|
116837
|
-
if (!has$2(properties, 'camunda:formRefBinding') && isUndefined$4(businessObject.get('camunda:formRefBinding'))) {
|
|
116838
|
-
Object.assign(properties, {
|
|
116839
|
-
'camunda:formRefBinding': 'latest'
|
|
116840
|
-
});
|
|
116841
|
-
}
|
|
116842
|
-
}
|
|
116843
|
-
|
|
116844
|
-
if (has$2(properties, 'camunda:formRefBinding') && properties[ 'camunda:formRefBinding' ] !== 'version') {
|
|
116845
|
-
Object.assign(properties, {
|
|
116846
|
-
'camunda:formRefVersion': undefined
|
|
116847
|
-
});
|
|
116848
|
-
}
|
|
116849
|
-
}, true);
|
|
116850
|
-
|
|
116851
|
-
}
|
|
116852
|
-
};
|
|
116853
|
-
|
|
116854
|
-
UserTaskFormsBehavior$1.$inject = [ 'eventBus' ];
|
|
116960
|
+
function getFormData(element) {
|
|
116961
|
+
const businessObject = getBusinessObject$1(element),
|
|
116962
|
+
extensionElements = businessObject.get('extensionElements');
|
|
116855
116963
|
|
|
116856
|
-
|
|
116857
|
-
|
|
116858
|
-
|
|
116859
|
-
|
|
116860
|
-
|
|
116861
|
-
|
|
116862
|
-
|
|
116863
|
-
|
|
116864
|
-
|
|
116865
|
-
super(eventBus);
|
|
116866
|
-
|
|
116867
|
-
/**
|
|
116868
|
-
* Remove camunda:FormField#values if camunda:FormField#type is changed to
|
|
116869
|
-
* something other than enum.
|
|
116870
|
-
*/
|
|
116871
|
-
this.preExecute('element.updateModdleProperties', function(context) {
|
|
116872
|
-
const {
|
|
116873
|
-
moddleElement,
|
|
116874
|
-
properties
|
|
116875
|
-
} = context;
|
|
116876
|
-
|
|
116877
|
-
if (!is$5(moddleElement, 'camunda:FormField')) {
|
|
116878
|
-
return;
|
|
116879
|
-
}
|
|
116880
|
-
|
|
116881
|
-
if (
|
|
116882
|
-
('type' in properties && properties[ 'type' ] !== 'enum')
|
|
116883
|
-
|| 'camunda:type' in properties && properties[ 'camunda:type' ] !== 'enum'
|
|
116884
|
-
) {
|
|
116885
|
-
properties[ 'camunda:values' ] = undefined;
|
|
116886
|
-
}
|
|
116887
|
-
}, true);
|
|
116888
|
-
|
|
116889
|
-
/**
|
|
116890
|
-
* Update camunda:FormData#businessKey if camunda:FormField#id is changed.
|
|
116891
|
-
*/
|
|
116892
|
-
this.preExecute('element.updateModdleProperties', function(context) {
|
|
116893
|
-
const {
|
|
116894
|
-
element,
|
|
116895
|
-
moddleElement,
|
|
116896
|
-
properties
|
|
116897
|
-
} = context;
|
|
116898
|
-
|
|
116899
|
-
if (!is$5(moddleElement, 'camunda:FormField')
|
|
116900
|
-
|| (!has$2(properties, 'id') && !has$2(properties, 'camunda:id'))
|
|
116901
|
-
) {
|
|
116902
|
-
return;
|
|
116903
|
-
}
|
|
116904
|
-
|
|
116905
|
-
const formData = getFormData(element);
|
|
116906
|
-
|
|
116907
|
-
const businessKey = formData.get('camunda:businessKey');
|
|
116908
|
-
|
|
116909
|
-
if (!businessKey) {
|
|
116910
|
-
return;
|
|
116911
|
-
}
|
|
116912
|
-
|
|
116913
|
-
if (isBusinessKey(moddleElement, formData)) {
|
|
116914
|
-
modeling.updateModdleProperties(element, formData, {
|
|
116915
|
-
'camunda:businessKey': has$2(properties, 'id') ? properties.id : properties[ 'camunda:id' ]
|
|
116916
|
-
});
|
|
116917
|
-
}
|
|
116918
|
-
}, true);
|
|
116919
|
-
|
|
116920
|
-
/**
|
|
116921
|
-
* Remove camunda:FormData#businessKey if camunda:FormField is removed.
|
|
116922
|
-
*/
|
|
116923
|
-
this.postExecute('element.updateModdleProperties', function(context) {
|
|
116924
|
-
const {
|
|
116925
|
-
element,
|
|
116926
|
-
moddleElement,
|
|
116927
|
-
properties
|
|
116928
|
-
} = context;
|
|
116929
|
-
|
|
116930
|
-
if (!is$5(moddleElement, 'camunda:FormData') || !has$2(properties, 'fields')) {
|
|
116931
|
-
return;
|
|
116932
|
-
}
|
|
116933
|
-
|
|
116934
|
-
const businessKey = moddleElement.get('camunda:businessKey');
|
|
116935
|
-
|
|
116936
|
-
if (!businessKey) {
|
|
116937
|
-
return;
|
|
116938
|
-
}
|
|
116939
|
-
|
|
116940
|
-
const fieldWithBusinessKey = moddleElement.get('fields').find(field => {
|
|
116941
|
-
return field.get('camunda:id') === businessKey;
|
|
116942
|
-
});
|
|
116943
|
-
|
|
116944
|
-
if (!fieldWithBusinessKey) {
|
|
116945
|
-
modeling.updateModdleProperties(element, moddleElement, {
|
|
116946
|
-
'camunda:businessKey': undefined
|
|
116947
|
-
});
|
|
116948
|
-
}
|
|
116949
|
-
}, true);
|
|
116950
|
-
}
|
|
116951
|
-
}
|
|
116952
|
-
|
|
116953
|
-
|
|
116954
|
-
UserTaskFormsBehavior.$inject = [ 'eventBus', 'modeling' ];
|
|
116955
|
-
|
|
116956
|
-
// helpers //////////
|
|
116957
|
-
|
|
116958
|
-
function isBusinessKey(formField, formData) {
|
|
116959
|
-
return formField.get('camunda:id') === formData.get('camunda:businessKey');
|
|
116960
|
-
}
|
|
116961
|
-
|
|
116962
|
-
function getFormData(element) {
|
|
116963
|
-
const businessObject = getBusinessObject$1(element),
|
|
116964
|
-
extensionElements = businessObject.get('extensionElements');
|
|
116965
|
-
|
|
116966
|
-
if (!extensionElements) {
|
|
116967
|
-
return;
|
|
116968
|
-
}
|
|
116969
|
-
|
|
116970
|
-
const values = extensionElements.get('values');
|
|
116971
|
-
|
|
116972
|
-
return values.find((value) => {
|
|
116973
|
-
return is$5(value, 'camunda:FormData');
|
|
116974
|
-
});
|
|
116964
|
+
if (!extensionElements) {
|
|
116965
|
+
return;
|
|
116966
|
+
}
|
|
116967
|
+
|
|
116968
|
+
const values = extensionElements.get('values');
|
|
116969
|
+
|
|
116970
|
+
return values.find((value) => {
|
|
116971
|
+
return is$5(value, 'camunda:FormData');
|
|
116972
|
+
});
|
|
116975
116973
|
}
|
|
116976
116974
|
|
|
116977
|
-
var behaviorsModule = {
|
|
116978
|
-
__init__: [
|
|
116979
|
-
'copyPasteBehavior',
|
|
116980
|
-
'copyPasteRootElementBehavior',
|
|
116981
|
-
'deleteErrorEventDefinitionBehavior',
|
|
116982
|
-
'deleteParticipantBehaviour',
|
|
116983
|
-
'deleteRetryTimeCycleBehavior',
|
|
116984
|
-
'removeInitiatorBehaviour',
|
|
116985
|
-
'removeVariableEventBehaviour',
|
|
116986
|
-
'updateCamundaExclusiveBehavior',
|
|
116987
|
-
'updateResultVariableBehavior',
|
|
116988
|
-
'updateInputOutputBehavior',
|
|
116989
|
-
'userTaskFormsBehavior',
|
|
116990
|
-
'userTaskGeneratedFormsBehavior'
|
|
116991
|
-
],
|
|
116992
|
-
copyPasteBehavior: [ 'type', CopyPasteBehavior ],
|
|
116993
|
-
copyPasteRootElementBehavior: [ 'type', CopyPasteRootElementBehavior ],
|
|
116994
|
-
deleteErrorEventDefinitionBehavior: [ 'type', DeleteErrorEventDefinitionBehavior ],
|
|
116995
|
-
deleteParticipantBehaviour: [ 'type', DeleteParticipantBehaviour ],
|
|
116996
|
-
deleteRetryTimeCycleBehavior: [ 'type', DeleteRetryTimeCycleBehavior ],
|
|
116997
|
-
removeInitiatorBehaviour: [ 'type', RemoveInitiatorBehaviour ],
|
|
116998
|
-
removeVariableEventBehaviour: [ 'type', RemoveVariableEventBehaviour ],
|
|
116999
|
-
updateCamundaExclusiveBehavior: [ 'type', UpdateCamundaExclusiveBehavior ],
|
|
117000
|
-
updateResultVariableBehavior: [ 'type', UpdateResultVariableBehavior ],
|
|
117001
|
-
updateInputOutputBehavior: [ 'type', UpdateInputOutputBehavior ],
|
|
117002
|
-
userTaskFormsBehavior: [ 'type', UserTaskFormsBehavior$1 ],
|
|
117003
|
-
userTaskGeneratedFormsBehavior: [ 'type', UserTaskFormsBehavior ]
|
|
116975
|
+
var behaviorsModule = {
|
|
116976
|
+
__init__: [
|
|
116977
|
+
'copyPasteBehavior',
|
|
116978
|
+
'copyPasteRootElementBehavior',
|
|
116979
|
+
'deleteErrorEventDefinitionBehavior',
|
|
116980
|
+
'deleteParticipantBehaviour',
|
|
116981
|
+
'deleteRetryTimeCycleBehavior',
|
|
116982
|
+
'removeInitiatorBehaviour',
|
|
116983
|
+
'removeVariableEventBehaviour',
|
|
116984
|
+
'updateCamundaExclusiveBehavior',
|
|
116985
|
+
'updateResultVariableBehavior',
|
|
116986
|
+
'updateInputOutputBehavior',
|
|
116987
|
+
'userTaskFormsBehavior',
|
|
116988
|
+
'userTaskGeneratedFormsBehavior'
|
|
116989
|
+
],
|
|
116990
|
+
copyPasteBehavior: [ 'type', CopyPasteBehavior ],
|
|
116991
|
+
copyPasteRootElementBehavior: [ 'type', CopyPasteRootElementBehavior ],
|
|
116992
|
+
deleteErrorEventDefinitionBehavior: [ 'type', DeleteErrorEventDefinitionBehavior ],
|
|
116993
|
+
deleteParticipantBehaviour: [ 'type', DeleteParticipantBehaviour ],
|
|
116994
|
+
deleteRetryTimeCycleBehavior: [ 'type', DeleteRetryTimeCycleBehavior ],
|
|
116995
|
+
removeInitiatorBehaviour: [ 'type', RemoveInitiatorBehaviour ],
|
|
116996
|
+
removeVariableEventBehaviour: [ 'type', RemoveVariableEventBehaviour ],
|
|
116997
|
+
updateCamundaExclusiveBehavior: [ 'type', UpdateCamundaExclusiveBehavior ],
|
|
116998
|
+
updateResultVariableBehavior: [ 'type', UpdateResultVariableBehavior ],
|
|
116999
|
+
updateInputOutputBehavior: [ 'type', UpdateInputOutputBehavior ],
|
|
117000
|
+
userTaskFormsBehavior: [ 'type', UserTaskFormsBehavior$1 ],
|
|
117001
|
+
userTaskGeneratedFormsBehavior: [ 'type', UserTaskFormsBehavior ]
|
|
117004
117002
|
};
|
|
117005
117003
|
|
|
117006
117004
|
/**
|