camunda-bpmn-js 4.15.0 → 4.17.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.
@@ -111302,7 +111302,7 @@
111302
111302
  monospace,
111303
111303
  onFocus,
111304
111304
  onBlur,
111305
- autoResize,
111305
+ autoResize = true,
111306
111306
  placeholder,
111307
111307
  rows = autoResize ? 1 : 2,
111308
111308
  tooltip
@@ -115434,8 +115434,8 @@
115434
115434
  });
115435
115435
  const selectedElement = state.selectedElement;
115436
115436
 
115437
- /**
115438
- * @param {djs.model.Base | Array<djs.model.Base>} element
115437
+ /**
115438
+ * @param {djs.model.Base | Array<djs.model.Base>} element
115439
115439
  */
115440
115440
  const _update = element => {
115441
115441
  if (!element) {
@@ -115620,10 +115620,10 @@
115620
115620
 
115621
115621
  const DEFAULT_PRIORITY$1 = 1000;
115622
115622
 
115623
- /**
115624
- * @typedef { import('@bpmn-io/properties-panel').GroupDefinition } GroupDefinition
115625
- * @typedef { import('@bpmn-io/properties-panel').ListGroupDefinition } ListGroupDefinition
115626
- * @typedef { { getGroups: (ModdleElement) => (Array{GroupDefinition|ListGroupDefinition}) => Array{GroupDefinition|ListGroupDefinition}) } PropertiesProvider
115623
+ /**
115624
+ * @typedef { import('@bpmn-io/properties-panel').GroupDefinition } GroupDefinition
115625
+ * @typedef { import('@bpmn-io/properties-panel').ListGroupDefinition } ListGroupDefinition
115626
+ * @typedef { { getGroups: (ModdleElement) => (Array{GroupDefinition|ListGroupDefinition}) => Array{GroupDefinition|ListGroupDefinition}) } PropertiesProvider
115627
115627
  */
115628
115628
 
115629
115629
  class BpmnPropertiesPanelRenderer {
@@ -115660,10 +115660,10 @@
115660
115660
  });
115661
115661
  }
115662
115662
 
115663
- /**
115664
- * Attach the properties panel to a parent node.
115665
- *
115666
- * @param {HTMLElement} container
115663
+ /**
115664
+ * Attach the properties panel to a parent node.
115665
+ *
115666
+ * @param {HTMLElement} container
115667
115667
  */
115668
115668
  attachTo(container) {
115669
115669
  if (!container) {
@@ -115688,8 +115688,8 @@
115688
115688
  this._eventBus.fire('propertiesPanel.attach');
115689
115689
  }
115690
115690
 
115691
- /**
115692
- * Detach the properties panel from its parent node.
115691
+ /**
115692
+ * Detach the properties panel from its parent node.
115693
115693
  */
115694
115694
  detach() {
115695
115695
  const parentNode = this._container.parentNode;
@@ -115699,11 +115699,11 @@
115699
115699
  }
115700
115700
  }
115701
115701
 
115702
- /**
115703
- * Register a new properties provider to the properties panel.
115704
- *
115705
- * @param {Number} [priority]
115706
- * @param {PropertiesProvider} provider
115702
+ /**
115703
+ * Register a new properties provider to the properties panel.
115704
+ *
115705
+ * @param {Number} [priority]
115706
+ * @param {PropertiesProvider} provider
115707
115707
  */
115708
115708
  registerProvider(priority, provider) {
115709
115709
  if (!provider) {
@@ -115720,9 +115720,9 @@
115720
115720
  this._eventBus.fire('propertiesPanel.providersChanged');
115721
115721
  }
115722
115722
 
115723
- /**
115724
- * Updates the layout of the properties panel.
115725
- * @param {Object} layout
115723
+ /**
115724
+ * Updates the layout of the properties panel.
115725
+ * @param {Object} layout
115726
115726
  */
115727
115727
  setLayout(layout) {
115728
115728
  this._eventBus.fire('propertiesPanel.setLayout', {
@@ -115772,12 +115772,12 @@
115772
115772
  return element && (element.isImplicit || element.id === '__implicitroot');
115773
115773
  }
115774
115774
 
115775
- /**
115776
- * Setup keyboard bindings (undo, redo) on the given container.
115777
- *
115778
- * @param {Element} container
115779
- * @param {EventBus} eventBus
115780
- * @param {CommandStack} commandStack
115775
+ /**
115776
+ * Setup keyboard bindings (undo, redo) on the given container.
115777
+ *
115778
+ * @param {Element} container
115779
+ * @param {EventBus} eventBus
115780
+ * @param {CommandStack} commandStack
115781
115781
  */
115782
115782
  function setupKeyboard(container, eventBus, commandStack) {
115783
115783
  function cancel(event) {
@@ -115802,14 +115802,14 @@
115802
115802
  });
115803
115803
  }
115804
115804
 
115805
- /**
115806
- * A handler that combines and executes multiple commands.
115807
- *
115808
- * All updates are bundled on the command stack and executed in one step.
115809
- * This also makes it possible to revert the changes in one step.
115810
- *
115811
- * Example use case: remove the camunda:formKey attribute and in addition
115812
- * add all form fields needed for the camunda:formData property.
115805
+ /**
115806
+ * A handler that combines and executes multiple commands.
115807
+ *
115808
+ * All updates are bundled on the command stack and executed in one step.
115809
+ * This also makes it possible to revert the changes in one step.
115810
+ *
115811
+ * Example use case: remove the camunda:formKey attribute and in addition
115812
+ * add all form fields needed for the camunda:formData property.
115813
115813
  */
115814
115814
  let MultiCommandHandler$1 = class MultiCommandHandler {
115815
115815
  constructor(commandStack) {
@@ -115936,12 +115936,12 @@
115936
115936
  return compensateEventDefinition && compensateEventDefinition.get('activityRef');
115937
115937
  }
115938
115938
 
115939
- /**
115940
- * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
115939
+ /**
115940
+ * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
115941
115941
  */
115942
115942
 
115943
- /**
115944
- * @returns {Array<Entry>} entries
115943
+ /**
115944
+ * @returns {Array<Entry>} entries
115945
115945
  */
115946
115946
  function CompensationProps(props) {
115947
115947
  const {
@@ -116051,12 +116051,12 @@
116051
116051
  return getFlowElements(element, 'bpmn:BoundaryEvent');
116052
116052
  }
116053
116053
 
116054
- /**
116055
- * Checks whether an Activity is attaching a CompensateEvent of the parent container.
116056
- *
116057
- * @param {ModdleElement} activity
116058
- * @param {Array<ModdleElement>} boundaryEvents
116059
- * @returns {Boolean}
116054
+ /**
116055
+ * Checks whether an Activity is attaching a CompensateEvent of the parent container.
116056
+ *
116057
+ * @param {ModdleElement} activity
116058
+ * @param {Array<ModdleElement>} boundaryEvents
116059
+ * @returns {Boolean}
116060
116060
  */
116061
116061
  function hasCompensationEventAttached(activity, boundaryEvents) {
116062
116062
  const {
@@ -116071,15 +116071,15 @@
116071
116071
  });
116072
116072
  }
116073
116073
 
116074
- /**
116075
- * Checks whether an Activity can be compensated. That's the case when it is
116076
- * a) a CallActivity
116077
- * b) a SubProcess, when it is not event based and not a compensation
116078
- * c) any other Activity, when it is attaching a CompensateEvent of the parent container
116079
- *
116080
- * @param {ModdleElement} activity
116081
- * @param {Array<ModdleElement>} boundaryEvents
116082
- * @returns {Boolean}
116074
+ /**
116075
+ * Checks whether an Activity can be compensated. That's the case when it is
116076
+ * a) a CallActivity
116077
+ * b) a SubProcess, when it is not event based and not a compensation
116078
+ * c) any other Activity, when it is attaching a CompensateEvent of the parent container
116079
+ *
116080
+ * @param {ModdleElement} activity
116081
+ * @param {Array<ModdleElement>} boundaryEvents
116082
+ * @returns {Boolean}
116083
116083
  */
116084
116084
  function canBeCompensated(activity, boundaryEvents) {
116085
116085
  return is$6(activity, 'bpmn:CallActivity') || is$6(activity, 'bpmn:SubProcess') && !activity.triggeredByEvent && !activity.isForCompensation || hasCompensationEventAttached(activity, boundaryEvents);
@@ -116092,11 +116092,11 @@
116092
116092
  });
116093
116093
  }
116094
116094
 
116095
- /**
116096
- * Retrieves all possible activities to reference for a Compensation.
116097
- *
116098
- * @param {djs.model.Base} element
116099
- * @returns {Array<ModdleElement>}
116095
+ /**
116096
+ * Retrieves all possible activities to reference for a Compensation.
116097
+ *
116098
+ * @param {djs.model.Base} element
116099
+ * @returns {Array<ModdleElement>}
116100
116100
  */
116101
116101
  function findActivityRefs(element) {
116102
116102
  const businessObject = getBusinessObject$2(element);
@@ -116116,13 +116116,13 @@
116116
116116
  return activities;
116117
116117
  }
116118
116118
 
116119
- /**
116120
- * Retrieves an option label in the form
116121
- * a) with name: "my Task (id=Task_1)"
116122
- * b) without name: "(id=Task_1)"
116123
- *
116124
- * @param {ModdleElement} activity
116125
- * @returns {String}
116119
+ /**
116120
+ * Retrieves an option label in the form
116121
+ * a) with name: "my Task (id=Task_1)"
116122
+ * b) without name: "(id=Task_1)"
116123
+ *
116124
+ * @param {ModdleElement} activity
116125
+ * @returns {String}
116126
116126
  */
116127
116127
  function createOptionLabel(activity) {
116128
116128
  const {
@@ -116137,12 +116137,12 @@
116137
116137
 
116138
116138
  const DOCUMENTATION_TEXT_FORMAT = 'text/plain';
116139
116139
 
116140
- /**
116141
- * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
116140
+ /**
116141
+ * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
116142
116142
  */
116143
116143
 
116144
- /**
116145
- * @returns {Array<Entry>} entries
116144
+ /**
116145
+ * @returns {Array<Entry>} entries
116146
116146
  */
116147
116147
  function DocumentationProps(props) {
116148
116148
  const {
@@ -116213,12 +116213,12 @@
116213
116213
  });
116214
116214
  }
116215
116215
 
116216
- /**
116217
- * Retrieves a documentation element from a given moddle element.
116218
- *
116219
- * @param {ModdleElement} businessObject
116220
- *
116221
- * @returns {ModdleElement} documentation element inside the given moddle element.
116216
+ /**
116217
+ * Retrieves a documentation element from a given moddle element.
116218
+ *
116219
+ * @param {ModdleElement} businessObject
116220
+ *
116221
+ * @returns {ModdleElement} documentation element inside the given moddle element.
116222
116222
  */
116223
116223
  function getDocumentation(businessObject) {
116224
116224
  return function () {
@@ -116227,10 +116227,10 @@
116227
116227
  };
116228
116228
  }
116229
116229
 
116230
- /**
116231
- * Sets a documentation element for a given moddle element.
116232
- *
116233
- * @param {ModdleElement} businessObject
116230
+ /**
116231
+ * Sets a documentation element for a given moddle element.
116232
+ *
116233
+ * @param {ModdleElement} businessObject
116234
116234
  */
116235
116235
  function setDocumentation(element, businessObject, bpmnFactory, commandStack) {
116236
116236
  return function (value) {
@@ -116273,15 +116273,15 @@
116273
116273
  };
116274
116274
  }
116275
116275
 
116276
- /**
116277
- * Create a new element and (optionally) set its parent.
116278
- *
116279
- * @param {string} type
116280
- * @param {Object} properties
116281
- * @param {import('bpmn-js/lib/model/Types').ModdleElement} parent
116282
- * @param {import('bpmn-js/lib/features/modeling/BpmnFactory').default} bpmnFactory
116283
- *
116284
- * @returns {import('bpmn-js/lib/model/Types').ModdleElement}
116276
+ /**
116277
+ * Create a new element and (optionally) set its parent.
116278
+ *
116279
+ * @param {string} type
116280
+ * @param {Object} properties
116281
+ * @param {import('bpmn-js/lib/model/Types').ModdleElement} parent
116282
+ * @param {import('bpmn-js/lib/features/modeling/BpmnFactory').default} bpmnFactory
116283
+ *
116284
+ * @returns {import('bpmn-js/lib/model/Types').ModdleElement}
116285
116285
  */
116286
116286
  function createElement$3(type, properties, parent, bpmnFactory) {
116287
116287
  const element = bpmnFactory.create(type, properties);
@@ -116291,8 +116291,8 @@
116291
116291
  return element;
116292
116292
  }
116293
116293
 
116294
- /**
116295
- * generate a semantic id with given prefix
116294
+ /**
116295
+ * generate a semantic id with given prefix
116296
116296
  */
116297
116297
  function nextId$1(prefix) {
116298
116298
  const ids = new Ids$1([32, 32, 1]);
@@ -116321,12 +116321,12 @@
116321
116321
  const EMPTY_OPTION$4 = '';
116322
116322
  const CREATE_NEW_OPTION$4 = 'create-new';
116323
116323
 
116324
- /**
116325
- * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
116324
+ /**
116325
+ * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
116326
116326
  */
116327
116327
 
116328
- /**
116329
- * @returns {Array<Entry>} entries
116328
+ /**
116329
+ * @returns {Array<Entry>} entries
116330
116330
  */
116331
116331
  function ErrorProps$2(props) {
116332
116332
  const {
@@ -116502,12 +116502,12 @@
116502
116502
 
116503
116503
  const CREATE_NEW_OPTION$3 = 'create-new';
116504
116504
 
116505
- /**
116506
- * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
116505
+ /**
116506
+ * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
116507
116507
  */
116508
116508
 
116509
- /**
116510
- * @returns {Array<Entry>} entries
116509
+ /**
116510
+ * @returns {Array<Entry>} entries
116511
116511
  */
116512
116512
  function EscalationProps$2(props) {
116513
116513
  const {
@@ -116680,12 +116680,12 @@
116680
116680
  return sortBy$1(elements, e => (e.name || '').toLowerCase());
116681
116681
  }
116682
116682
 
116683
- /**
116684
- * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
116683
+ /**
116684
+ * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
116685
116685
  */
116686
116686
 
116687
- /**
116688
- * @returns {Array<Entry>} entries
116687
+ /**
116688
+ * @returns {Array<Entry>} entries
116689
116689
  */
116690
116690
  function ExecutableProps(props) {
116691
116691
  const {
@@ -116756,14 +116756,14 @@
116756
116756
  // for ID validation as per BPMN Schema (QName - Namespace)
116757
116757
  const ID_REGEX = /^[a-z_][\w-.]*$/i;
116758
116758
 
116759
- /**
116760
- * checks whether the id value is valid
116761
- *
116762
- * @param {ModdleElement} element
116763
- * @param {String} idValue
116764
- * @param {Function} translate
116765
- *
116766
- * @return {String} error message
116759
+ /**
116760
+ * checks whether the id value is valid
116761
+ *
116762
+ * @param {ModdleElement} element
116763
+ * @param {String} idValue
116764
+ * @param {Function} translate
116765
+ *
116766
+ * @return {String} error message
116767
116767
  */
116768
116768
  function isIdValid(element, idValue, translate) {
116769
116769
  const assigned = element.$model.ids.assigned(idValue);
@@ -116791,12 +116791,12 @@
116791
116791
  return SPACE_REGEX.test(value);
116792
116792
  }
116793
116793
 
116794
- /**
116795
- * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
116794
+ /**
116795
+ * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
116796
116796
  */
116797
116797
 
116798
- /**
116799
- * @returns {Array<Entry>} entries
116798
+ /**
116799
+ * @returns {Array<Entry>} entries
116800
116800
  */
116801
116801
  function IdProps$1() {
116802
116802
  return [{
@@ -116838,12 +116838,12 @@
116838
116838
  });
116839
116839
  }
116840
116840
 
116841
- /**
116842
- * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
116841
+ /**
116842
+ * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
116843
116843
  */
116844
116844
 
116845
- /**
116846
- * @returns {Array<Entry>} entries
116845
+ /**
116846
+ * @returns {Array<Entry>} entries
116847
116847
  */
116848
116848
  function LinkProps(props) {
116849
116849
  const {
@@ -116891,12 +116891,12 @@
116891
116891
  const EMPTY_OPTION$3 = '';
116892
116892
  const CREATE_NEW_OPTION$2 = 'create-new';
116893
116893
 
116894
- /**
116895
- * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
116894
+ /**
116895
+ * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
116896
116896
  */
116897
116897
 
116898
- /**
116899
- * @returns {Array<Entry>} entries
116898
+ /**
116899
+ * @returns {Array<Entry>} entries
116900
116900
  */
116901
116901
  function MessageProps$1(props) {
116902
116902
  const {
@@ -117039,12 +117039,12 @@
117039
117039
  return sortBy$1(elements, e => (e.name || '').toLowerCase());
117040
117040
  }
117041
117041
 
117042
- /**
117043
- * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
117042
+ /**
117043
+ * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
117044
117044
  */
117045
117045
 
117046
- /**
117047
- * @returns {Array<Entry>} entries
117046
+ /**
117047
+ * @returns {Array<Entry>} entries
117048
117048
  */
117049
117049
  function MultiInstanceProps$2(props) {
117050
117050
  const {
@@ -117115,59 +117115,59 @@
117115
117115
 
117116
117116
  // generic ///////////////////////////
117117
117117
 
117118
- /**
117119
- * isMultiInstanceSupported - check whether given element supports MultiInstanceLoopCharacteristics.
117120
- *
117121
- * @param {djs.model.Base} element
117122
- * @return {boolean}
117118
+ /**
117119
+ * isMultiInstanceSupported - check whether given element supports MultiInstanceLoopCharacteristics.
117120
+ *
117121
+ * @param {djs.model.Base} element
117122
+ * @return {boolean}
117123
117123
  */
117124
117124
  function isMultiInstanceSupported$1(element) {
117125
117125
  const loopCharacteristics = getLoopCharacteristics$2(element);
117126
117126
  return !!loopCharacteristics && is$6(loopCharacteristics, 'bpmn:MultiInstanceLoopCharacteristics');
117127
117127
  }
117128
117128
 
117129
- /**
117130
- * getBody - get the body of a given expression.
117131
- *
117132
- * @param {ModdleElement<bpmn:FormalExpression>} expression
117133
- * @return {string} the body (value) of the expression
117129
+ /**
117130
+ * getBody - get the body of a given expression.
117131
+ *
117132
+ * @param {ModdleElement<bpmn:FormalExpression>} expression
117133
+ * @return {string} the body (value) of the expression
117134
117134
  */
117135
117135
  function getBody(expression) {
117136
117136
  return expression && expression.get('body');
117137
117137
  }
117138
117138
 
117139
- /**
117140
- * getProperty - get a property value of the loop characteristics.
117141
- *
117142
- * @param {djs.model.Base} element
117143
- * @param {string} propertyName
117144
- *
117145
- * @return {any} the property value
117139
+ /**
117140
+ * getProperty - get a property value of the loop characteristics.
117141
+ *
117142
+ * @param {djs.model.Base} element
117143
+ * @param {string} propertyName
117144
+ *
117145
+ * @return {any} the property value
117146
117146
  */
117147
117147
  function getProperty$2(element, propertyName) {
117148
117148
  const loopCharacteristics = getLoopCharacteristics$2(element);
117149
117149
  return loopCharacteristics && loopCharacteristics.get(propertyName);
117150
117150
  }
117151
117151
 
117152
- /**
117153
- * getLoopCharacteristics - get loopCharacteristics of a given element.
117154
- *
117155
- * @param {djs.model.Base} element
117156
- * @return {ModdleElement<bpmn:MultiInstanceLoopCharacteristics> | undefined}
117152
+ /**
117153
+ * getLoopCharacteristics - get loopCharacteristics of a given element.
117154
+ *
117155
+ * @param {djs.model.Base} element
117156
+ * @return {ModdleElement<bpmn:MultiInstanceLoopCharacteristics> | undefined}
117157
117157
  */
117158
117158
  function getLoopCharacteristics$2(element) {
117159
117159
  const bo = getBusinessObject$2(element);
117160
117160
  return bo.loopCharacteristics;
117161
117161
  }
117162
117162
 
117163
- /**
117164
- * createFormalExpression - creates a 'bpmn:FormalExpression' element.
117165
- *
117166
- * @param {ModdleElement} parent
117167
- * @param {string} body
117168
- * @param {BpmnFactory} bpmnFactory
117169
- *
117170
- * @result {ModdleElement<bpmn:FormalExpression>} a formal expression
117163
+ /**
117164
+ * createFormalExpression - creates a 'bpmn:FormalExpression' element.
117165
+ *
117166
+ * @param {ModdleElement} parent
117167
+ * @param {string} body
117168
+ * @param {BpmnFactory} bpmnFactory
117169
+ *
117170
+ * @result {ModdleElement<bpmn:FormalExpression>} a formal expression
117171
117171
  */
117172
117172
  function createFormalExpression$1(parent, body, bpmnFactory) {
117173
117173
  return createElement$3('bpmn:FormalExpression', {
@@ -117175,13 +117175,13 @@
117175
117175
  }, parent, bpmnFactory);
117176
117176
  }
117177
117177
 
117178
- /**
117179
- * updateFormalExpression - updates a specific formal expression of the loop characteristics.
117180
- *
117181
- * @param {djs.model.Base} element
117182
- * @param {string} propertyName
117183
- * @param {string} newValue
117184
- * @param {BpmnFactory} bpmnFactory
117178
+ /**
117179
+ * updateFormalExpression - updates a specific formal expression of the loop characteristics.
117180
+ *
117181
+ * @param {djs.model.Base} element
117182
+ * @param {string} propertyName
117183
+ * @param {string} newValue
117184
+ * @param {BpmnFactory} bpmnFactory
117185
117185
  */
117186
117186
  function updateFormalExpression(element, propertyName, newValue, bpmnFactory) {
117187
117187
  const loopCharacteristics = getLoopCharacteristics$2(element);
@@ -117218,23 +117218,23 @@
117218
117218
 
117219
117219
  // loopCardinality
117220
117220
 
117221
- /**
117222
- * getLoopCardinality - get the loop cardinality of the loop characteristics.
117223
- *
117224
- * @param {djs.model.Base} element
117225
- *
117226
- * @return {ModdleElement<bpmn:FormalExpression>} an expression representing the loop cardinality
117221
+ /**
117222
+ * getLoopCardinality - get the loop cardinality of the loop characteristics.
117223
+ *
117224
+ * @param {djs.model.Base} element
117225
+ *
117226
+ * @return {ModdleElement<bpmn:FormalExpression>} an expression representing the loop cardinality
117227
117227
  */
117228
117228
  function getLoopCardinality(element) {
117229
117229
  return getProperty$2(element, 'loopCardinality');
117230
117230
  }
117231
117231
 
117232
- /**
117233
- * getLoopCardinalityValue - get the loop cardinality value of the loop characteristics.
117234
- *
117235
- * @param {djs.model.Base} element
117236
- *
117237
- * @return {string} the loop cardinality value
117232
+ /**
117233
+ * getLoopCardinalityValue - get the loop cardinality value of the loop characteristics.
117234
+ *
117235
+ * @param {djs.model.Base} element
117236
+ *
117237
+ * @return {string} the loop cardinality value
117238
117238
  */
117239
117239
  function getLoopCardinalityValue(element) {
117240
117240
  const loopCardinality = getLoopCardinality(element);
@@ -117243,35 +117243,35 @@
117243
117243
 
117244
117244
  // completionCondition /////////////////////
117245
117245
 
117246
- /**
117247
- * getCompletionCondition - get the completion condition of the loop characteristics.
117248
- *
117249
- * @param {djs.model.Base} element
117250
- *
117251
- * @return {ModdleElement<bpmn:FormalExpression>} an expression representing the completion condition
117246
+ /**
117247
+ * getCompletionCondition - get the completion condition of the loop characteristics.
117248
+ *
117249
+ * @param {djs.model.Base} element
117250
+ *
117251
+ * @return {ModdleElement<bpmn:FormalExpression>} an expression representing the completion condition
117252
117252
  */
117253
117253
  function getCompletionCondition$1(element) {
117254
117254
  return getProperty$2(element, 'completionCondition');
117255
117255
  }
117256
117256
 
117257
- /**
117258
- * getCompletionConditionValue - get the completion condition value of the loop characteristics.
117259
- *
117260
- * @param {djs.model.Base} element
117261
- *
117262
- * @return {string} the completion condition value
117257
+ /**
117258
+ * getCompletionConditionValue - get the completion condition value of the loop characteristics.
117259
+ *
117260
+ * @param {djs.model.Base} element
117261
+ *
117262
+ * @return {string} the completion condition value
117263
117263
  */
117264
117264
  function getCompletionConditionValue(element) {
117265
117265
  const completionCondition = getCompletionCondition$1(element);
117266
117266
  return getBody(completionCondition);
117267
117267
  }
117268
117268
 
117269
- /**
117270
- * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
117269
+ /**
117270
+ * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
117271
117271
  */
117272
117272
 
117273
- /**
117274
- * @returns {Array<Entry>} entries
117273
+ /**
117274
+ * @returns {Array<Entry>} entries
117275
117275
  */
117276
117276
  function NameProps(props) {
117277
117277
  const {
@@ -117375,12 +117375,12 @@
117375
117375
  return categoryValue;
117376
117376
  }
117377
117377
 
117378
- /**
117379
- * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
117378
+ /**
117379
+ * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
117380
117380
  */
117381
117381
 
117382
- /**
117383
- * @returns {Array<Entry>} entries
117382
+ /**
117383
+ * @returns {Array<Entry>} entries
117384
117384
  */
117385
117385
  function ProcessProps$1(props) {
117386
117386
  const {
@@ -117471,15 +117471,15 @@
117471
117471
  return is$6(element, 'bpmn:Participant') && element.businessObject.get('processRef');
117472
117472
  }
117473
117473
 
117474
- /**
117475
- * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
117474
+ /**
117475
+ * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
117476
117476
  */
117477
117477
 
117478
117478
  const EMPTY_OPTION$2 = '';
117479
117479
  const CREATE_NEW_OPTION$1 = 'create-new';
117480
117480
 
117481
- /**
117482
- * @returns {Entry[]}
117481
+ /**
117482
+ * @returns {Entry[]}
117483
117483
  */
117484
117484
  function SignalProps$1(props) {
117485
117485
  const {
@@ -117629,12 +117629,12 @@
117629
117629
  return isAny$1(element, ['bpmn:StartEvent', 'bpmn:IntermediateCatchEvent', 'bpmn:BoundaryEvent']) && !!getTimerEventDefinition$1(element);
117630
117630
  }
117631
117631
 
117632
- /**
117633
- * Get the timer definition type for a given timer event definition.
117634
- *
117635
- * @param {ModdleElement<bpmn:TimerEventDefinition>} timer
117636
- *
117637
- * @return {string|undefined} the timer definition type
117632
+ /**
117633
+ * Get the timer definition type for a given timer event definition.
117634
+ *
117635
+ * @param {ModdleElement<bpmn:TimerEventDefinition>} timer
117636
+ *
117637
+ * @return {string|undefined} the timer definition type
117638
117638
  */
117639
117639
  function getTimerDefinitionType(timer) {
117640
117640
  if (!timer) {
@@ -117717,12 +117717,12 @@
117717
117717
  return entries;
117718
117718
  }
117719
117719
 
117720
- /**
117721
- * TimerEventDefinitionType - Generic select entry allowing to select a specific
117722
- * timerEventDefintionType. To be used together with timerEventDefinitionValue.
117723
- *
117724
- * @param {type} props
117725
- * @return {SelectEntry}
117720
+ /**
117721
+ * TimerEventDefinitionType - Generic select entry allowing to select a specific
117722
+ * timerEventDefintionType. To be used together with timerEventDefinitionValue.
117723
+ *
117724
+ * @param {type} props
117725
+ * @return {SelectEntry}
117726
117726
  */
117727
117727
  function TimerEventDefinitionType$2(props) {
117728
117728
  const {
@@ -117790,13 +117790,13 @@
117790
117790
  });
117791
117791
  }
117792
117792
 
117793
- /**
117794
- * TimerEventDefinitionValue - Generic textField entry allowing to specify the
117795
- * timerEventDefintionValue based on the set timerEventDefintionType. To be used
117796
- * together with timerEventDefinitionType.
117797
- *
117798
- * @param {type} props
117799
- * @return {TextFieldEntry}
117793
+ /**
117794
+ * TimerEventDefinitionValue - Generic textField entry allowing to specify the
117795
+ * timerEventDefintionValue based on the set timerEventDefintionType. To be used
117796
+ * together with timerEventDefinitionType.
117797
+ *
117798
+ * @param {type} props
117799
+ * @return {TextFieldEntry}
117800
117800
  */
117801
117801
  function TimerEventDefinitionValue$2(props) {
117802
117802
  const {
@@ -118081,12 +118081,12 @@
118081
118081
  bpmnPropertiesProvider: ['type', BpmnPropertiesProvider]
118082
118082
  };
118083
118083
 
118084
- /**
118085
- * Get extension elements of business object. Optionally filter by type.
118086
- *
118087
- * @param {ModdleElement} businessObject
118088
- * @param {string} [type=undefined]
118089
- * @returns {Array<ModdleElement>}
118084
+ /**
118085
+ * Get extension elements of business object. Optionally filter by type.
118086
+ *
118087
+ * @param {ModdleElement} businessObject
118088
+ * @param {string} [type=undefined]
118089
+ * @returns {Array<ModdleElement>}
118090
118090
  */
118091
118091
  function getExtensionElementsList$2(businessObject, type = undefined) {
118092
118092
  const extensionElements = businessObject.get('extensionElements');
@@ -118103,13 +118103,13 @@
118103
118103
  return values;
118104
118104
  }
118105
118105
 
118106
- /**
118107
- * Add one or more extension elements. Create bpmn:ExtensionElements if it doesn't exist.
118108
- *
118109
- * @param {ModdleElement} element
118110
- * @param {ModdleElement} businessObject
118111
- * @param {ModdleElement|Array<ModdleElement>} extensionElementsToAdd
118112
- * @param {CommandStack} commandStack
118106
+ /**
118107
+ * Add one or more extension elements. Create bpmn:ExtensionElements if it doesn't exist.
118108
+ *
118109
+ * @param {ModdleElement} element
118110
+ * @param {ModdleElement} businessObject
118111
+ * @param {ModdleElement|Array<ModdleElement>} extensionElementsToAdd
118112
+ * @param {CommandStack} commandStack
118113
118113
  */
118114
118114
  function addExtensionElements(element, businessObject, extensionElementToAdd, bpmnFactory, commandStack) {
118115
118115
  const commands = [];
@@ -118147,15 +118147,15 @@
118147
118147
  commandStack.execute('properties-panel.multi-command-executor', commands);
118148
118148
  }
118149
118149
 
118150
- /**
118151
- * Remove one or more extension elements. Remove bpmn:ExtensionElements afterwards if it's empty.
118152
- *
118153
- * @param {ModdleElement} element
118154
- * @param {ModdleElement} businessObject
118155
- * @param {ModdleElement|Array<ModdleElement>} extensionElementsToRemove
118156
- * @param {CommandStack} commandStack
118157
- */
118158
- function removeExtensionElements$1(element, businessObject, extensionElementsToRemove, commandStack) {
118150
+ /**
118151
+ * Remove one or more extension elements. Remove bpmn:ExtensionElements afterwards if it's empty.
118152
+ *
118153
+ * @param {ModdleElement} element
118154
+ * @param {ModdleElement} businessObject
118155
+ * @param {ModdleElement|Array<ModdleElement>} extensionElementsToRemove
118156
+ * @param {CommandStack} commandStack
118157
+ */
118158
+ function removeExtensionElements$1(element, businessObject, extensionElementsToRemove, commandStack) {
118159
118159
  if (!isArray$a(extensionElementsToRemove)) {
118160
118160
  extensionElementsToRemove = [extensionElementsToRemove];
118161
118161
  }
@@ -118170,6 +118170,15 @@
118170
118170
  });
118171
118171
  }
118172
118172
 
118173
+ function withProps(Component, otherProps) {
118174
+ return props => {
118175
+ return u(Component, {
118176
+ ...props,
118177
+ ...otherProps
118178
+ });
118179
+ };
118180
+ }
118181
+
118173
118182
  const fallbackResolver = {
118174
118183
  getVariablesForElement: bo => getVariablesForElement_1(bo)
118175
118184
  };
@@ -118516,24 +118525,24 @@
118516
118525
  return is$6(element, 'bpmn:UserTask') || isZeebeServiceTask(element);
118517
118526
  }
118518
118527
 
118519
- /**
118520
- * Get first zeebe:TaskHeaders element for a specific element.
118521
- *
118522
- * @param {ModdleElement} element
118523
- *
118524
- * @return {ModdleElement} a zeebe:TaskHeader element
118528
+ /**
118529
+ * Get first zeebe:TaskHeaders element for a specific element.
118530
+ *
118531
+ * @param {ModdleElement} element
118532
+ *
118533
+ * @return {ModdleElement} a zeebe:TaskHeader element
118525
118534
  */
118526
118535
  function getTaskHeaders$1(element) {
118527
118536
  const businessObject = getBusinessObject$2(element);
118528
118537
  return getExtensionElementsList$2(businessObject, 'zeebe:TaskHeaders')[0];
118529
118538
  }
118530
118539
 
118531
- /**
118532
- * Retrieve all zeebe:Header elements for a specific element.
118533
- *
118534
- * @param {ModdleElement} element
118535
- *
118536
- * @return {Array<ModdleElement>} a list of zeebe:Header elements
118540
+ /**
118541
+ * Retrieve all zeebe:Header elements for a specific element.
118542
+ *
118543
+ * @param {ModdleElement} element
118544
+ *
118545
+ * @return {Array<ModdleElement>} a list of zeebe:Header elements
118537
118546
  */
118538
118547
  function getHeaders(element) {
118539
118548
  const taskHeaders = getTaskHeaders$1(element);
@@ -118574,10 +118583,10 @@
118574
118583
  return DEFAULT_IMPLEMENTATION_OPTION$1;
118575
118584
  };
118576
118585
 
118577
- /**
118578
- * Set value by either creating a zeebe:calledDecision or a zeebe:taskDefintion
118579
- * extension element. Note that they must not exist both at the same time, however
118580
- * this will be ensured by a bpmn-js behavior (and not by the propPanel).
118586
+ /**
118587
+ * Set value by either creating a zeebe:calledDecision or a zeebe:taskDefintion
118588
+ * extension element. Note that they must not exist both at the same time, however
118589
+ * this will be ensured by a bpmn-js behavior (and not by the propPanel).
118581
118590
  */
118582
118591
  const setValue = value => {
118583
118592
  let extensionElement, extensionElementType;
@@ -118681,6 +118690,92 @@
118681
118690
  commandStack.execute('properties-panel.multi-command-executor', commands);
118682
118691
  }
118683
118692
 
118693
+ function Binding$2(props) {
118694
+ const {
118695
+ element,
118696
+ type
118697
+ } = props;
118698
+ const bpmnFactory = useService$1('bpmnFactory'),
118699
+ commandStack = useService$1('commandStack'),
118700
+ translate = useService$1('translate');
118701
+ const getValue = () => {
118702
+ const businessObject = getBusinessObject$2(element);
118703
+ const extensionElement = getExtensionElementsList$2(businessObject, type)[0];
118704
+ if (!extensionElement) {
118705
+ return 'latest';
118706
+ }
118707
+ return extensionElement.get('bindingType');
118708
+ };
118709
+ const setValue = value => {
118710
+ const commands = [];
118711
+ const businessObject = getBusinessObject$2(element);
118712
+
118713
+ // (1) ensure extension elements
118714
+ let extensionElements = businessObject.get('extensionElements');
118715
+ if (!extensionElements) {
118716
+ extensionElements = createElement$3('bpmn:ExtensionElements', {
118717
+ values: []
118718
+ }, businessObject, bpmnFactory);
118719
+ commands.push({
118720
+ cmd: 'element.updateModdleProperties',
118721
+ context: {
118722
+ element,
118723
+ moddleElement: businessObject,
118724
+ properties: {
118725
+ extensionElements
118726
+ }
118727
+ }
118728
+ });
118729
+ }
118730
+
118731
+ // (2) ensure extension element
118732
+ let extensionElement = getExtensionElementsList$2(businessObject, type)[0];
118733
+ if (!extensionElement) {
118734
+ extensionElement = createElement$3(type, {}, extensionElements, bpmnFactory);
118735
+ commands.push({
118736
+ cmd: 'element.updateModdleProperties',
118737
+ context: {
118738
+ element,
118739
+ moddleElement: extensionElements,
118740
+ properties: {
118741
+ values: [...extensionElements.get('values'), extensionElement]
118742
+ }
118743
+ }
118744
+ });
118745
+ }
118746
+
118747
+ // (3) Update bindingType attribute
118748
+ commands.push({
118749
+ cmd: 'element.updateModdleProperties',
118750
+ context: {
118751
+ element,
118752
+ moddleElement: extensionElement,
118753
+ properties: {
118754
+ bindingType: value
118755
+ }
118756
+ }
118757
+ });
118758
+
118759
+ // (4) Execute the commands
118760
+ commandStack.execute('properties-panel.multi-command-executor', commands);
118761
+ };
118762
+ const getOptions = () => [{
118763
+ value: 'latest',
118764
+ label: translate('latest')
118765
+ }, {
118766
+ value: 'deployment',
118767
+ label: translate('deployment')
118768
+ }];
118769
+ return u(SelectEntry, {
118770
+ element: element,
118771
+ id: "bindingType",
118772
+ label: translate('Binding'),
118773
+ getValue: getValue,
118774
+ setValue: setValue,
118775
+ getOptions: getOptions
118776
+ });
118777
+ }
118778
+
118684
118779
  function CalledDecisionProps(props) {
118685
118780
  const {
118686
118781
  element
@@ -118692,6 +118787,12 @@
118692
118787
  id: 'decisionId',
118693
118788
  component: DecisionID,
118694
118789
  isEdited: isEdited$6
118790
+ }, {
118791
+ id: 'bindingType',
118792
+ component: withProps(Binding$2, {
118793
+ type: 'zeebe:CalledDecision'
118794
+ }),
118795
+ isEdited: isEdited$3
118695
118796
  }, {
118696
118797
  id: 'resultVariable',
118697
118798
  component: ResultVariable$4,
@@ -118938,12 +119039,12 @@
118938
119039
  return isAny$1(element, CONDITIONAL_SOURCES$1);
118939
119040
  }
118940
119041
 
118941
- /**
118942
- * getConditionExpression - get the body value of a condition expression for a given element
118943
- *
118944
- * @param {ModdleElement} element
118945
- *
118946
- * @return {string|undefined}
119042
+ /**
119043
+ * getConditionExpression - get the body value of a condition expression for a given element
119044
+ *
119045
+ * @param {ModdleElement} element
119046
+ *
119047
+ * @return {string|undefined}
118947
119048
  */
118948
119049
  function getConditionExpression$1(element) {
118949
119050
  const businessObject = getBusinessObject$2(element);
@@ -118999,12 +119100,12 @@
118999
119100
  });
119000
119101
  }
119001
119102
 
119002
- /**
119003
- * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
119103
+ /**
119104
+ * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
119004
119105
  */
119005
119106
 
119006
- /**
119007
- * @returns {Array<Entry>} entries
119107
+ /**
119108
+ * @returns {Array<Entry>} entries
119008
119109
  */
119009
119110
  function EscalationProps$1(props) {
119010
119111
  const {
@@ -119462,6 +119563,15 @@
119462
119563
  isEdited: isEdited$6
119463
119564
  });
119464
119565
  }
119566
+ if (formType === FORM_TYPES.CAMUNDA_FORM_LINKED) {
119567
+ entries.push({
119568
+ id: 'bindingType',
119569
+ component: withProps(Binding$2, {
119570
+ type: 'zeebe:FormDefinition'
119571
+ }),
119572
+ isEdited: isEdited$3
119573
+ });
119574
+ }
119465
119575
  return entries;
119466
119576
  }
119467
119577
  function FormType$1(props) {
@@ -119623,24 +119733,24 @@
119623
119733
 
119624
119734
  // helpers /////////////
119625
119735
 
119626
- /**
119627
- * @typedef { { cmd: string, context: Object } } Command
119628
- * @typedef {Command[]} Commands
119629
- *
119630
- * @typedef {import('diagram-js/lib/model/Types').Element} Element
119631
- * @typedef {import('bpmn-js/lib/model/Types').ModdleElement} ModdleElement
119632
- *
119633
- * @param {import('didi').Injector} Injector
119736
+ /**
119737
+ * @typedef { { cmd: string, context: Object } } Command
119738
+ * @typedef {Command[]} Commands
119739
+ *
119740
+ * @typedef {import('diagram-js/lib/model/Types').Element} Element
119741
+ * @typedef {import('bpmn-js/lib/model/Types').ModdleElement} ModdleElement
119742
+ *
119743
+ * @param {import('didi').Injector} Injector
119634
119744
  */
119635
119745
 
119636
- /**
119637
- * @param {Injector} injector
119638
- * @param {Element} element
119639
- *
119640
- * @returns { {
119641
- * commands: Commands,
119642
- * extensionElements: ModdleElement
119643
- * } }
119746
+ /**
119747
+ * @param {Injector} injector
119748
+ * @param {Element} element
119749
+ *
119750
+ * @returns { {
119751
+ * commands: Commands,
119752
+ * extensionElements: ModdleElement
119753
+ * } }
119644
119754
  */
119645
119755
  function getOrCreateExtensionElements(injector, element, moddleElement) {
119646
119756
  const businessObject = moddleElement || getBusinessObject$2(element);
@@ -119663,14 +119773,14 @@
119663
119773
  };
119664
119774
  }
119665
119775
 
119666
- /**
119667
- * @param {Injector} injector
119668
- * @param {Element} element
119669
- *
119670
- * @returns { {
119671
- * commands: Commands,
119672
- * formDefinition: ModdleElement
119673
- * } }
119776
+ /**
119777
+ * @param {Injector} injector
119778
+ * @param {Element} element
119779
+ *
119780
+ * @returns { {
119781
+ * commands: Commands,
119782
+ * formDefinition: ModdleElement
119783
+ * } }
119674
119784
  */
119675
119785
  function getOrCreateFormDefintition(injector, element) {
119676
119786
  let formDefinition = getFormDefinition$1(element);
@@ -119693,15 +119803,15 @@
119693
119803
  };
119694
119804
  }
119695
119805
 
119696
- /**
119697
- * @param {Injector} injector
119698
- * @param {Element} element
119699
- *
119700
- * @returns { {
119701
- * commands: Commands,
119702
- * formDefinition: ModdleElement,
119703
- * userTaskForm: ModdleElement
119704
- * } }
119806
+ /**
119807
+ * @param {Injector} injector
119808
+ * @param {Element} element
119809
+ *
119810
+ * @returns { {
119811
+ * commands: Commands,
119812
+ * formDefinition: ModdleElement,
119813
+ * userTaskForm: ModdleElement
119814
+ * } }
119705
119815
  */
119706
119816
  function getOrCreateUserTaskForm(injector, element) {
119707
119817
  let userTaskForm = getUserTaskForm$1(element);
@@ -119778,8 +119888,8 @@
119778
119888
  function removeFormDefinition(injector, element) {
119779
119889
  const formDefinition = getFormDefinition$1(element);
119780
119890
 
119781
- /**
119782
- * @type {import('bpmn-js/lib/features/modeling/Modeling').default}
119891
+ /**
119892
+ * @type {import('bpmn-js/lib/features/modeling/Modeling').default}
119783
119893
  */
119784
119894
  const modeling = injector.get('modeling');
119785
119895
  if (formDefinition) {
@@ -119791,36 +119901,36 @@
119791
119901
  }
119792
119902
  }
119793
119903
 
119794
- /**
119795
- * @param {Injector} injector
119796
- * @param {Object} properties
119797
- * @param {ModdleElement} parent
119798
- *
119799
- * @returns {ModdleElement}
119904
+ /**
119905
+ * @param {Injector} injector
119906
+ * @param {Object} properties
119907
+ * @param {ModdleElement} parent
119908
+ *
119909
+ * @returns {ModdleElement}
119800
119910
  */
119801
119911
  function createFormDefinition(injector, properties, parent) {
119802
119912
  const bpmnFactory = injector.get('bpmnFactory');
119803
119913
  return createElement$3('zeebe:FormDefinition', properties, parent, bpmnFactory);
119804
119914
  }
119805
119915
 
119806
- /**
119807
- * @param {Injector} injector
119808
- * @param {Object} properties
119809
- * @param {ModdleElement} parent
119810
- *
119811
- * @returns {ModdleElement}
119916
+ /**
119917
+ * @param {Injector} injector
119918
+ * @param {Object} properties
119919
+ * @param {ModdleElement} parent
119920
+ *
119921
+ * @returns {ModdleElement}
119812
119922
  */
119813
119923
  function createUserTaskForm(injector, properties, parent) {
119814
119924
  const bpmnFactory = injector.get('bpmnFactory');
119815
119925
  return createElement$3('zeebe:UserTaskForm', properties, parent, bpmnFactory);
119816
119926
  }
119817
119927
 
119818
- /**
119819
- * @param {Element} element
119820
- * @param {ModdleElement} moddleElement
119821
- * @param {Object} properties
119822
- *
119823
- * @returns {Command}
119928
+ /**
119929
+ * @param {Element} element
119930
+ * @param {ModdleElement} moddleElement
119931
+ * @param {Object} properties
119932
+ *
119933
+ * @returns {Command}
119824
119934
  */
119825
119935
  function createUpdateModdlePropertiesCommand(element, moddleElement, properties) {
119826
119936
  return {
@@ -120166,11 +120276,11 @@
120166
120276
 
120167
120277
  // helper //////////////////////////
120168
120278
 
120169
- /**
120170
- * Check whether the propagateAllParentVariables attribute is set on an element.
120171
- * @param {Object} element
120172
- *
120173
- * @returns {boolean}
120279
+ /**
120280
+ * Check whether the propagateAllParentVariables attribute is set on an element.
120281
+ * @param {Object} element
120282
+ *
120283
+ * @returns {boolean}
120174
120284
  */
120175
120285
  function isPropagateAllParentVariables(element) {
120176
120286
  if (!is$6(element, 'bpmn:CallActivity')) {
@@ -120271,37 +120381,37 @@
120271
120381
  return ioMapping && ioMapping.get(prop) || [];
120272
120382
  }
120273
120383
 
120274
- /**
120275
- * Get a ioMapping from the business object
120276
- *
120277
- * @param {djs.model.Base} element
120278
- *
120279
- * @return {ModdleElement} the ioMapping object
120384
+ /**
120385
+ * Get a ioMapping from the business object
120386
+ *
120387
+ * @param {djs.model.Base} element
120388
+ *
120389
+ * @return {ModdleElement} the ioMapping object
120280
120390
  */
120281
120391
  function getIoMapping$1(element) {
120282
120392
  const bo = getBusinessObject$2(element);
120283
120393
  return (getElements$1(bo, 'zeebe:IoMapping') || [])[0];
120284
120394
  }
120285
120395
 
120286
- /**
120287
- * Return all input parameters existing in the business object, and
120288
- * an empty array if none exist.
120289
- *
120290
- * @param {djs.model.Base} element
120291
- *
120292
- * @return {Array} a list of input parameter objects
120396
+ /**
120397
+ * Return all input parameters existing in the business object, and
120398
+ * an empty array if none exist.
120399
+ *
120400
+ * @param {djs.model.Base} element
120401
+ *
120402
+ * @return {Array} a list of input parameter objects
120293
120403
  */
120294
120404
  function getInputParameters$1(element) {
120295
120405
  return getParameters$1.apply(this, [element, 'inputParameters']);
120296
120406
  }
120297
120407
 
120298
- /**
120299
- * Return all output parameters existing in the business object, and
120300
- * an empty array if none exist.
120301
- *
120302
- * @param {djs.model.Base} element
120303
- *
120304
- * @return {Array} a list of output parameter objects
120408
+ /**
120409
+ * Return all output parameters existing in the business object, and
120410
+ * an empty array if none exist.
120411
+ *
120412
+ * @param {djs.model.Base} element
120413
+ *
120414
+ * @return {Array} a list of output parameter objects
120305
120415
  */
120306
120416
  function getOutputParameters$1(element) {
120307
120417
  return getParameters$1.apply(this, [element, 'outputParameters']);
@@ -120972,11 +121082,11 @@
120972
121082
 
120973
121083
  // helper //////////////////////////
120974
121084
 
120975
- /**
120976
- * Determine default value for propagateAllChildVariables attribute
120977
- * @param {Object} element representing a bpmn:CallActivity
120978
- *
120979
- * @returns {boolean}
121085
+ /**
121086
+ * Determine default value for propagateAllChildVariables attribute
121087
+ * @param {Object} element representing a bpmn:CallActivity
121088
+ *
121089
+ * @returns {boolean}
120980
121090
  */
120981
121091
  function determinePropAllChildVariablesDefault(element) {
120982
121092
  const outputParameters = getOutputParameters$1(element);
@@ -120985,12 +121095,12 @@
120985
121095
  }
120986
121096
  }
120987
121097
 
120988
- /**
120989
- * Check whether the propagateAllChildVariables attribute is set on an element.
120990
- * Note that a default logic will be determine if it is not explicitly set.
120991
- * @param {Object} element
120992
- *
120993
- * @returns {boolean}
121098
+ /**
121099
+ * Check whether the propagateAllChildVariables attribute is set on an element.
121100
+ * Note that a default logic will be determine if it is not explicitly set.
121101
+ * @param {Object} element
121102
+ *
121103
+ * @returns {boolean}
120994
121104
  */
120995
121105
  function isPropagateAllChildVariables(element) {
120996
121106
  if (!is$6(element, 'bpmn:CallActivity')) {
@@ -121183,10 +121293,10 @@
121183
121293
  return DEFAULT_IMPLEMENTATION_OPTION;
121184
121294
  };
121185
121295
 
121186
- /**
121187
- * Set value by either creating a zeebe:script or a zeebe:taskDefintion
121188
- * extension element. Note that they must not exist both at the same time, however
121189
- * this will be ensured by a bpmn-js behavior (and not by the propPanel).
121296
+ /**
121297
+ * Set value by either creating a zeebe:script or a zeebe:taskDefintion
121298
+ * extension element. Note that they must not exist both at the same time, however
121299
+ * this will be ensured by a bpmn-js behavior (and not by the propPanel).
121190
121300
  */
121191
121301
  const setValue = value => {
121192
121302
  let extensionElement, extensionElementType;
@@ -121478,8 +121588,8 @@
121478
121588
  return getExtensionElementsList$2(businessObject, 'zeebe:Script')[0];
121479
121589
  }
121480
121590
 
121481
- /**
121482
- * @returns {Entry[]}
121591
+ /**
121592
+ * @returns {Entry[]}
121483
121593
  */
121484
121594
  function SignalProps(props) {
121485
121595
  const {
@@ -121541,6 +121651,12 @@
121541
121651
  id: 'targetProcessId',
121542
121652
  component: TargetProcessId,
121543
121653
  isEdited: isEdited$6
121654
+ }, {
121655
+ id: 'bindingType',
121656
+ component: withProps(Binding$2, {
121657
+ type: 'zeebe:CalledElement'
121658
+ }),
121659
+ isEdited: isEdited$3
121544
121660
  }];
121545
121661
  }
121546
121662
  function TargetProcessId(props) {
@@ -121969,13 +122085,13 @@
121969
122085
  return getExtensionElementsList$2(businessObject, 'zeebe:TaskSchedule')[0];
121970
122086
  }
121971
122087
 
121972
- /**
121973
- * Check whether a given timer expression type is supported for a given element.
121974
- *
121975
- * @param {string} type
121976
- * @param {Element|ModdleElement} element
121977
- *
121978
- * @return {boolean}
122088
+ /**
122089
+ * Check whether a given timer expression type is supported for a given element.
122090
+ *
122091
+ * @param {string} type
122092
+ * @param {Element|ModdleElement} element
122093
+ *
122094
+ * @return {boolean}
121979
122095
  */
121980
122096
  function isTimerExpressionTypeSupported$1(type, element) {
121981
122097
  const businessObject = getBusinessObject$2(element);
@@ -122068,12 +122184,12 @@
122068
122184
  return options;
122069
122185
  }
122070
122186
 
122071
- /**
122072
- * TimerEventDefinitionType - Generic select entry allowing to select a specific
122073
- * timerEventDefintionType. To be used together with timerEventDefinitionValue.
122074
- *
122075
- * @param {type} props
122076
- * @return {SelectEntry}
122187
+ /**
122188
+ * TimerEventDefinitionType - Generic select entry allowing to select a specific
122189
+ * timerEventDefintionType. To be used together with timerEventDefinitionValue.
122190
+ *
122191
+ * @param {type} props
122192
+ * @return {SelectEntry}
122077
122193
  */
122078
122194
  function TimerEventDefinitionType$1(props) {
122079
122195
  const {
@@ -122131,16 +122247,16 @@
122131
122247
  });
122132
122248
  }
122133
122249
 
122134
- /**
122135
- * TimerEventDefinitionValue - Generic textField entry allowing to specify the
122136
- * timerEventDefintionValue based on the set timerEventDefintionType. To be used
122137
- * together with timerEventDefinitionType.
122138
- *
122139
- * @param {object} props
122140
- * @param {ModdleElement} props.element
122141
- * @param {'timeCycle'|'timeDate'|'timeDuration'} props.timerEventDefinitionType?
122142
- * @param {string} props.label?
122143
- * @return {TextFieldEntry}
122250
+ /**
122251
+ * TimerEventDefinitionValue - Generic textField entry allowing to specify the
122252
+ * timerEventDefintionValue based on the set timerEventDefintionType. To be used
122253
+ * together with timerEventDefinitionType.
122254
+ *
122255
+ * @param {object} props
122256
+ * @param {ModdleElement} props.element
122257
+ * @param {'timeCycle'|'timeDate'|'timeDuration'} props.timerEventDefinitionType?
122258
+ * @param {string} props.label?
122259
+ * @return {TextFieldEntry}
122144
122260
  */
122145
122261
  function TimerEventDefinitionValue$1(props) {
122146
122262
  const {
@@ -122309,10 +122425,10 @@
122309
122425
  return JOB_WORKER_IMPLEMENTATION_OPTION;
122310
122426
  };
122311
122427
 
122312
- /**
122313
- * Set value by either creating or removing zeebe:userTask extension element.
122314
- * Note that they must not exist both at the same time, however this
122315
- * will be ensured by a camunda-bpmn-js behavior (and not by the propPanel).
122428
+ /**
122429
+ * Set value by either creating or removing zeebe:userTask extension element.
122430
+ * Note that they must not exist both at the same time, however this
122431
+ * will be ensured by a camunda-bpmn-js behavior (and not by the propPanel).
122316
122432
  */
122317
122433
  const setValue = value => {
122318
122434
  if (value === ZEEBE_USER_TASK_IMPLEMENTATION_OPTION) {
@@ -122619,8 +122735,8 @@
122619
122735
  return properties && properties.get(getPropertyName(namespace));
122620
122736
  }
122621
122737
 
122622
- /**
122623
- * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
122738
+ /**
122739
+ * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
122624
122740
  */
122625
122741
 
122626
122742
  const LOW_PRIORITY$1$1 = 500;
@@ -122948,13 +123064,13 @@
122948
123064
  return groups.find(g => g.id === id);
122949
123065
  }
122950
123066
 
122951
- /**
122952
- * Replace entries with the same ID.
122953
- *s
122954
- * @param {Entry[]} oldEntries
122955
- * @param {Entry[]} newEntries
122956
- *
122957
- * @returns {Entry[]} combined entries
123067
+ /**
123068
+ * Replace entries with the same ID.
123069
+ *s
123070
+ * @param {Entry[]} oldEntries
123071
+ * @param {Entry[]} newEntries
123072
+ *
123073
+ * @returns {Entry[]} combined entries
122958
123074
  */
122959
123075
  function replaceEntries(oldEntries, newEntries) {
122960
123076
  const filteredEntries = oldEntries.filter(oldEntry => !newEntries.find(newEntry => newEntry.id === oldEntry.id));
@@ -123248,6 +123364,20 @@
123248
123364
  })]
123249
123365
  })
123250
123366
  });
123367
+ },
123368
+ 'bindingType': element => {
123369
+ const translate = useService$1('translate');
123370
+ return u("div", {
123371
+ children: [u("p", {
123372
+ children: [u("h1", {
123373
+ children: translate('Latest binding')
123374
+ }), translate('Uses the most recent deployed resource.')]
123375
+ }), u("p", {
123376
+ children: [u("h1", {
123377
+ children: translate('Deployment binding')
123378
+ }), translate('Uses the resource found in the same deployment.')]
123379
+ })]
123380
+ });
123251
123381
  }
123252
123382
  };
123253
123383
 
@@ -123301,1277 +123431,1289 @@
123301
123431
  Modeler$1.prototype._extensionModules
123302
123432
  );
123303
123433
 
123304
- /**
123305
- * Get extension elements of business object. Optionally filter by type.
123306
- *
123307
- * @param {djs.model.Base|ModdleElement} element
123308
- * @param {String} [type=undefined]
123309
- * @returns {Array<ModdleElement>}
123310
- */
123311
- function getExtensionElementsList$1(element, type = undefined) {
123312
- const businessObject = getBusinessObject$2(element),
123313
- extensionElements = businessObject.get('extensionElements');
123314
-
123315
- if (!extensionElements) {
123316
- return [];
123317
- }
123318
-
123319
- const values = extensionElements.get('values');
123320
-
123321
- if (!values || !values.length) {
123322
- return [];
123323
- }
123324
-
123325
- if (type) {
123326
- return values.filter(value => is$6(value, type));
123327
- }
123328
-
123329
- return values;
123330
- }
123331
-
123332
- /**
123333
- * Remove one or more extension elements. Remove bpmn:ExtensionElements afterwards if it's empty.
123334
- *
123335
- * @param {ModdleElement} element
123336
- * @param {ModdleElement} businessObject
123337
- * @param {ModdleElement|Array<ModdleElement>} extensionElementsToRemove
123338
- * @param {CommandStack} commandStack
123339
- */
123340
- function removeExtensionElements(element, businessObject, extensionElementsToRemove, commandStack) {
123341
- if (!isArray$a(extensionElementsToRemove)) {
123342
- extensionElementsToRemove = [ extensionElementsToRemove ];
123343
- }
123344
-
123345
- const extensionElements = businessObject.get('extensionElements'),
123346
- values = extensionElements.get('values').filter(value => !extensionElementsToRemove.includes(value));
123347
-
123348
- commandStack.execute('element.updateModdleProperties', {
123349
- element,
123350
- moddleElement: extensionElements,
123351
- properties: {
123352
- values
123353
- }
123354
- });
123355
- }
123356
-
123357
- const HIGH_PRIORITY$5 = 5000;
123358
-
123359
-
123360
- /**
123361
- * Zeebe BPMN behavior ensuring that bpmn:BusinessRuleTask only has one of the following:
123362
- *
123363
- * (1) zeebe:CalledDecision
123364
- * (2) zeebe:TaskDefinition and zeebe:TaskHeaders
123365
- */
123366
- class CleanUpBusinessRuleTaskBehavior extends CommandInterceptor$1 {
123367
- constructor(commandStack, eventBus) {
123368
- super(eventBus);
123369
-
123370
- /**
123371
- * Remove zeebe:CalledDecision if zeebe:TaskDefinition is about to be added.
123372
- */
123373
- this.preExecute('element.updateModdleProperties' , HIGH_PRIORITY$5, function(context) {
123374
- const {
123375
- element,
123376
- moddleElement,
123377
- properties
123378
- } = context;
123379
-
123380
- if (
123381
- !is$6(element, 'bpmn:BusinessRuleTask')
123382
- || !is$6(moddleElement, 'bpmn:ExtensionElements')
123383
- || !properties.values
123384
- ) {
123385
- return;
123386
- }
123387
-
123388
- const calledDecision = getCalledDecision(element),
123389
- taskDefinition = getTaskDefinition(element);
123390
-
123391
- if (
123392
- calledDecision
123393
- && !taskDefinition
123394
- && properties.values.find(value => is$6(value, 'zeebe:CalledDecision'))
123395
- && properties.values.find(value => is$6(value, 'zeebe:TaskDefinition'))
123396
- ) {
123397
- properties.values = without$1(properties.values, calledDecision);
123398
- }
123399
- }, true);
123400
-
123401
- /**
123402
- * Remove zeebe:TaskDefinition and zeebe:TaskHeaders if zeebe:CalledDecision is about to be added.
123403
- */
123404
- this.preExecute('element.updateModdleProperties', HIGH_PRIORITY$5, function(context) {
123405
- const {
123406
- element,
123407
- moddleElement,
123408
- properties
123409
- } = context;
123410
-
123411
- if (
123412
- !is$6(element, 'bpmn:BusinessRuleTask')
123413
- || !is$6(moddleElement, 'bpmn:ExtensionElements')
123414
- || !properties.values
123415
- ) {
123416
- return;
123417
- }
123418
-
123419
- const calledDecision = getCalledDecision(element),
123420
- taskDefinition = getTaskDefinition(element),
123421
- taskHeaders = getTaskHeaders(element);
123422
-
123423
- if (
123424
- !calledDecision
123425
- && (taskDefinition || taskHeaders)
123426
- && properties.values.find(value => is$6(value, 'zeebe:CalledDecision'))
123427
- && properties.values.find(value => is$6(value, 'zeebe:TaskDefinition') || is$6(value, 'zeebe:TaskHeaders'))
123428
- ) {
123429
- properties.values = without$1(properties.values, (value) => value === taskDefinition || value === taskHeaders);
123430
- }
123431
- }, true);
123432
-
123433
- }
123434
- }
123435
-
123436
- CleanUpBusinessRuleTaskBehavior.$inject = [
123437
- 'commandStack',
123438
- 'eventBus'
123439
- ];
123440
-
123441
-
123442
- // helpers //////////
123443
-
123444
- function getCalledDecision(element) {
123445
- const businessObject = getBusinessObject$2(element);
123446
-
123447
- return getExtensionElementsList$1(businessObject, 'zeebe:CalledDecision')[ 0 ];
123448
- }
123449
-
123450
- function getTaskDefinition(element) {
123451
- const businessObject = getBusinessObject$2(element);
123452
-
123453
- return getExtensionElementsList$1(businessObject, 'zeebe:TaskDefinition')[ 0 ];
123454
- }
123455
-
123456
- function getTaskHeaders(element) {
123457
- const businessObject = getBusinessObject$2(element);
123458
-
123459
- return getExtensionElementsList$1(businessObject, 'zeebe:TaskHeaders')[ 0 ];
123460
- }
123461
-
123462
- class CleanUpEndEventBehavior extends CommandInterceptor$1 {
123463
- constructor(eventBus, modeling) {
123464
- super(eventBus);
123465
-
123466
- this.postExecuted('shape.replace', function(event) {
123467
-
123468
- const {
123469
- context
123470
- } = event;
123471
-
123472
- const {
123473
- newShape
123474
- } = context;
123475
-
123476
- if (!is$6(newShape, 'bpmn:EndEvent') || !getErrorEventDefinition(newShape)) {
123477
- return;
123478
- }
123479
-
123480
- const ioMapping = getIoMapping(newShape);
123481
-
123482
- if (!ioMapping) {
123483
- return;
123484
- }
123485
-
123486
- const businessObject = getBusinessObject$2(newShape),
123487
- extensionElements = businessObject.get('extensionElements'),
123488
- values = without$1(extensionElements.get('values'), ioMapping);
123489
-
123490
- modeling.updateModdleProperties(newShape, extensionElements, { values });
123491
- });
123492
- }
123493
- }
123494
-
123495
- CleanUpEndEventBehavior.$inject = [
123496
- 'eventBus',
123497
- 'modeling'
123498
- ];
123499
-
123500
- // helpers //////////
123501
-
123502
- function getErrorEventDefinition(element) {
123503
- const businessObject = getBusinessObject$2(element);
123504
-
123505
- const eventDefinitions = businessObject.get('eventDefinitions') || [];
123506
-
123507
- return find$3(eventDefinitions, function(definition) {
123508
- return is$6(definition, 'bpmn:ErrorEventDefinition');
123509
- });
123510
- }
123511
-
123512
- function getIoMapping(element) {
123513
- const bo = getBusinessObject$2(element);
123514
-
123515
- const extensionElements = bo.get('extensionElements');
123516
-
123517
- if (!extensionElements) {
123518
- return null;
123519
- }
123520
-
123521
- const values = extensionElements.get('values');
123522
-
123523
- if (!values) {
123524
- return null;
123525
- }
123526
-
123527
- return find$3(values, value => is$6(value, 'zeebe:IoMapping'));
123528
- }
123529
-
123530
- const DISALLOWED_START_LISTENER_TYPES = [
123531
- 'bpmn:StartEvent',
123532
- 'bpmn:BoundaryEvent'
123533
- ];
123534
-
123535
- class CleanUpExecutionListenersBehavior extends CommandInterceptor$1 {
123536
- constructor(eventBus, modeling) {
123537
- super(eventBus);
123538
-
123539
- // remove execution listeners of disallowed type
123540
- this.postExecuted('shape.replace', function(event) {
123541
- const element = event.context.newShape;
123542
-
123543
- const executionListenersContainer = getExecutionListenersContainer(element);
123544
- if (!executionListenersContainer) {
123545
- return;
123546
- }
123547
-
123548
- const listeners = executionListenersContainer.get('listeners');
123549
- const newListeners = withoutDisallowedListeners(element, listeners);
123550
-
123551
- if (newListeners.length !== listeners.length) {
123552
- modeling.updateModdleProperties(element, executionListenersContainer, { listeners: newListeners });
123553
- }
123554
- });
123555
-
123556
- // remove empty execution listener container
123557
- this.postExecuted('element.updateModdleProperties', function(event) {
123558
- const {
123559
- element,
123560
- moddleElement
123561
- } = event.context;
123562
-
123563
- if (!is$6(moddleElement, 'zeebe:ExecutionListeners')) {
123564
- return;
123565
- }
123566
-
123567
- const listeners = moddleElement.get('listeners');
123568
- if (listeners.length) {
123569
- return;
123570
- }
123571
-
123572
- const extensionElements = moddleElement.$parent;
123573
- modeling.updateModdleProperties(element, extensionElements, { values: without$1(extensionElements.get('values'), moddleElement) });
123574
- });
123575
- }
123576
- }
123577
-
123578
- CleanUpExecutionListenersBehavior.$inject = [
123579
- 'eventBus',
123580
- 'modeling'
123581
- ];
123582
-
123583
- // helpers //////////
123584
- function withoutDisallowedListeners(element, listeners) {
123585
- listeners = withoutDisallowedStartListeners(element, listeners);
123586
- listeners = withoutDisallowedEndListeners(element, listeners);
123587
-
123588
- return listeners;
123589
- }
123590
-
123591
- function withoutDisallowedStartListeners(element, listeners) {
123592
- if (isAny$1(element, DISALLOWED_START_LISTENER_TYPES)) {
123593
- return listeners.filter(listener => listener.eventType !== 'start');
123594
- }
123595
-
123596
- return listeners;
123597
- }
123598
-
123599
- function withoutDisallowedEndListeners(element, listeners) {
123600
- if (shouldRemoveEndListeners(element)) {
123601
- return listeners.filter(listener => listener.eventType !== 'end');
123602
- }
123603
-
123604
- return listeners;
123605
- }
123606
-
123607
- function shouldRemoveEndListeners(element) {
123608
- if (
123609
- is$6(element, 'bpmn:BoundaryEvent') && isCompensationEvent(element) ||
123610
- is$6(element, 'bpmn:EndEvent') && isErrorEvent(element) ||
123611
- is$6(element, 'bpmn:Gateway')
123612
- ) {
123613
- return true;
123614
- }
123615
- }
123616
-
123617
- function isCompensationEvent(element) {
123618
- const eventDefinitions = getEventDefinitions(element);
123619
-
123620
- return find$3(eventDefinitions, function(definition) {
123621
- return is$6(definition, 'bpmn:CompensateEventDefinition');
123622
- });
123623
- }
123624
-
123625
- function isErrorEvent(element) {
123626
- const eventDefinitions = getEventDefinitions(element);
123627
-
123628
- return find$3(eventDefinitions, function(definition) {
123629
- return is$6(definition, 'bpmn:ErrorEventDefinition');
123630
- });
123631
- }
123632
-
123633
- function getEventDefinitions(element) {
123634
- const businessObject = getBusinessObject$2(element);
123635
- return businessObject.get('eventDefinitions') || [];
123636
- }
123637
-
123638
- function getExecutionListenersContainer(element) {
123639
- return getExtensionElementsList$1(element, 'zeebe:ExecutionListeners')[0];
123640
- }
123641
-
123642
- /**
123643
- * Zeebe BPMN behavior ensuring that zeebe:subscription is removed from bpmn:Message
123644
- * when it has no properties anymore.
123645
- */
123646
- class CleanUpSubscriptionBehavior extends CommandInterceptor$1 {
123647
- constructor(eventBus, commandStack) {
123648
- super(eventBus);
123649
-
123650
- this.postExecuted([
123651
- 'element.updateProperties',
123652
- 'element.updateModdleProperties'
123653
- ], context => {
123654
- const element = context.shape || context.newShape || context.element;
123655
-
123656
- if (element.labelTarget) {
123657
- return;
123658
- }
123659
-
123660
- if (!is$6(element, 'bpmn:Event')) {
123661
- return;
123662
- }
123663
-
123664
- const messageEventDefinition = getMessageEventDefinition$1(element);
123665
-
123666
- if (!messageEventDefinition) {
123667
- return;
123668
- }
123669
-
123670
- const message = messageEventDefinition.get('messageRef');
123671
-
123672
- if (!message) {
123673
- return;
123674
- }
123675
-
123676
- const subscription = getSubscription(message);
123677
-
123678
- if (!subscription) {
123679
- return;
123680
- }
123681
-
123682
- if (!hasNoProperties(subscription)) {
123683
- return;
123684
- }
123685
-
123686
- removeExtensionElements(element, message, subscription, commandStack);
123687
- }, true);
123688
- }
123689
- }
123690
-
123691
- CleanUpSubscriptionBehavior.$inject = [
123692
- 'eventBus',
123693
- 'commandStack'
123694
- ];
123695
-
123696
-
123697
- // helpers //////////
123698
-
123699
- function getMessageEventDefinition$1(event) {
123700
- const businessObject = getBusinessObject$2(event);
123701
-
123702
- return businessObject.get('eventDefinitions').find(eventDefinition => {
123703
- return is$6(eventDefinition, 'bpmn:MessageEventDefinition');
123704
- });
123705
- }
123706
-
123707
- function getSubscription(message) {
123708
- return getExtensionElementsList$1(message, 'zeebe:Subscription')[ 0 ];
123709
- }
123710
-
123711
- function hasNoProperties(element) {
123712
- const descriptor = element.$descriptor;
123713
-
123714
- return descriptor.properties.every(property => {
123715
- return element.get(property.name) === undefined;
123716
- });
123717
- }
123718
-
123719
- function getTimerEventDefinition(element) {
123720
- const businessObject = getBusinessObject$2(element);
123721
-
123722
- return businessObject.get('eventDefinitions').find(eventDefinition => {
123723
- return is$6(eventDefinition, 'bpmn:TimerEventDefinition');
123724
- });
123725
- }
123726
-
123727
- /**
123728
- * Check whether a given timer expression type is supported for a given element.
123729
- *
123730
- * @param {string} type
123731
- * @param {Element|ModdleElement} element
123732
- *
123733
- * @return {boolean}
123734
- */
123735
- function isTimerExpressionTypeSupported(type, element) {
123736
- const businessObject = getBusinessObject$2(element);
123737
-
123738
- switch (type) {
123739
- case 'timeDate':
123740
- return isAny$1(element, [
123741
- 'bpmn:BoundaryEvent',
123742
- 'bpmn:IntermediateCatchEvent',
123743
- 'bpmn:StartEvent'
123744
- ]);
123745
-
123746
- case 'timeCycle':
123747
- if (is$6(element, 'bpmn:StartEvent') && (!hasParentEventSubProcess(businessObject)) || !isInterrupting(businessObject)) {
123748
- return true;
123749
- }
123750
-
123751
- if (is$6(element, 'bpmn:BoundaryEvent') && !isInterrupting(businessObject)) {
123752
- return true;
123753
- }
123754
-
123755
- return false;
123756
-
123757
- case 'timeDuration':
123758
- if (isAny$1(element, [
123759
- 'bpmn:BoundaryEvent',
123760
- 'bpmn:IntermediateCatchEvent'
123761
- ])) {
123762
- return true;
123763
- }
123764
-
123765
- if (is$6(element, 'bpmn:StartEvent') && hasParentEventSubProcess(businessObject)) {
123766
- return true;
123767
- }
123768
-
123769
- return false;
123770
-
123771
- default:
123772
- return false;
123773
- }
123774
- }
123775
-
123776
- function isInterrupting(businessObject) {
123777
- if (is$6(businessObject, 'bpmn:BoundaryEvent')) {
123778
- return businessObject.get('cancelActivity') !== false;
123779
- }
123780
-
123781
- return businessObject.get('isInterrupting') !== false;
123782
- }
123783
-
123784
- function hasParentEventSubProcess(businessObject) {
123785
- const parent = businessObject.$parent;
123786
-
123787
- return parent && is$6(parent, 'bpmn:SubProcess') && parent.get('triggeredByEvent');
123788
- }
123789
-
123790
- /**
123791
- * Zeebe BPMN behavior ensuring that bpmn:TimerEventDefinition has only allowed time properties of:
123792
- * - timeCycle
123793
- * - timeDate
123794
- * - timeDuration
123795
- */
123796
- class CleanUpTimerExpressionBehavior extends CommandInterceptor$1 {
123797
- constructor(eventBus, modeling) {
123798
- super(eventBus);
123799
-
123800
- /**
123801
- * Remove unsupported timer expressions.
123802
- */
123803
- this.postExecuted([
123804
- 'shape.move',
123805
- 'shape.replace',
123806
- 'element.updateProperties',
123807
- 'element.updateModdleProperties'
123808
- ], context => {
123809
- const element = context.shape || context.newShape || context.element;
123810
-
123811
- if (element.labelTarget) {
123812
- return;
123813
- }
123814
-
123815
- if (!is$6(element, 'bpmn:Event')) {
123816
- return;
123817
- }
123818
-
123819
- const timerEventDefinition = getTimerEventDefinition(element);
123820
-
123821
- if (!timerEventDefinition) {
123822
- return;
123823
- }
123824
-
123825
- const propertiesUpdate = {};
123826
-
123827
- [
123828
- 'timeCycle',
123829
- 'timeDate',
123830
- 'timeDuration'
123831
- ].forEach((type) => {
123832
- if (timerEventDefinition.get(type) && !isTimerExpressionTypeSupported(type, element)) {
123833
- propertiesUpdate[ type ] = undefined;
123834
- }
123835
- });
123836
-
123837
- if (!Object.keys(propertiesUpdate).length) {
123838
- return;
123839
- }
123840
-
123841
- modeling.updateModdleProperties(element, timerEventDefinition, propertiesUpdate);
123842
- }, true);
123843
- }
123844
- }
123845
-
123846
- CleanUpTimerExpressionBehavior.$inject = [
123847
- 'eventBus',
123848
- 'modeling'
123849
- ];
123850
-
123851
- const WILDCARD = '*';
123852
-
123853
- const TIMER_PROPERTIES = [
123854
- 'timeCycle',
123855
- 'timeDate',
123856
- 'timeDuration'
123857
- ];
123858
-
123859
- const zeebeServiceTaskProperties = [
123860
- 'zeebe:Input',
123861
- 'zeebe:LoopCharacteristics',
123862
- 'zeebe:TaskDefinition',
123863
- 'zeebe:TaskHeaders',
123864
- 'zeebe:Subscription'
123865
- ];
123866
-
123867
- class ZeebeModdleExtension {
123868
- constructor(eventBus) {
123869
- eventBus.on('moddleCopy.canCopyProperty', (context) => {
123870
- const {
123871
- parent,
123872
- property,
123873
- propertyName
123874
- } = context;
123875
-
123876
- return this.canCopyProperty(property, parent, propertyName);
123877
- });
123878
- }
123879
-
123880
- canCopyProperty(property, parent, propertyName) {
123881
-
123882
- // (1) check if property is allowed in parent
123883
- if (isObject$5(property) && !isAllowedInParent(property, parent)) {
123884
- return false;
123885
- }
123886
-
123887
- // (2) check for specific scenarios
123888
- if (!this.canHostServiceTaskLikeProperties(property, parent)) {
123889
- return false;
123890
- }
123891
-
123892
- if (!this.canHostTimerExpression(property, parent, propertyName)) {
123893
- return false;
123894
- }
123895
- }
123896
-
123897
- canHostServiceTaskLikeProperties(property, parent) {
123898
- if (isAllowedInZeebeServiceTask(property)) {
123899
- const serviceTaskLike = getParent(parent, 'bpmn:IntermediateThrowEvent') || getParent(parent, 'bpmn:EndEvent');
123900
-
123901
- if (serviceTaskLike) {
123902
- return isMessageEvent(serviceTaskLike);
123903
- }
123904
- }
123905
-
123906
- return true;
123907
- }
123908
-
123909
- canHostTimerExpression(property, parent, propertyName) {
123910
- if (!is$6(parent, 'bpmn:TimerEventDefinition') || !TIMER_PROPERTIES.includes(propertyName)) {
123911
- return true;
123912
- }
123913
-
123914
- return isTimerExpressionTypeSupported(propertyName, parent.$parent);
123915
- }
123916
- }
123917
-
123918
- ZeebeModdleExtension.$inject = [ 'eventBus' ];
123919
-
123920
-
123921
- // helpers //////////
123922
-
123923
- function getParent(element, type) {
123924
- if (!type) {
123925
- return element.$parent;
123926
- }
123927
-
123928
- if (is$6(element, type)) {
123929
- return element;
123930
- }
123931
-
123932
- if (!element.$parent) {
123933
- return;
123934
- }
123935
-
123936
- return getParent(element.$parent, type);
123937
- }
123938
-
123939
- function isAllowedInParent(property, parent) {
123940
-
123941
- // (1) find property descriptor
123942
- const descriptor = property.$type && property.$model.getTypeDescriptor(property.$type);
123943
-
123944
- const allowedIn = descriptor && descriptor.meta && descriptor.meta.allowedIn;
123945
-
123946
- if (!allowedIn || isWildcard(allowedIn)) {
123947
- return true;
123948
- }
123949
-
123950
- // (2) check if property has parent of allowed type
123951
- return some$2(allowedIn, function(type) {
123952
- return getParent(parent, type);
123953
- });
123954
- }
123955
-
123956
- function isWildcard(allowedIn) {
123957
- return allowedIn.indexOf(WILDCARD) !== -1;
123958
- }
123959
-
123960
- function isMessageEvent(event) {
123961
- const eventDefinitions = event.get('eventDefinitions');
123962
-
123963
- return eventDefinitions.some((eventDefinition) => {
123964
- return is$6(eventDefinition, 'bpmn:MessageEventDefinition');
123965
- });
123966
- }
123967
-
123968
- // check if property is allowed in zeebe:ZeebeServiceTask but not for none events
123969
- function isAllowedInZeebeServiceTask(property) {
123970
- return zeebeServiceTaskProperties.some((propertyType) => {
123971
- return is$6(property, propertyType);
123972
- });
123973
- }
123974
-
123975
- /**
123976
- * Creates a new element and set the parent to it
123977
- *
123978
- * @method ElementHelper#createElement
123979
- *
123980
- * @param {String} elementType of the new element
123981
- * @param {Object} properties of the new element in key-value pairs
123982
- * @param {moddle.object} parent of the new element
123983
- * @param {BpmnFactory} factory which creates the new element
123984
- *
123985
- * @returns {djs.model.Base} element which is created
123986
- */
123987
- function createElement$2(elementType, properties, parent, factory) {
123988
- var element = factory.create(elementType, properties);
123989
- element.$parent = parent;
123990
-
123991
- return element;
123992
- }
123993
-
123994
- /**
123995
- * Get zeebe:CalledElement of an element.
123996
- *
123997
- * @param {djs.model.Base|ModdleElement} element
123998
- *
123999
- * @returns {ModdleElement}
124000
- */
124001
- function getCalledElement(element) {
124002
- const calledElements = getCalledElements(element);
124003
-
124004
- return calledElements[ 0 ];
124005
- }
124006
-
124007
- function getCalledElements(element) {
124008
- const businessObject = getBusinessObject$2(element);
124009
-
124010
- return getExtensionElementsList$1(businessObject, 'zeebe:CalledElement');
124011
- }
124012
-
124013
- const HIGH_PRIORITY$4 = 5000;
124014
-
124015
-
124016
- /**
124017
- * Zeebe BPMN specific behavior for creating call activities.
124018
- */
124019
- class CreateZeebeCallActivityBehavior extends CommandInterceptor$1 {
124020
- constructor(bpmnFactory, eventBus, modeling) {
124021
- super(eventBus);
124022
-
124023
- /**
124024
- * Add zeebe:CalledElement extension element with zeebe:propagateAllChildVariables attribute = false
124025
- * when creating bpmn:CallActivity.
124026
- */
124027
- this.postExecuted('shape.create', HIGH_PRIORITY$4, function(context) {
124028
- const { shape } = context;
124029
-
124030
- if (!is$6(shape, 'bpmn:CallActivity')) {
124031
- return;
124032
- }
124033
-
124034
- const businessObject = getBusinessObject$2(shape);
124035
-
124036
- let calledElement = getCalledElement(businessObject);
124037
-
124038
- if (!calledElement) {
124039
- let extensionElements = businessObject.get('extensionElements');
124040
-
124041
- if (!extensionElements) {
124042
- extensionElements = createElement$2(
124043
- 'bpmn:ExtensionElements',
124044
- {
124045
- values: []
124046
- },
124047
- businessObject,
124048
- bpmnFactory
124049
- );
124050
-
124051
- modeling.updateProperties(shape, { extensionElements });
124052
- }
124053
-
124054
- calledElement = createElement$2(
124055
- 'zeebe:CalledElement',
124056
- {
124057
- propagateAllChildVariables: false
124058
- },
124059
- extensionElements,
124060
- bpmnFactory
124061
- );
124062
-
124063
- modeling.updateModdleProperties(shape, extensionElements, {
124064
- values: [
124065
- ...(extensionElements.values || []),
124066
- calledElement
124067
- ]
124068
- });
124069
- } else if (!has$3(calledElement, 'propagateAllChildVariables')) {
124070
-
124071
- // set zeebe:propagateAllChildVariables to false if zeebe:CalledElement exists
124072
- modeling.updateModdleProperties(shape, calledElement, {
124073
- propagateAllChildVariables: false
124074
- });
124075
- }
124076
- }, true);
124077
-
124078
- }
123434
+ /**
123435
+ * Get extension elements of business object. Optionally filter by type.
123436
+ *
123437
+ * @param {djs.model.Base|ModdleElement} element
123438
+ * @param {String} [type=undefined]
123439
+ * @returns {Array<ModdleElement>}
123440
+ */
123441
+ function getExtensionElementsList$1(element, type = undefined) {
123442
+ const businessObject = getBusinessObject$2(element),
123443
+ extensionElements = businessObject.get('extensionElements');
123444
+
123445
+ if (!extensionElements) {
123446
+ return [];
123447
+ }
123448
+
123449
+ const values = extensionElements.get('values');
123450
+
123451
+ if (!values || !values.length) {
123452
+ return [];
123453
+ }
123454
+
123455
+ if (type) {
123456
+ return values.filter(value => is$6(value, type));
123457
+ }
123458
+
123459
+ return values;
123460
+ }
123461
+
123462
+ /**
123463
+ * Remove one or more extension elements. Remove bpmn:ExtensionElements afterwards if it's empty.
123464
+ *
123465
+ * @param {ModdleElement} element
123466
+ * @param {ModdleElement} businessObject
123467
+ * @param {ModdleElement|Array<ModdleElement>} extensionElementsToRemove
123468
+ * @param {CommandStack} commandStack
123469
+ */
123470
+ function removeExtensionElements(element, businessObject, extensionElementsToRemove, commandStack) {
123471
+ if (!isArray$a(extensionElementsToRemove)) {
123472
+ extensionElementsToRemove = [ extensionElementsToRemove ];
123473
+ }
123474
+
123475
+ const extensionElements = businessObject.get('extensionElements'),
123476
+ values = extensionElements.get('values').filter(value => !extensionElementsToRemove.includes(value));
123477
+
123478
+ commandStack.execute('element.updateModdleProperties', {
123479
+ element,
123480
+ moddleElement: extensionElements,
123481
+ properties: {
123482
+ values
123483
+ }
123484
+ });
124079
123485
  }
124080
123486
 
124081
- CreateZeebeCallActivityBehavior.$inject = [
124082
- 'bpmnFactory',
124083
- 'eventBus',
124084
- 'modeling'
124085
- ];
124086
-
124087
- const LOW_PRIORITY$1 = 250;
124088
-
124089
- /**
124090
- * Camunda-specific behavior ensuring `isExecutable` is kept after deleting
124091
- * the last participant.
124092
- */
124093
- class DeleteParticipantBehaviour extends CommandInterceptor$1 {
124094
- constructor(eventBus, canvas, modeling) {
124095
- super(eventBus);
124096
-
124097
- this.postExecuted('shape.delete', LOW_PRIORITY$1, function(context) {
124098
- const {
124099
- collaborationRoot,
124100
- shape
124101
- } = context;
124102
-
124103
- const newRoot = canvas.getRootElement();
124104
-
124105
- if (is$6(shape, 'bpmn:Participant') &&
124106
- collaborationRoot &&
124107
- !collaborationRoot.businessObject.get('participants').length &&
124108
- is$6(newRoot, 'bpmn:Process')) {
124109
-
124110
- const oldProcessBusinessObject = shape.businessObject.get('processRef');
124111
-
124112
- if (!oldProcessBusinessObject) {
124113
- return;
124114
- }
124115
-
124116
- modeling.updateProperties(newRoot, { isExecutable: oldProcessBusinessObject.get('isExecutable') });
124117
- }
124118
-
124119
- }, true);
124120
- }
123487
+ const HIGH_PRIORITY$5 = 5000;
123488
+
123489
+
123490
+ /**
123491
+ * Zeebe BPMN behavior ensuring that bpmn:BusinessRuleTask only has one of the following:
123492
+ *
123493
+ * (1) zeebe:CalledDecision
123494
+ * (2) zeebe:TaskDefinition and zeebe:TaskHeaders
123495
+ */
123496
+ class CleanUpBusinessRuleTaskBehavior extends CommandInterceptor$1 {
123497
+ constructor(commandStack, eventBus) {
123498
+ super(eventBus);
123499
+
123500
+ /**
123501
+ * Remove zeebe:CalledDecision if zeebe:TaskDefinition is about to be added.
123502
+ */
123503
+ this.preExecute('element.updateModdleProperties' , HIGH_PRIORITY$5, function(context) {
123504
+ const {
123505
+ element,
123506
+ moddleElement,
123507
+ properties
123508
+ } = context;
123509
+
123510
+ if (
123511
+ !is$6(element, 'bpmn:BusinessRuleTask')
123512
+ || !is$6(moddleElement, 'bpmn:ExtensionElements')
123513
+ || !properties.values
123514
+ ) {
123515
+ return;
123516
+ }
123517
+
123518
+ const calledDecision = getCalledDecision(element),
123519
+ taskDefinition = getTaskDefinition(element);
123520
+
123521
+ if (
123522
+ calledDecision
123523
+ && !taskDefinition
123524
+ && properties.values.find(value => is$6(value, 'zeebe:CalledDecision'))
123525
+ && properties.values.find(value => is$6(value, 'zeebe:TaskDefinition'))
123526
+ ) {
123527
+ properties.values = without$1(properties.values, calledDecision);
123528
+ }
123529
+ }, true);
123530
+
123531
+ /**
123532
+ * Remove zeebe:TaskDefinition and zeebe:TaskHeaders if zeebe:CalledDecision is about to be added.
123533
+ */
123534
+ this.preExecute('element.updateModdleProperties', HIGH_PRIORITY$5, function(context) {
123535
+ const {
123536
+ element,
123537
+ moddleElement,
123538
+ properties
123539
+ } = context;
123540
+
123541
+ if (
123542
+ !is$6(element, 'bpmn:BusinessRuleTask')
123543
+ || !is$6(moddleElement, 'bpmn:ExtensionElements')
123544
+ || !properties.values
123545
+ ) {
123546
+ return;
123547
+ }
123548
+
123549
+ const calledDecision = getCalledDecision(element),
123550
+ taskDefinition = getTaskDefinition(element),
123551
+ taskHeaders = getTaskHeaders(element);
123552
+
123553
+ if (
123554
+ !calledDecision
123555
+ && (taskDefinition || taskHeaders)
123556
+ && properties.values.find(value => is$6(value, 'zeebe:CalledDecision'))
123557
+ && properties.values.find(value => is$6(value, 'zeebe:TaskDefinition') || is$6(value, 'zeebe:TaskHeaders'))
123558
+ ) {
123559
+ properties.values = without$1(properties.values, (value) => value === taskDefinition || value === taskHeaders);
123560
+ }
123561
+ }, true);
123562
+
123563
+ }
123564
+ }
123565
+
123566
+ CleanUpBusinessRuleTaskBehavior.$inject = [
123567
+ 'commandStack',
123568
+ 'eventBus'
123569
+ ];
123570
+
123571
+
123572
+ // helpers //////////
123573
+
123574
+ function getCalledDecision(element) {
123575
+ const businessObject = getBusinessObject$2(element);
123576
+
123577
+ return getExtensionElementsList$1(businessObject, 'zeebe:CalledDecision')[ 0 ];
123578
+ }
123579
+
123580
+ function getTaskDefinition(element) {
123581
+ const businessObject = getBusinessObject$2(element);
123582
+
123583
+ return getExtensionElementsList$1(businessObject, 'zeebe:TaskDefinition')[ 0 ];
123584
+ }
123585
+
123586
+ function getTaskHeaders(element) {
123587
+ const businessObject = getBusinessObject$2(element);
123588
+
123589
+ return getExtensionElementsList$1(businessObject, 'zeebe:TaskHeaders')[ 0 ];
124121
123590
  }
124122
123591
 
124123
- DeleteParticipantBehaviour.$inject = [
124124
- 'eventBus',
124125
- 'canvas',
124126
- 'modeling'
124127
- ];
124128
-
124129
- const ids = new Ids$1([ 32, 32, 1 ]);
124130
-
124131
- /**
124132
- * Get ID with prefix.
124133
- */
124134
- function getPrefixedId(prefix) {
124135
- return ids.nextPrefixed(prefix);
123592
+ class CleanUpEndEventBehavior extends CommandInterceptor$1 {
123593
+ constructor(eventBus, modeling) {
123594
+ super(eventBus);
123595
+
123596
+ this.postExecuted('shape.replace', function(event) {
123597
+
123598
+ const {
123599
+ context
123600
+ } = event;
123601
+
123602
+ const {
123603
+ newShape
123604
+ } = context;
123605
+
123606
+ if (!is$6(newShape, 'bpmn:EndEvent') || !getErrorEventDefinition(newShape)) {
123607
+ return;
123608
+ }
123609
+
123610
+ const ioMapping = getIoMapping(newShape);
123611
+
123612
+ if (!ioMapping) {
123613
+ return;
123614
+ }
123615
+
123616
+ const businessObject = getBusinessObject$2(newShape),
123617
+ extensionElements = businessObject.get('extensionElements'),
123618
+ values = without$1(extensionElements.get('values'), ioMapping);
123619
+
123620
+ modeling.updateModdleProperties(newShape, extensionElements, { values });
123621
+ });
123622
+ }
123623
+ }
123624
+
123625
+ CleanUpEndEventBehavior.$inject = [
123626
+ 'eventBus',
123627
+ 'modeling'
123628
+ ];
123629
+
123630
+ // helpers //////////
123631
+
123632
+ function getErrorEventDefinition(element) {
123633
+ const businessObject = getBusinessObject$2(element);
123634
+
123635
+ const eventDefinitions = businessObject.get('eventDefinitions') || [];
123636
+
123637
+ return find$3(eventDefinitions, function(definition) {
123638
+ return is$6(definition, 'bpmn:ErrorEventDefinition');
123639
+ });
123640
+ }
123641
+
123642
+ function getIoMapping(element) {
123643
+ const bo = getBusinessObject$2(element);
123644
+
123645
+ const extensionElements = bo.get('extensionElements');
123646
+
123647
+ if (!extensionElements) {
123648
+ return null;
123649
+ }
123650
+
123651
+ const values = extensionElements.get('values');
123652
+
123653
+ if (!values) {
123654
+ return null;
123655
+ }
123656
+
123657
+ return find$3(values, value => is$6(value, 'zeebe:IoMapping'));
124136
123658
  }
124137
123659
 
124138
- const FORM_KEY_PREFIX = 'camunda-forms:bpmn:',
124139
- USER_TASK_FORM_ID_PREFIX = 'UserTaskForm_';
124140
-
124141
- function getFormDefinition(element) {
124142
- const businessObject = getBusinessObject$2(element);
124143
-
124144
- const formDefinitions = getExtensionElementsList$1(businessObject, 'zeebe:FormDefinition');
124145
-
124146
- return formDefinitions[ 0 ];
123660
+ const DISALLOWED_START_LISTENER_TYPES = [
123661
+ 'bpmn:StartEvent',
123662
+ 'bpmn:BoundaryEvent'
123663
+ ];
123664
+
123665
+ class CleanUpExecutionListenersBehavior extends CommandInterceptor$1 {
123666
+ constructor(eventBus, modeling) {
123667
+ super(eventBus);
123668
+
123669
+ // remove execution listeners of disallowed type
123670
+ this.postExecuted('shape.replace', function(event) {
123671
+ const element = event.context.newShape;
123672
+
123673
+ const executionListenersContainer = getExecutionListenersContainer(element);
123674
+ if (!executionListenersContainer) {
123675
+ return;
123676
+ }
123677
+
123678
+ const listeners = executionListenersContainer.get('listeners');
123679
+ const newListeners = withoutDisallowedListeners(element, listeners);
123680
+
123681
+ if (newListeners.length !== listeners.length) {
123682
+ modeling.updateModdleProperties(element, executionListenersContainer, { listeners: newListeners });
123683
+ }
123684
+ });
123685
+
123686
+ // remove empty execution listener container
123687
+ this.postExecuted('element.updateModdleProperties', function(event) {
123688
+ const {
123689
+ element,
123690
+ moddleElement
123691
+ } = event.context;
123692
+
123693
+ if (!is$6(moddleElement, 'zeebe:ExecutionListeners')) {
123694
+ return;
123695
+ }
123696
+
123697
+ const listeners = moddleElement.get('listeners');
123698
+ if (listeners.length) {
123699
+ return;
123700
+ }
123701
+
123702
+ const extensionElements = moddleElement.$parent;
123703
+ modeling.updateModdleProperties(element, extensionElements, { values: without$1(extensionElements.get('values'), moddleElement) });
123704
+ });
123705
+ }
123706
+ }
123707
+
123708
+ CleanUpExecutionListenersBehavior.$inject = [
123709
+ 'eventBus',
123710
+ 'modeling'
123711
+ ];
123712
+
123713
+ // helpers //////////
123714
+ function withoutDisallowedListeners(element, listeners) {
123715
+ listeners = withoutDisallowedStartListeners(element, listeners);
123716
+ listeners = withoutDisallowedEndListeners(element, listeners);
123717
+
123718
+ return listeners;
123719
+ }
123720
+
123721
+ function withoutDisallowedStartListeners(element, listeners) {
123722
+ if (isAny$1(element, DISALLOWED_START_LISTENER_TYPES)) {
123723
+ return listeners.filter(listener => listener.eventType !== 'start');
123724
+ }
123725
+
123726
+ return listeners;
123727
+ }
123728
+
123729
+ function withoutDisallowedEndListeners(element, listeners) {
123730
+ if (shouldRemoveEndListeners(element)) {
123731
+ return listeners.filter(listener => listener.eventType !== 'end');
123732
+ }
123733
+
123734
+ return listeners;
123735
+ }
123736
+
123737
+ function shouldRemoveEndListeners(element) {
123738
+ if (
123739
+ is$6(element, 'bpmn:BoundaryEvent') && isCompensationEvent(element) ||
123740
+ is$6(element, 'bpmn:EndEvent') && isErrorEvent(element) ||
123741
+ is$6(element, 'bpmn:Gateway')
123742
+ ) {
123743
+ return true;
123744
+ }
123745
+ }
123746
+
123747
+ function isCompensationEvent(element) {
123748
+ const eventDefinitions = getEventDefinitions(element);
123749
+
123750
+ return find$3(eventDefinitions, function(definition) {
123751
+ return is$6(definition, 'bpmn:CompensateEventDefinition');
123752
+ });
123753
+ }
123754
+
123755
+ function isErrorEvent(element) {
123756
+ const eventDefinitions = getEventDefinitions(element);
123757
+
123758
+ return find$3(eventDefinitions, function(definition) {
123759
+ return is$6(definition, 'bpmn:ErrorEventDefinition');
123760
+ });
123761
+ }
123762
+
123763
+ function getEventDefinitions(element) {
123764
+ const businessObject = getBusinessObject$2(element);
123765
+ return businessObject.get('eventDefinitions') || [];
123766
+ }
123767
+
123768
+ function getExecutionListenersContainer(element) {
123769
+ return getExtensionElementsList$1(element, 'zeebe:ExecutionListeners')[0];
124147
123770
  }
124148
123771
 
124149
- function getUserTaskForm(element, options = {}) {
124150
- let {
124151
- formKey,
124152
- rootElement
124153
- } = options;
124154
-
124155
- rootElement = rootElement || getRootElement$1(element);
124156
-
124157
- if (!formKey) {
124158
- const formDefinition = getFormDefinition(element);
124159
-
124160
- if (!formDefinition) {
124161
- return;
124162
- }
124163
-
124164
- formKey = formDefinition.get('formKey');
124165
- }
124166
-
124167
- const userTaskForms = getExtensionElementsList$1(rootElement, 'zeebe:UserTaskForm');
124168
-
124169
- return userTaskForms.find(userTaskForm => {
124170
- return userTaskFormIdToFormKey(userTaskForm.get('id')) === formKey;
124171
- });
123772
+ /**
123773
+ * Zeebe BPMN behavior ensuring that zeebe:subscription is removed from bpmn:Message
123774
+ * when it has no properties anymore.
123775
+ */
123776
+ class CleanUpSubscriptionBehavior extends CommandInterceptor$1 {
123777
+ constructor(eventBus, commandStack) {
123778
+ super(eventBus);
123779
+
123780
+ this.postExecuted([
123781
+ 'element.updateProperties',
123782
+ 'element.updateModdleProperties'
123783
+ ], context => {
123784
+ const element = context.shape || context.newShape || context.element;
123785
+
123786
+ if (element.labelTarget) {
123787
+ return;
123788
+ }
123789
+
123790
+ if (!is$6(element, 'bpmn:Event')) {
123791
+ return;
123792
+ }
123793
+
123794
+ const messageEventDefinition = getMessageEventDefinition$1(element);
123795
+
123796
+ if (!messageEventDefinition) {
123797
+ return;
123798
+ }
123799
+
123800
+ const message = messageEventDefinition.get('messageRef');
123801
+
123802
+ if (!message) {
123803
+ return;
123804
+ }
123805
+
123806
+ const subscription = getSubscription(message);
123807
+
123808
+ if (!subscription) {
123809
+ return;
123810
+ }
123811
+
123812
+ if (!hasNoProperties(subscription)) {
123813
+ return;
123814
+ }
123815
+
123816
+ removeExtensionElements(element, message, subscription, commandStack);
123817
+ }, true);
123818
+ }
123819
+ }
123820
+
123821
+ CleanUpSubscriptionBehavior.$inject = [
123822
+ 'eventBus',
123823
+ 'commandStack'
123824
+ ];
123825
+
123826
+
123827
+ // helpers //////////
123828
+
123829
+ function getMessageEventDefinition$1(event) {
123830
+ const businessObject = getBusinessObject$2(event);
123831
+
123832
+ return businessObject.get('eventDefinitions').find(eventDefinition => {
123833
+ return is$6(eventDefinition, 'bpmn:MessageEventDefinition');
123834
+ });
123835
+ }
123836
+
123837
+ function getSubscription(message) {
123838
+ return getExtensionElementsList$1(message, 'zeebe:Subscription')[ 0 ];
123839
+ }
123840
+
123841
+ function hasNoProperties(element) {
123842
+ const descriptor = element.$descriptor;
123843
+
123844
+ return descriptor.properties.every(property => {
123845
+ return element.get(property.name) === undefined;
123846
+ });
124172
123847
  }
124173
123848
 
124174
- function userTaskFormIdToFormKey(userTaskFormId) {
124175
- return `${ FORM_KEY_PREFIX }${ userTaskFormId }`;
123849
+ function getTimerEventDefinition(element) {
123850
+ const businessObject = getBusinessObject$2(element);
123851
+
123852
+ return businessObject.get('eventDefinitions').find(eventDefinition => {
123853
+ return is$6(eventDefinition, 'bpmn:TimerEventDefinition');
123854
+ });
123855
+ }
123856
+
123857
+ /**
123858
+ * Check whether a given timer expression type is supported for a given element.
123859
+ *
123860
+ * @param {string} type
123861
+ * @param {Element|ModdleElement} element
123862
+ *
123863
+ * @return {boolean}
123864
+ */
123865
+ function isTimerExpressionTypeSupported(type, element) {
123866
+ const businessObject = getBusinessObject$2(element);
123867
+
123868
+ switch (type) {
123869
+ case 'timeDate':
123870
+ return isAny$1(element, [
123871
+ 'bpmn:BoundaryEvent',
123872
+ 'bpmn:IntermediateCatchEvent',
123873
+ 'bpmn:StartEvent'
123874
+ ]);
123875
+
123876
+ case 'timeCycle':
123877
+ if (is$6(element, 'bpmn:StartEvent') && (!hasParentEventSubProcess(businessObject)) || !isInterrupting(businessObject)) {
123878
+ return true;
123879
+ }
123880
+
123881
+ if (is$6(element, 'bpmn:BoundaryEvent') && !isInterrupting(businessObject)) {
123882
+ return true;
123883
+ }
123884
+
123885
+ return false;
123886
+
123887
+ case 'timeDuration':
123888
+ if (isAny$1(element, [
123889
+ 'bpmn:BoundaryEvent',
123890
+ 'bpmn:IntermediateCatchEvent'
123891
+ ])) {
123892
+ return true;
123893
+ }
123894
+
123895
+ if (is$6(element, 'bpmn:StartEvent') && hasParentEventSubProcess(businessObject)) {
123896
+ return true;
123897
+ }
123898
+
123899
+ return false;
123900
+
123901
+ default:
123902
+ return false;
123903
+ }
123904
+ }
123905
+
123906
+ function isInterrupting(businessObject) {
123907
+ if (is$6(businessObject, 'bpmn:BoundaryEvent')) {
123908
+ return businessObject.get('cancelActivity') !== false;
123909
+ }
123910
+
123911
+ return businessObject.get('isInterrupting') !== false;
123912
+ }
123913
+
123914
+ function hasParentEventSubProcess(businessObject) {
123915
+ const parent = businessObject.$parent;
123916
+
123917
+ return parent && is$6(parent, 'bpmn:SubProcess') && parent.get('triggeredByEvent');
124176
123918
  }
124177
123919
 
124178
- function isUserTaskFormKey(formKey) {
124179
- return formKey && formKey.startsWith(FORM_KEY_PREFIX);
124180
- }
123920
+ /**
123921
+ * Zeebe BPMN behavior ensuring that bpmn:TimerEventDefinition has only allowed time properties of:
123922
+ * - timeCycle
123923
+ * - timeDate
123924
+ * - timeDuration
123925
+ */
123926
+ class CleanUpTimerExpressionBehavior extends CommandInterceptor$1 {
123927
+ constructor(eventBus, modeling) {
123928
+ super(eventBus);
123929
+
123930
+ /**
123931
+ * Remove unsupported timer expressions.
123932
+ */
123933
+ this.postExecuted([
123934
+ 'shape.move',
123935
+ 'shape.replace',
123936
+ 'element.updateProperties',
123937
+ 'element.updateModdleProperties'
123938
+ ], context => {
123939
+ const element = context.shape || context.newShape || context.element;
123940
+
123941
+ if (element.labelTarget) {
123942
+ return;
123943
+ }
123944
+
123945
+ if (!is$6(element, 'bpmn:Event')) {
123946
+ return;
123947
+ }
123948
+
123949
+ const timerEventDefinition = getTimerEventDefinition(element);
123950
+
123951
+ if (!timerEventDefinition) {
123952
+ return;
123953
+ }
123954
+
123955
+ const propertiesUpdate = {};
123956
+
123957
+ [
123958
+ 'timeCycle',
123959
+ 'timeDate',
123960
+ 'timeDuration'
123961
+ ].forEach((type) => {
123962
+ if (timerEventDefinition.get(type) && !isTimerExpressionTypeSupported(type, element)) {
123963
+ propertiesUpdate[ type ] = undefined;
123964
+ }
123965
+ });
123966
+
123967
+ if (!Object.keys(propertiesUpdate).length) {
123968
+ return;
123969
+ }
123970
+
123971
+ modeling.updateModdleProperties(element, timerEventDefinition, propertiesUpdate);
123972
+ }, true);
123973
+ }
123974
+ }
123975
+
123976
+ CleanUpTimerExpressionBehavior.$inject = [
123977
+ 'eventBus',
123978
+ 'modeling'
123979
+ ];
124181
123980
 
124182
- function createUserTaskFormId() {
124183
- return getPrefixedId(USER_TASK_FORM_ID_PREFIX);
123981
+ const WILDCARD = '*';
123982
+
123983
+ const TIMER_PROPERTIES = [
123984
+ 'timeCycle',
123985
+ 'timeDate',
123986
+ 'timeDuration'
123987
+ ];
123988
+
123989
+ const zeebeServiceTaskProperties = [
123990
+ 'zeebe:Input',
123991
+ 'zeebe:LoopCharacteristics',
123992
+ 'zeebe:TaskDefinition',
123993
+ 'zeebe:TaskHeaders',
123994
+ 'zeebe:Subscription'
123995
+ ];
123996
+
123997
+ class ZeebeModdleExtension {
123998
+ constructor(eventBus) {
123999
+ eventBus.on('moddleCopy.canCopyProperty', (context) => {
124000
+ const {
124001
+ parent,
124002
+ property,
124003
+ propertyName
124004
+ } = context;
124005
+
124006
+ return this.canCopyProperty(property, parent, propertyName);
124007
+ });
124008
+ }
124009
+
124010
+ canCopyProperty(property, parent, propertyName) {
124011
+
124012
+ // (1) check if property is allowed in parent
124013
+ if (isObject$5(property) && !isAllowedInParent(property, parent)) {
124014
+ return false;
124015
+ }
124016
+
124017
+ // (2) check for specific scenarios
124018
+ if (!this.canHostServiceTaskLikeProperties(property, parent)) {
124019
+ return false;
124020
+ }
124021
+
124022
+ if (!this.canHostTimerExpression(property, parent, propertyName)) {
124023
+ return false;
124024
+ }
124025
+ }
124026
+
124027
+ canHostServiceTaskLikeProperties(property, parent) {
124028
+ if (isAllowedInZeebeServiceTask(property)) {
124029
+ const serviceTaskLike = getParent(parent, 'bpmn:IntermediateThrowEvent') || getParent(parent, 'bpmn:EndEvent');
124030
+
124031
+ if (serviceTaskLike) {
124032
+ return isMessageEvent(serviceTaskLike);
124033
+ }
124034
+ }
124035
+
124036
+ return true;
124037
+ }
124038
+
124039
+ canHostTimerExpression(property, parent, propertyName) {
124040
+ if (!is$6(parent, 'bpmn:TimerEventDefinition') || !TIMER_PROPERTIES.includes(propertyName)) {
124041
+ return true;
124042
+ }
124043
+
124044
+ return isTimerExpressionTypeSupported(propertyName, parent.$parent);
124045
+ }
124046
+ }
124047
+
124048
+ ZeebeModdleExtension.$inject = [ 'eventBus' ];
124049
+
124050
+
124051
+ // helpers //////////
124052
+
124053
+ function getParent(element, type) {
124054
+ if (!type) {
124055
+ return element.$parent;
124056
+ }
124057
+
124058
+ if (is$6(element, type)) {
124059
+ return element;
124060
+ }
124061
+
124062
+ if (!element.$parent) {
124063
+ return;
124064
+ }
124065
+
124066
+ return getParent(element.$parent, type);
124067
+ }
124068
+
124069
+ function isAllowedInParent(property, parent) {
124070
+
124071
+ // (1) find property descriptor
124072
+ const descriptor = property.$type && property.$model.getTypeDescriptor(property.$type);
124073
+
124074
+ const allowedIn = descriptor && descriptor.meta && descriptor.meta.allowedIn;
124075
+
124076
+ if (!allowedIn || isWildcard(allowedIn)) {
124077
+ return true;
124078
+ }
124079
+
124080
+ // (2) check if property has parent of allowed type
124081
+ return some$2(allowedIn, function(type) {
124082
+ return getParent(parent, type);
124083
+ });
124084
+ }
124085
+
124086
+ function isWildcard(allowedIn) {
124087
+ return allowedIn.indexOf(WILDCARD) !== -1;
124088
+ }
124089
+
124090
+ function isMessageEvent(event) {
124091
+ const eventDefinitions = event.get('eventDefinitions');
124092
+
124093
+ return eventDefinitions.some((eventDefinition) => {
124094
+ return is$6(eventDefinition, 'bpmn:MessageEventDefinition');
124095
+ });
124096
+ }
124097
+
124098
+ // check if property is allowed in zeebe:ZeebeServiceTask but not for none events
124099
+ function isAllowedInZeebeServiceTask(property) {
124100
+ return zeebeServiceTaskProperties.some((propertyType) => {
124101
+ return is$6(property, propertyType);
124102
+ });
124184
124103
  }
124185
124104
 
124186
- function getRootElement$1(element) {
124187
- const businessObject = getBusinessObject$2(element);
124188
-
124189
- let parent = businessObject;
124190
-
124191
- while (parent.$parent && !is$6(parent, 'bpmn:Process')) {
124192
- parent = parent.$parent;
124193
- }
124194
-
124195
- return parent;
124105
+ /**
124106
+ * Creates a new element and set the parent to it
124107
+ *
124108
+ * @method ElementHelper#createElement
124109
+ *
124110
+ * @param {String} elementType of the new element
124111
+ * @param {Object} properties of the new element in key-value pairs
124112
+ * @param {moddle.object} parent of the new element
124113
+ * @param {BpmnFactory} factory which creates the new element
124114
+ *
124115
+ * @returns {djs.model.Base} element which is created
124116
+ */
124117
+ function createElement$2(elementType, properties, parent, factory) {
124118
+ var element = factory.create(elementType, properties);
124119
+ element.$parent = parent;
124120
+
124121
+ return element;
124196
124122
  }
124197
124123
 
124198
- /**
124199
- * Zeebe BPMN specific forms behavior.
124200
- */
124201
- class FormsBehavior extends CommandInterceptor$1 {
124202
- constructor(bpmnFactory, eventBus, modeling) {
124203
- super(eventBus);
124204
-
124205
- this._modeling = modeling;
124206
-
124207
- function removeUserTaskForm(element, moddleElement, userTaskForm) {
124208
- const extensionElements = moddleElement.get('extensionElements');
124209
-
124210
- const values = without$1(extensionElements.get('values'), userTaskForm);
124211
-
124212
- modeling.updateModdleProperties(element, extensionElements, {
124213
- values
124214
- });
124215
-
124216
- if (!values.length) {
124217
- modeling.updateModdleProperties(element, moddleElement, {
124218
- extensionElements: undefined
124219
- });
124220
- }
124221
- }
124222
-
124223
- /**
124224
- * Remove zeebe:UserTaskForm on user task removed.
124225
- */
124226
- this.postExecute('shape.delete', function(context) {
124227
- const {
124228
- oldParent,
124229
- shape
124230
- } = context;
124231
-
124232
- const rootElement = getRootElement$1(oldParent);
124233
-
124234
- const userTaskForm = getUserTaskForm(shape, { rootElement });
124235
-
124236
- if (!is$6(shape, 'bpmn:UserTask') || !userTaskForm) {
124237
- return;
124238
- }
124239
-
124240
- removeUserTaskForm(shape, rootElement, userTaskForm);
124241
- }, true);
124242
-
124243
-
124244
- /**
124245
- * Create new zeebe:FormDefinition and zeebe:UserTaskForm on user task created.
124246
- */
124247
- this.postExecute('shape.create', function(context) {
124248
- const { shape } = context;
124249
-
124250
- const oldFormDefinition = getFormDefinition(shape);
124251
-
124252
- if (!is$6(shape, 'bpmn:UserTask') || !oldFormDefinition) {
124253
- return;
124254
- }
124255
-
124256
- const oldUserTaskForm = getUserTaskForm(shape);
124257
-
124258
- const rootElement = getRootElement$1(shape);
124259
-
124260
- const businessObject = getBusinessObject$2(shape);
124261
-
124262
- const extensionElements = businessObject.get('extensionElements');
124263
-
124264
- let rootExtensionElements = rootElement.get('extensionElements');
124265
-
124266
- // (1) ensure extension elements exists
124267
- if (!rootExtensionElements) {
124268
- rootExtensionElements = createElement$2('bpmn:ExtensionElements', { values: [] }, rootElement, bpmnFactory);
124269
-
124270
- modeling.updateModdleProperties(shape, rootElement, { extensionElements: rootExtensionElements });
124271
- }
124272
-
124273
- // (2) remove existing form definition
124274
- let values = extensionElements.get('values').filter((element) => {
124275
- return element !== oldFormDefinition;
124276
- });
124277
-
124278
- // (3) create new form definition
124279
- const userTaskFormId = createUserTaskFormId();
124280
-
124281
- const newFormDefinition = createElement$2('zeebe:FormDefinition', {
124282
- formKey: userTaskFormIdToFormKey(userTaskFormId)
124283
- }, extensionElements, bpmnFactory);
124284
-
124285
- values = [
124286
- ...values,
124287
- newFormDefinition
124288
- ];
124289
-
124290
- modeling.updateModdleProperties(shape, extensionElements, {
124291
- values
124292
- });
124293
-
124294
- // (4) create new user task form
124295
- const userTaskForm = createElement$2('zeebe:UserTaskForm', {
124296
- id: userTaskFormId,
124297
- body: oldUserTaskForm ? oldUserTaskForm.get('body') : ''
124298
- }, rootExtensionElements, bpmnFactory);
124299
-
124300
- modeling.updateModdleProperties(shape, rootExtensionElements, {
124301
- values: [
124302
- ...(rootExtensionElements.get('values') || []),
124303
- userTaskForm
124304
- ]
124305
- });
124306
- }, true);
124307
-
124308
-
124309
- /**
124310
- * Ensure that a user task only has one of the following:
124311
- *
124312
- * 1. zeebe:FormDefinition with zeebe:formId (linked Camunda form)
124313
- * 2. zeebe:FormDefinition with zeebe:formKey in the format of camunda-forms:bpmn:UserTaskForm_1 (embedded Camunda form)
124314
- * 3. zeebe:FormDefinition with zeebe:formKey (custom form)
124315
- * 4. zeebe:FormDefinition with zeebe:externalReference (external form)
124316
- */
124317
- this.preExecute('element.updateModdleProperties', function(context) {
124318
- const {
124319
- moddleElement,
124320
- properties
124321
- } = context;
124322
-
124323
- if (is$6(moddleElement, 'zeebe:FormDefinition')) {
124324
- if ('formId' in properties) {
124325
- properties.formKey = undefined;
124326
- properties.externalReference = undefined;
124327
- } else if ('formKey' in properties) {
124328
- properties.formId = undefined;
124329
- properties.externalReference = undefined;
124330
- } else if ('externalReference' in properties) {
124331
- properties.formId = undefined;
124332
- properties.formKey = undefined;
124333
- }
124334
- }
124335
- }, true);
124336
-
124337
- /**
124338
- * Clean up user task form after form key or definition is removed. Clean up
124339
- * empty extension elements after form definition is removed.
124340
- */
124341
- this.postExecute('element.updateModdleProperties', function(context) {
124342
- const {
124343
- element,
124344
- moddleElement,
124345
- oldProperties
124346
- } = context;
124347
-
124348
- if (is$6(moddleElement, 'zeebe:FormDefinition')) {
124349
- const formKey = moddleElement.get('formKey');
124350
-
124351
- if (!formKey || !isUserTaskFormKey(formKey)) {
124352
- const userTaskForm = getUserTaskForm(element, { formKey: oldProperties.formKey });
124353
-
124354
- if (userTaskForm) {
124355
- removeUserTaskForm(element, getRootElement$1(element), userTaskForm);
124356
- }
124357
- }
124358
- } else if (isExtensionElementRemoved(context, 'zeebe:FormDefinition')) {
124359
- const formDefinition = oldProperties.values.find(value => is$6(value, 'zeebe:FormDefinition'));
124360
-
124361
- const userTaskForm = getUserTaskForm(element, { formKey: formDefinition.get('formKey') });
124362
-
124363
- if (userTaskForm) {
124364
- removeUserTaskForm(element, getRootElement$1(element), userTaskForm);
124365
- }
124366
-
124367
- if (!moddleElement.get('values').length) {
124368
- modeling.updateProperties(element, {
124369
- extensionElements: undefined
124370
- });
124371
- }
124372
- }
124373
- }, true);
124374
-
124375
- this._registerZeebeUserTaskSupport();
124376
- }
124377
-
124378
- _registerZeebeUserTaskSupport() {
124379
-
124380
- /**
124381
- * Handle `formKey` for `zeebe:UserTask`.
124382
- * 1. Remove if embedded form is used.
124383
- * 2. Convert to externalReference if custom form key.
124384
- */
124385
- this.postExecute('element.updateModdleProperties', ({ element }) => {
124386
-
124387
- if (!is$6(element, 'bpmn:UserTask') || !hasZeebeUserTask(element)) {
124388
- return;
124389
- }
124390
-
124391
- const formDefinition = getFormDefinition(element);
124392
-
124393
- if (!formDefinition) {
124394
- return;
124395
- }
124396
-
124397
- const formKey = formDefinition.get('formKey');
124398
-
124399
- if (isUndefined$6(formKey)) {
124400
- return;
124401
- }
124402
-
124403
- if (isUserTaskFormKey(formKey)) {
124404
- this._modeling.updateModdleProperties(element, formDefinition, { formKey: undefined });
124405
- } else {
124406
- this._modeling.updateModdleProperties(element, formDefinition, {
124407
- externalReference: formKey
124408
- });
124409
- }
124410
- }, true);
124411
-
124412
- /**
124413
- * Replace `externalReference` with `formKey` for non-`zeebe:UserTask`.
124414
- */
124415
- this.postExecute('element.updateModdleProperties', ({ element }) => {
124416
-
124417
- if (!is$6(element, 'bpmn:UserTask') || hasZeebeUserTask(element)) {
124418
- return;
124419
- }
124420
-
124421
- const formDefinition = getFormDefinition(element);
124422
-
124423
- if (!formDefinition) {
124424
- return;
124425
- }
124426
-
124427
- const externalReference = formDefinition.get('externalReference');
124428
-
124429
- if (isUndefined$6(externalReference)) {
124430
- return;
124431
- }
124432
-
124433
- this._modeling.updateModdleProperties(element, formDefinition, {
124434
- externalReference: undefined,
124435
- formKey: externalReference
124436
- });
124437
- }, true);
124438
- }
124124
+ /**
124125
+ * Get zeebe:CalledElement of an element.
124126
+ *
124127
+ * @param {djs.model.Base|ModdleElement} element
124128
+ *
124129
+ * @returns {ModdleElement}
124130
+ */
124131
+ function getCalledElement(element) {
124132
+ const calledElements = getCalledElements(element);
124133
+
124134
+ return calledElements[ 0 ];
124135
+ }
124136
+
124137
+ function getCalledElements(element) {
124138
+ const businessObject = getBusinessObject$2(element);
124139
+
124140
+ return getExtensionElementsList$1(businessObject, 'zeebe:CalledElement');
124439
124141
  }
124440
124142
 
124441
- FormsBehavior.$inject = [
124442
- 'bpmnFactory',
124443
- 'eventBus',
124444
- 'modeling'
124143
+ const HIGH_PRIORITY$4 = 5000;
124144
+
124145
+
124146
+ /**
124147
+ * Zeebe BPMN specific behavior for creating call activities.
124148
+ */
124149
+ class CreateZeebeCallActivityBehavior extends CommandInterceptor$1 {
124150
+ constructor(bpmnFactory, eventBus, modeling) {
124151
+ super(eventBus);
124152
+
124153
+ /**
124154
+ * Add zeebe:CalledElement extension element with zeebe:propagateAllChildVariables attribute = false
124155
+ * when creating bpmn:CallActivity.
124156
+ */
124157
+ this.postExecuted('shape.create', HIGH_PRIORITY$4, function(context) {
124158
+ const { shape } = context;
124159
+
124160
+ if (!is$6(shape, 'bpmn:CallActivity')) {
124161
+ return;
124162
+ }
124163
+
124164
+ const businessObject = getBusinessObject$2(shape);
124165
+
124166
+ let calledElement = getCalledElement(businessObject);
124167
+
124168
+ if (!calledElement) {
124169
+ let extensionElements = businessObject.get('extensionElements');
124170
+
124171
+ if (!extensionElements) {
124172
+ extensionElements = createElement$2(
124173
+ 'bpmn:ExtensionElements',
124174
+ {
124175
+ values: []
124176
+ },
124177
+ businessObject,
124178
+ bpmnFactory
124179
+ );
124180
+
124181
+ modeling.updateProperties(shape, { extensionElements });
124182
+ }
124183
+
124184
+ calledElement = createElement$2(
124185
+ 'zeebe:CalledElement',
124186
+ {
124187
+ propagateAllChildVariables: false
124188
+ },
124189
+ extensionElements,
124190
+ bpmnFactory
124191
+ );
124192
+
124193
+ modeling.updateModdleProperties(shape, extensionElements, {
124194
+ values: [
124195
+ ...(extensionElements.values || []),
124196
+ calledElement
124197
+ ]
124198
+ });
124199
+ } else if (!has$3(calledElement, 'propagateAllChildVariables')) {
124200
+
124201
+ // set zeebe:propagateAllChildVariables to false if zeebe:CalledElement exists
124202
+ modeling.updateModdleProperties(shape, calledElement, {
124203
+ propagateAllChildVariables: false
124204
+ });
124205
+ }
124206
+ }, true);
124207
+
124208
+ }
124209
+ }
124210
+
124211
+ CreateZeebeCallActivityBehavior.$inject = [
124212
+ 'bpmnFactory',
124213
+ 'eventBus',
124214
+ 'modeling'
124445
124215
  ];
124446
124216
 
124447
- function isExtensionElementRemoved(context, type) {
124448
- const {
124449
- moddleElement,
124450
- oldProperties,
124451
- properties
124452
- } = context;
124217
+ const LOW_PRIORITY$1 = 250;
124218
+
124219
+ /**
124220
+ * Camunda-specific behavior ensuring `isExecutable` is kept after deleting
124221
+ * the last participant.
124222
+ */
124223
+ class DeleteParticipantBehaviour extends CommandInterceptor$1 {
124224
+ constructor(eventBus, canvas, modeling) {
124225
+ super(eventBus);
124226
+
124227
+ this.postExecuted('shape.delete', LOW_PRIORITY$1, function(context) {
124228
+ const {
124229
+ collaborationRoot,
124230
+ shape
124231
+ } = context;
124232
+
124233
+ const newRoot = canvas.getRootElement();
124234
+
124235
+ if (is$6(shape, 'bpmn:Participant') &&
124236
+ collaborationRoot &&
124237
+ !collaborationRoot.businessObject.get('participants').length &&
124238
+ is$6(newRoot, 'bpmn:Process')) {
124239
+
124240
+ const oldProcessBusinessObject = shape.businessObject.get('processRef');
124241
+
124242
+ if (!oldProcessBusinessObject) {
124243
+ return;
124244
+ }
124245
+
124246
+ modeling.updateProperties(newRoot, { isExecutable: oldProcessBusinessObject.get('isExecutable') });
124247
+ }
124248
+
124249
+ }, true);
124250
+ }
124251
+ }
124252
+
124253
+ DeleteParticipantBehaviour.$inject = [
124254
+ 'eventBus',
124255
+ 'canvas',
124256
+ 'modeling'
124257
+ ];
124453
124258
 
124454
- return is$6(moddleElement, 'bpmn:ExtensionElements')
124455
- && 'values' in oldProperties
124456
- && 'values' in properties
124457
- && oldProperties.values.find(value => is$6(value, type))
124458
- && !properties.values.find(value => is$6(value, type));
124259
+ const ids = new Ids$1([ 32, 32, 1 ]);
124260
+
124261
+ /**
124262
+ * Get ID with prefix.
124263
+ */
124264
+ function getPrefixedId(prefix) {
124265
+ return ids.nextPrefixed(prefix);
124459
124266
  }
124460
124267
 
124461
- function hasZeebeUserTask(userTask) {
124462
- return getExtensionElementsList$1(userTask, 'zeebe:UserTask').length;
124268
+ const FORM_KEY_PREFIX = 'camunda-forms:bpmn:',
124269
+ USER_TASK_FORM_ID_PREFIX = 'UserTaskForm_';
124270
+
124271
+ function getFormDefinition(element) {
124272
+ const businessObject = getBusinessObject$2(element);
124273
+
124274
+ const formDefinitions = getExtensionElementsList$1(businessObject, 'zeebe:FormDefinition');
124275
+
124276
+ return formDefinitions[ 0 ];
124277
+ }
124278
+
124279
+ function getUserTaskForm(element, options = {}) {
124280
+ let {
124281
+ formKey,
124282
+ rootElement
124283
+ } = options;
124284
+
124285
+ rootElement = rootElement || getRootElement$1(element);
124286
+
124287
+ if (!formKey) {
124288
+ const formDefinition = getFormDefinition(element);
124289
+
124290
+ if (!formDefinition) {
124291
+ return;
124292
+ }
124293
+
124294
+ formKey = formDefinition.get('formKey');
124295
+ }
124296
+
124297
+ const userTaskForms = getExtensionElementsList$1(rootElement, 'zeebe:UserTaskForm');
124298
+
124299
+ return userTaskForms.find(userTaskForm => {
124300
+ return userTaskFormIdToFormKey(userTaskForm.get('id')) === formKey;
124301
+ });
124302
+ }
124303
+
124304
+ function userTaskFormIdToFormKey(userTaskFormId) {
124305
+ return `${ FORM_KEY_PREFIX }${ userTaskFormId }`;
124306
+ }
124307
+
124308
+ function isUserTaskFormKey(formKey) {
124309
+ return formKey && formKey.startsWith(FORM_KEY_PREFIX);
124310
+ }
124311
+
124312
+ function createUserTaskFormId() {
124313
+ return getPrefixedId(USER_TASK_FORM_ID_PREFIX);
124314
+ }
124315
+
124316
+ function getRootElement$1(element) {
124317
+ const businessObject = getBusinessObject$2(element);
124318
+
124319
+ let parent = businessObject;
124320
+
124321
+ while (parent.$parent && !is$6(parent, 'bpmn:Process')) {
124322
+ parent = parent.$parent;
124323
+ }
124324
+
124325
+ return parent;
124463
124326
  }
124464
124327
 
124465
- const HIGH_PRIORITY$3 = 5000;
124466
-
124467
-
124468
- /**
124469
- * Zeebe BPMN behavior removing zeebe:AssignmentDefinition elements without
124470
- * zeebe:assignee, zeebe:candidateGroups or zeebe:candidateUsers.
124471
- */
124472
- class RemoveAssignmentDefinitionBehavior extends CommandInterceptor$1 {
124473
- constructor(commandStack, eventBus) {
124474
- super(eventBus);
124475
-
124476
- this.postExecuted('element.updateModdleProperties' , HIGH_PRIORITY$3, function(context) {
124477
- const {
124478
- element,
124479
- moddleElement
124480
- } = context;
124481
-
124482
- if (!is$6(moddleElement, 'zeebe:AssignmentDefinition')) {
124483
- return;
124484
- }
124485
-
124486
- const assignmentDefinition = moddleElement;
124487
-
124488
- if (
124489
- is$6(element, 'bpmn:UserTask')
124490
- && isUndefined$6(assignmentDefinition.get('zeebe:assignee'))
124491
- && isUndefined$6(assignmentDefinition.get('zeebe:candidateGroups'))
124492
- && isUndefined$6(assignmentDefinition.get('zeebe:candidateUsers'))
124493
- ) {
124494
- const businessObject = getBusinessObject$2(element);
124495
-
124496
- removeExtensionElements(element, businessObject, assignmentDefinition, commandStack);
124497
- }
124498
- }, true);
124499
-
124500
- }
124328
+ /**
124329
+ * Zeebe BPMN specific forms behavior.
124330
+ */
124331
+ class FormsBehavior extends CommandInterceptor$1 {
124332
+ constructor(bpmnFactory, eventBus, modeling) {
124333
+ super(eventBus);
124334
+
124335
+ this._modeling = modeling;
124336
+
124337
+ function removeUserTaskForm(element, moddleElement, userTaskForm) {
124338
+ const extensionElements = moddleElement.get('extensionElements');
124339
+
124340
+ const values = without$1(extensionElements.get('values'), userTaskForm);
124341
+
124342
+ modeling.updateModdleProperties(element, extensionElements, {
124343
+ values
124344
+ });
124345
+
124346
+ if (!values.length) {
124347
+ modeling.updateModdleProperties(element, moddleElement, {
124348
+ extensionElements: undefined
124349
+ });
124350
+ }
124351
+ }
124352
+
124353
+ /**
124354
+ * Remove zeebe:UserTaskForm on user task removed.
124355
+ */
124356
+ this.postExecute('shape.delete', function(context) {
124357
+ const {
124358
+ oldParent,
124359
+ shape
124360
+ } = context;
124361
+
124362
+ const rootElement = getRootElement$1(oldParent);
124363
+
124364
+ const userTaskForm = getUserTaskForm(shape, { rootElement });
124365
+
124366
+ if (!is$6(shape, 'bpmn:UserTask') || !userTaskForm) {
124367
+ return;
124368
+ }
124369
+
124370
+ removeUserTaskForm(shape, rootElement, userTaskForm);
124371
+ }, true);
124372
+
124373
+
124374
+ /**
124375
+ * Create new zeebe:FormDefinition and zeebe:UserTaskForm on user task created.
124376
+ */
124377
+ this.postExecute('shape.create', function(context) {
124378
+ const { shape } = context;
124379
+
124380
+ const oldFormDefinition = getFormDefinition(shape);
124381
+
124382
+ if (!is$6(shape, 'bpmn:UserTask') || !oldFormDefinition) {
124383
+ return;
124384
+ }
124385
+
124386
+ const oldUserTaskForm = getUserTaskForm(shape);
124387
+
124388
+ const rootElement = getRootElement$1(shape);
124389
+
124390
+ const businessObject = getBusinessObject$2(shape);
124391
+
124392
+ const extensionElements = businessObject.get('extensionElements');
124393
+
124394
+ let rootExtensionElements = rootElement.get('extensionElements');
124395
+
124396
+ // (1) ensure extension elements exists
124397
+ if (!rootExtensionElements) {
124398
+ rootExtensionElements = createElement$2('bpmn:ExtensionElements', { values: [] }, rootElement, bpmnFactory);
124399
+
124400
+ modeling.updateModdleProperties(shape, rootElement, { extensionElements: rootExtensionElements });
124401
+ }
124402
+
124403
+ // (2) remove existing form definition
124404
+ let values = extensionElements.get('values').filter((element) => {
124405
+ return element !== oldFormDefinition;
124406
+ });
124407
+
124408
+ // (3) create new form definition
124409
+ const userTaskFormId = createUserTaskFormId();
124410
+
124411
+ const newFormDefinition = createElement$2('zeebe:FormDefinition', {
124412
+ formKey: userTaskFormIdToFormKey(userTaskFormId)
124413
+ }, extensionElements, bpmnFactory);
124414
+
124415
+ values = [
124416
+ ...values,
124417
+ newFormDefinition
124418
+ ];
124419
+
124420
+ modeling.updateModdleProperties(shape, extensionElements, {
124421
+ values
124422
+ });
124423
+
124424
+ // (4) create new user task form
124425
+ const userTaskForm = createElement$2('zeebe:UserTaskForm', {
124426
+ id: userTaskFormId,
124427
+ body: oldUserTaskForm ? oldUserTaskForm.get('body') : ''
124428
+ }, rootExtensionElements, bpmnFactory);
124429
+
124430
+ modeling.updateModdleProperties(shape, rootExtensionElements, {
124431
+ values: [
124432
+ ...(rootExtensionElements.get('values') || []),
124433
+ userTaskForm
124434
+ ]
124435
+ });
124436
+ }, true);
124437
+
124438
+
124439
+ /**
124440
+ * Ensure that a user task only has one of the following:
124441
+ *
124442
+ * 1. zeebe:FormDefinition with zeebe:formId (linked Camunda form)
124443
+ * 2. zeebe:FormDefinition with zeebe:formKey in the format of camunda-forms:bpmn:UserTaskForm_1 (embedded Camunda form)
124444
+ * 3. zeebe:FormDefinition with zeebe:formKey (custom form)
124445
+ * 4. zeebe:FormDefinition with zeebe:externalReference (external form)
124446
+ *
124447
+ * Furthermore, ensure that:
124448
+ *
124449
+ * 1. zeebe:bindingType only exists if zeebe:formId is set (linked Camunda form)
124450
+ */
124451
+ this.preExecute('element.updateModdleProperties', function(context) {
124452
+ const {
124453
+ moddleElement,
124454
+ properties
124455
+ } = context;
124456
+
124457
+ if (is$6(moddleElement, 'zeebe:FormDefinition')) {
124458
+ if ('formId' in properties) {
124459
+ properties.formKey = undefined;
124460
+ properties.externalReference = undefined;
124461
+ } else if ('formKey' in properties) {
124462
+ properties.formId = undefined;
124463
+ properties.externalReference = undefined;
124464
+ properties.bindingType = undefined;
124465
+ } else if ('externalReference' in properties) {
124466
+ properties.formId = undefined;
124467
+ properties.formKey = undefined;
124468
+ properties.bindingType = undefined;
124469
+ }
124470
+
124471
+ if ('bindingType' in properties && !('formId' in properties) && !moddleElement.get('formId')) {
124472
+ properties.externalReference = undefined;
124473
+ properties.formId = '';
124474
+ properties.formKey = undefined;
124475
+ }
124476
+ }
124477
+ }, true);
124478
+
124479
+ /**
124480
+ * Clean up user task form after form key or definition is removed. Clean up
124481
+ * empty extension elements after form definition is removed.
124482
+ */
124483
+ this.postExecute('element.updateModdleProperties', function(context) {
124484
+ const {
124485
+ element,
124486
+ moddleElement,
124487
+ oldProperties
124488
+ } = context;
124489
+
124490
+ if (is$6(moddleElement, 'zeebe:FormDefinition')) {
124491
+ const formKey = moddleElement.get('formKey');
124492
+
124493
+ if (!formKey || !isUserTaskFormKey(formKey)) {
124494
+ const userTaskForm = getUserTaskForm(element, { formKey: oldProperties.formKey });
124495
+
124496
+ if (userTaskForm) {
124497
+ removeUserTaskForm(element, getRootElement$1(element), userTaskForm);
124498
+ }
124499
+ }
124500
+ } else if (isExtensionElementRemoved(context, 'zeebe:FormDefinition')) {
124501
+ const formDefinition = oldProperties.values.find(value => is$6(value, 'zeebe:FormDefinition'));
124502
+
124503
+ const userTaskForm = getUserTaskForm(element, { formKey: formDefinition.get('formKey') });
124504
+
124505
+ if (userTaskForm) {
124506
+ removeUserTaskForm(element, getRootElement$1(element), userTaskForm);
124507
+ }
124508
+
124509
+ if (!moddleElement.get('values').length) {
124510
+ modeling.updateProperties(element, {
124511
+ extensionElements: undefined
124512
+ });
124513
+ }
124514
+ }
124515
+ }, true);
124516
+
124517
+ this._registerZeebeUserTaskSupport();
124518
+ }
124519
+
124520
+ _registerZeebeUserTaskSupport() {
124521
+
124522
+ /**
124523
+ * Handle `formKey` for `zeebe:UserTask`.
124524
+ * 1. Remove if embedded form is used.
124525
+ * 2. Convert to externalReference if custom form key.
124526
+ */
124527
+ this.postExecute('element.updateModdleProperties', ({ element }) => {
124528
+
124529
+ if (!is$6(element, 'bpmn:UserTask') || !hasZeebeUserTask(element)) {
124530
+ return;
124531
+ }
124532
+
124533
+ const formDefinition = getFormDefinition(element);
124534
+
124535
+ if (!formDefinition) {
124536
+ return;
124537
+ }
124538
+
124539
+ const formKey = formDefinition.get('formKey');
124540
+
124541
+ if (isUndefined$6(formKey)) {
124542
+ return;
124543
+ }
124544
+
124545
+ if (isUserTaskFormKey(formKey)) {
124546
+ this._modeling.updateModdleProperties(element, formDefinition, { formKey: undefined });
124547
+ } else {
124548
+ this._modeling.updateModdleProperties(element, formDefinition, {
124549
+ externalReference: formKey
124550
+ });
124551
+ }
124552
+ }, true);
124553
+
124554
+ /**
124555
+ * Replace `externalReference` with `formKey` for non-`zeebe:UserTask`.
124556
+ */
124557
+ this.postExecute('element.updateModdleProperties', ({ element }) => {
124558
+
124559
+ if (!is$6(element, 'bpmn:UserTask') || hasZeebeUserTask(element)) {
124560
+ return;
124561
+ }
124562
+
124563
+ const formDefinition = getFormDefinition(element);
124564
+
124565
+ if (!formDefinition) {
124566
+ return;
124567
+ }
124568
+
124569
+ const externalReference = formDefinition.get('externalReference');
124570
+
124571
+ if (isUndefined$6(externalReference)) {
124572
+ return;
124573
+ }
124574
+
124575
+ this._modeling.updateModdleProperties(element, formDefinition, {
124576
+ externalReference: undefined,
124577
+ formKey: externalReference
124578
+ });
124579
+ }, true);
124580
+ }
124581
+ }
124582
+
124583
+ FormsBehavior.$inject = [
124584
+ 'bpmnFactory',
124585
+ 'eventBus',
124586
+ 'modeling'
124587
+ ];
124588
+
124589
+ function isExtensionElementRemoved(context, type) {
124590
+ const {
124591
+ moddleElement,
124592
+ oldProperties,
124593
+ properties
124594
+ } = context;
124595
+
124596
+ return is$6(moddleElement, 'bpmn:ExtensionElements')
124597
+ && 'values' in oldProperties
124598
+ && 'values' in properties
124599
+ && oldProperties.values.find(value => is$6(value, type))
124600
+ && !properties.values.find(value => is$6(value, type));
124601
+ }
124602
+
124603
+ function hasZeebeUserTask(userTask) {
124604
+ return getExtensionElementsList$1(userTask, 'zeebe:UserTask').length;
124501
124605
  }
124502
124606
 
124503
- RemoveAssignmentDefinitionBehavior.$inject = [
124504
- 'commandStack',
124505
- 'eventBus'
124607
+ const HIGH_PRIORITY$3 = 5000;
124608
+
124609
+
124610
+ /**
124611
+ * Zeebe BPMN behavior removing zeebe:AssignmentDefinition elements without
124612
+ * zeebe:assignee, zeebe:candidateGroups or zeebe:candidateUsers.
124613
+ */
124614
+ class RemoveAssignmentDefinitionBehavior extends CommandInterceptor$1 {
124615
+ constructor(commandStack, eventBus) {
124616
+ super(eventBus);
124617
+
124618
+ this.postExecuted('element.updateModdleProperties' , HIGH_PRIORITY$3, function(context) {
124619
+ const {
124620
+ element,
124621
+ moddleElement
124622
+ } = context;
124623
+
124624
+ if (!is$6(moddleElement, 'zeebe:AssignmentDefinition')) {
124625
+ return;
124626
+ }
124627
+
124628
+ const assignmentDefinition = moddleElement;
124629
+
124630
+ if (
124631
+ is$6(element, 'bpmn:UserTask')
124632
+ && isUndefined$6(assignmentDefinition.get('zeebe:assignee'))
124633
+ && isUndefined$6(assignmentDefinition.get('zeebe:candidateGroups'))
124634
+ && isUndefined$6(assignmentDefinition.get('zeebe:candidateUsers'))
124635
+ ) {
124636
+ const businessObject = getBusinessObject$2(element);
124637
+
124638
+ removeExtensionElements(element, businessObject, assignmentDefinition, commandStack);
124639
+ }
124640
+ }, true);
124641
+
124642
+ }
124643
+ }
124644
+
124645
+ RemoveAssignmentDefinitionBehavior.$inject = [
124646
+ 'commandStack',
124647
+ 'eventBus'
124506
124648
  ];
124507
124649
 
124508
- const HIGH_PRIORITY$2 = 5000;
124509
-
124510
-
124511
- /**
124512
- * Zeebe BPMN behavior removing zeebe:TaskSchedule elements without
124513
- * zeebe:dueDate and zeebe:followUpDate.
124514
- */
124515
- class RemoveTaskScheduleBehavior extends CommandInterceptor$1 {
124516
- constructor(commandStack, eventBus) {
124517
- super(eventBus);
124518
-
124519
- this.postExecuted('element.updateModdleProperties' , HIGH_PRIORITY$2, function(context) {
124520
- const {
124521
- element,
124522
- moddleElement
124523
- } = context;
124524
-
124525
- if (!is$6(moddleElement, 'zeebe:TaskSchedule')) {
124526
- return;
124527
- }
124528
-
124529
- const taskSchedule = moddleElement;
124530
-
124531
- if (
124532
- is$6(element, 'bpmn:UserTask')
124533
- && isUndefined$6(taskSchedule.get('zeebe:dueDate'))
124534
- && isUndefined$6(taskSchedule.get('zeebe:followUpDate'))
124535
- ) {
124536
- const businessObject = getBusinessObject$2(element);
124537
-
124538
- removeExtensionElements(element, businessObject, taskSchedule, commandStack);
124539
- }
124540
- }, true);
124541
-
124542
- }
124543
- }
124544
-
124545
- RemoveTaskScheduleBehavior.$inject = [
124546
- 'commandStack',
124547
- 'eventBus'
124650
+ const HIGH_PRIORITY$2 = 5000;
124651
+
124652
+
124653
+ /**
124654
+ * Zeebe BPMN behavior removing zeebe:TaskSchedule elements without
124655
+ * zeebe:dueDate and zeebe:followUpDate.
124656
+ */
124657
+ class RemoveTaskScheduleBehavior extends CommandInterceptor$1 {
124658
+ constructor(commandStack, eventBus) {
124659
+ super(eventBus);
124660
+
124661
+ this.postExecuted('element.updateModdleProperties' , HIGH_PRIORITY$2, function(context) {
124662
+ const {
124663
+ element,
124664
+ moddleElement
124665
+ } = context;
124666
+
124667
+ if (!is$6(moddleElement, 'zeebe:TaskSchedule')) {
124668
+ return;
124669
+ }
124670
+
124671
+ const taskSchedule = moddleElement;
124672
+
124673
+ if (
124674
+ is$6(element, 'bpmn:UserTask')
124675
+ && isUndefined$6(taskSchedule.get('zeebe:dueDate'))
124676
+ && isUndefined$6(taskSchedule.get('zeebe:followUpDate'))
124677
+ ) {
124678
+ const businessObject = getBusinessObject$2(element);
124679
+
124680
+ removeExtensionElements(element, businessObject, taskSchedule, commandStack);
124681
+ }
124682
+ }, true);
124683
+
124684
+ }
124685
+ }
124686
+
124687
+ RemoveTaskScheduleBehavior.$inject = [
124688
+ 'commandStack',
124689
+ 'eventBus'
124548
124690
  ];
124549
124691
 
124550
- var behaviorsModule = {
124551
- __init__: [
124552
- 'cleanUpBusinessRuleTaskBehavior',
124553
- 'cleanUpEndEventBehavior',
124554
- 'cleanUpExecutionListenersBehavior',
124555
- 'cleanUpSubscriptionBehavior',
124556
- 'cleanUpTimerExpressionBehavior',
124557
- 'copyPasteBehavior',
124558
- 'createZeebeCallActivityBehavior',
124559
- 'deleteParticipantBehaviour',
124560
- 'formsBehavior',
124561
- 'removeAssignmentDefinitionBehavior',
124562
- 'removeTaskScheduleBehavior'
124563
- ],
124564
- cleanUpBusinessRuleTaskBehavior: [ 'type', CleanUpBusinessRuleTaskBehavior ],
124565
- cleanUpEndEventBehavior: [ 'type', CleanUpEndEventBehavior ],
124566
- cleanUpExecutionListenersBehavior: [ 'type', CleanUpExecutionListenersBehavior ],
124567
- cleanUpSubscriptionBehavior: [ 'type', CleanUpSubscriptionBehavior ],
124568
- cleanUpTimerExpressionBehavior: [ 'type', CleanUpTimerExpressionBehavior ],
124569
- copyPasteBehavior: [ 'type', ZeebeModdleExtension ],
124570
- createZeebeCallActivityBehavior: [ 'type', CreateZeebeCallActivityBehavior ],
124571
- deleteParticipantBehaviour: [ 'type', DeleteParticipantBehaviour ],
124572
- formsBehavior: [ 'type', FormsBehavior ],
124573
- removeAssignmentDefinitionBehavior: [ 'type', RemoveAssignmentDefinitionBehavior ],
124574
- removeTaskScheduleBehavior: [ 'type', RemoveTaskScheduleBehavior ]
124692
+ var behaviorsModule = {
124693
+ __init__: [
124694
+ 'cleanUpBusinessRuleTaskBehavior',
124695
+ 'cleanUpEndEventBehavior',
124696
+ 'cleanUpExecutionListenersBehavior',
124697
+ 'cleanUpSubscriptionBehavior',
124698
+ 'cleanUpTimerExpressionBehavior',
124699
+ 'copyPasteBehavior',
124700
+ 'createZeebeCallActivityBehavior',
124701
+ 'deleteParticipantBehaviour',
124702
+ 'formsBehavior',
124703
+ 'removeAssignmentDefinitionBehavior',
124704
+ 'removeTaskScheduleBehavior'
124705
+ ],
124706
+ cleanUpBusinessRuleTaskBehavior: [ 'type', CleanUpBusinessRuleTaskBehavior ],
124707
+ cleanUpEndEventBehavior: [ 'type', CleanUpEndEventBehavior ],
124708
+ cleanUpExecutionListenersBehavior: [ 'type', CleanUpExecutionListenersBehavior ],
124709
+ cleanUpSubscriptionBehavior: [ 'type', CleanUpSubscriptionBehavior ],
124710
+ cleanUpTimerExpressionBehavior: [ 'type', CleanUpTimerExpressionBehavior ],
124711
+ copyPasteBehavior: [ 'type', ZeebeModdleExtension ],
124712
+ createZeebeCallActivityBehavior: [ 'type', CreateZeebeCallActivityBehavior ],
124713
+ deleteParticipantBehaviour: [ 'type', DeleteParticipantBehaviour ],
124714
+ formsBehavior: [ 'type', FormsBehavior ],
124715
+ removeAssignmentDefinitionBehavior: [ 'type', RemoveAssignmentDefinitionBehavior ],
124716
+ removeTaskScheduleBehavior: [ 'type', RemoveTaskScheduleBehavior ]
124575
124717
  };
124576
124718
 
124577
124719
  /**
@@ -130821,7 +130963,7 @@
130821
130963
  }
130822
130964
 
130823
130965
  const LOWER_PRIORITY$1 = 300;
130824
- const ALWAYS_DISPLAYED_GROUPS$1 = ['general', 'documentation', 'multiInstance'];
130966
+ const ALWAYS_DISPLAYED_GROUPS$1 = ['general', 'documentation', 'multiInstance', 'Zeebe__ExecutionListeners'];
130825
130967
  let ElementTemplatesPropertiesProvider$1 = class ElementTemplatesPropertiesProvider {
130826
130968
  constructor(elementTemplates, propertiesPanel, injector) {
130827
130969
  propertiesPanel.registerProvider(LOWER_PRIORITY$1, this);