camunda-bpmn-js 0.11.5 → 0.12.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.
Files changed (25) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/assets/properties-panel.css +780 -0
  3. package/dist/camunda-cloud-modeler.development.js +546 -505
  4. package/dist/camunda-cloud-modeler.production.min.js +3 -3
  5. package/dist/camunda-platform-modeler.development.js +178 -270
  6. package/dist/camunda-platform-modeler.production.min.js +1 -1
  7. package/lib/camunda-cloud/features/modeling/behavior/CleanUpBusinessRuleTaskBehavior.js +112 -0
  8. package/lib/camunda-cloud/features/modeling/behavior/CreateZeebeBoundaryEventBehavior.js +51 -55
  9. package/lib/camunda-cloud/features/modeling/behavior/CreateZeebeCallActivityBehavior.js +56 -59
  10. package/lib/camunda-cloud/features/modeling/behavior/FormDefinitionBehavior.js +69 -127
  11. package/lib/camunda-cloud/features/modeling/behavior/UpdatePropagateAllChildVariablesBehavior.js +76 -128
  12. package/lib/camunda-cloud/features/modeling/behavior/index.js +3 -0
  13. package/lib/camunda-cloud/features/properties-provider/parts/implementation/InputOutput.js +21 -7
  14. package/lib/camunda-cloud/features/rules/BpmnRules.js +1 -1
  15. package/lib/camunda-cloud/helper/CalledElementHelper.js +43 -41
  16. package/lib/camunda-cloud/helper/FormsHelper.js +38 -50
  17. package/lib/camunda-cloud/helper/InputOutputHelper.js +92 -106
  18. package/lib/camunda-platform/features/modeling/behavior/DeleteErrorEventDefinitionBehavior.js +24 -47
  19. package/lib/camunda-platform/features/modeling/behavior/DeleteRetryTimeCycleBehavior.js +39 -81
  20. package/lib/camunda-platform/features/modeling/behavior/UpdateCamundaExclusiveBehavior.js +31 -65
  21. package/lib/camunda-platform/features/modeling/behavior/UpdateInputOutputBehavior.js +42 -76
  22. package/lib/camunda-platform/features/modeling/behavior/UpdateResultVariableBehavior.js +21 -26
  23. package/lib/camunda-platform/features/modeling/behavior/UserTaskFormsBehavior.js +16 -10
  24. package/lib/camunda-platform/helper/InputOutputHelper.js +29 -0
  25. package/package.json +2 -2
@@ -72078,18 +72078,19 @@
72078
72078
 
72079
72079
 
72080
72080
  /**
72081
- * Camunda BPMN specific `camunda:errorEventDefinition` behavior.
72082
- *
72083
- * When `camunda:type` is set to something different than `external`
72084
- * on an element, then `camunda:errorEventDefinition` extension elements
72085
- * shall be removed.
72081
+ * Camunda BPMN specific camunda:ErrorEventDefinition behavior.
72086
72082
  */
72087
- function DeleteErrorEventDefinitionBehavior(eventBus) {
72088
-
72089
- CommandInterceptor.call(this, eventBus);
72083
+ class DeleteErrorEventDefinitionBehavior extends CommandInterceptor {
72084
+ constructor(eventBus, modeling) {
72085
+ super(eventBus);
72090
72086
 
72091
- this.executed([ 'properties-panel.update-businessobject', 'element.updateProperties' ],
72092
- HIGH_PRIORITY$l, function(context) {
72087
+ /**
72088
+ * Remove camunda:ErrorEventDefinitions on camunda:type set to external.
72089
+ */
72090
+ this.postExecute([
72091
+ 'element.updateProperties',
72092
+ 'properties-panel.update-businessobject'
72093
+ ], HIGH_PRIORITY$l, function(context) {
72093
72094
  const {
72094
72095
  element,
72095
72096
  oldProperties,
@@ -72097,52 +72098,30 @@
72097
72098
  } = context;
72098
72099
 
72099
72100
  const businessObject = getBusinessObject(element),
72100
- extensionElements = businessObject.extensionElements;
72101
+ extensionElements = businessObject.get('extensionElements');
72101
72102
 
72102
- // (1) Check whether behavior is suitable
72103
- if (
72104
- is$1(element, 'camunda:ExternalCapable') &&
72105
- extensionElements &&
72106
- externalTypeChanged(oldProperties, properties)
72107
- ) {
72103
+ if (is$1(element, 'camunda:ExternalCapable')
72104
+ && extensionElements
72105
+ && externalTypeChanged(oldProperties, properties)) {
72108
72106
 
72109
- // (2) Delete camunda:ErrorEventDefinition elements and save them for revert
72110
- context.deletedErrorEventDefinitions = extensionElements.values;
72107
+ const values = extensionElements.get('values').filter((element) => {
72108
+ return !is$1(element, 'camunda:ErrorEventDefinition');
72109
+ });
72111
72110
 
72112
- extensionElements.values = extensionElements.values.filter(
72113
- element => !is$1(element, 'camunda:ErrorEventDefinition')
72114
- );
72111
+ modeling.updateModdleProperties(element, extensionElements, { values });
72115
72112
  }
72116
-
72117
72113
  }, true);
72118
72114
 
72119
- this.reverted([ 'properties-panel.update-businessobject', 'element.updateProperties' ],
72120
- HIGH_PRIORITY$l, function({ context }) {
72121
- const {
72122
- element,
72123
- deletedErrorEventDefinitions: oldExtensionElements
72124
- } = context;
72125
-
72126
- const businessObject = getBusinessObject(element);
72127
-
72128
- // Only intercept the revert, if the behavior became active
72129
- if (oldExtensionElements) {
72130
- const extensionElements = businessObject.extensionElements;
72131
-
72132
- extensionElements.values = oldExtensionElements;
72133
- }
72134
- });
72115
+ }
72135
72116
  }
72136
72117
 
72137
-
72138
72118
  DeleteErrorEventDefinitionBehavior.$inject = [
72139
- 'eventBus'
72119
+ 'eventBus',
72120
+ 'modeling'
72140
72121
  ];
72141
72122
 
72142
- inherits_browser(DeleteErrorEventDefinitionBehavior, CommandInterceptor);
72143
-
72144
72123
 
72145
- // helper //////////////////
72124
+ // helpers //////////
72146
72125
 
72147
72126
  function externalTypeChanged(oldProperties, updatesProperties) {
72148
72127
  const {
@@ -72156,22 +72135,23 @@
72156
72135
  return oldType === 'external' && newType !== 'external';
72157
72136
  }
72158
72137
 
72159
- const HIGH_PRIORITY$m = 15000;
72138
+ const HIGH_PRIORITY$m = 5000;
72160
72139
 
72161
72140
 
72162
72141
  /**
72163
- * Camunda BPMN specific `camunda:FailedJobRetryTimeCycle` behavior.
72164
- *
72165
- * When `camunda:asyncAfter` or `camunda:asyncBefore` are set to false
72166
- * on an element, then `camunda:FailedJobRetryTimeCycle` shall be removed. This ensures
72167
- * that the BPMN diagram XML reflects the behavior of Camunda Platform engine.
72142
+ * Camunda BPMN specific camunda:FailedJobRetryTimeCycle behavior.
72168
72143
  */
72169
- function DeleteRetryTimeCycleBehavior(eventBus) {
72170
-
72171
- CommandInterceptor.call(this, eventBus);
72144
+ class DeleteRetryTimeCycleBehavior extends CommandInterceptor {
72145
+ constructor(eventBus, modeling) {
72146
+ super(eventBus);
72172
72147
 
72173
- this.executed([ 'properties-panel.update-businessobject', 'element.updateProperties' ],
72174
- HIGH_PRIORITY$m, function(context) {
72148
+ /**
72149
+ * Remove camunda:FailedJobRetryTimeCycle if camunda:asyncAfter or camunda:asyncBefore is set to false.
72150
+ */
72151
+ this.postExecute([
72152
+ 'element.updateProperties',
72153
+ 'properties-panel.update-businessobject'
72154
+ ], HIGH_PRIORITY$m, function(context) {
72175
72155
  const {
72176
72156
  element,
72177
72157
  properties
@@ -72180,112 +72160,76 @@
72180
72160
  const businessObject = getBusinessObject(element),
72181
72161
  extensionElements = businessObject.extensionElements;
72182
72162
 
72183
- // (1.1) Execute if...
72184
- if (is$1(element, 'camunda:AsyncCapable') && // ...asyncCapable
72185
- properties && // ...properties updated
72186
- (properties['camunda:asyncBefore'] === false || // ...update async (1)
72187
- properties['camunda:asyncAfter'] === false) && // ...update async (2)
72188
- (extensionElements && extensionElements.values.length) && // ...we have extensionElements
72189
- (extensionElements.values.find(ele => is$1(ele, 'camunda:FailedJobRetryTimeCycle'))) && // ...we have retryTimeCycle
72190
- !getTimerEventDefinition(element) // ...we don't have a TimerEventDefinition
72163
+ if (
72164
+ !is$1(element, 'camunda:AsyncCapable')
72165
+ || (properties[ 'camunda:asyncBefore' ] !== false && properties[ 'camunda:asyncAfter' ] !== false)
72166
+ || !extensionElements
72167
+ || !extensionElements.get('values').length
72168
+ || !extensionElements.get('values').find((value) => is$1(value, 'camunda:FailedJobRetryTimeCycle'))
72169
+ || getTimerEventDefinition(element)
72170
+ || isAsyncBefore(businessObject)
72171
+ || isAsyncAfter(businessObject)
72191
72172
  ) {
72192
-
72193
- // (1.2) ... but don't execute if one async is still true
72194
- if (isAsyncBefore(businessObject) || isAsyncAfter(businessObject)) {
72195
- return;
72196
- }
72197
-
72198
- // (2) Delete the camunda:FailedJobRetryTimeCycle and save them for revert
72199
- context.deleteRetryCycleOldExtElements = extensionElements.values;
72200
-
72201
- extensionElements.values = extensionElements.values.filter(
72202
- ele => !is$1(ele, 'camunda:FailedJobRetryTimeCycle'));
72173
+ return;
72203
72174
  }
72204
72175
 
72205
- }, true);
72206
-
72207
- this.reverted([ 'properties-panel.update-businessobject', 'element.updateProperties' ],
72208
- HIGH_PRIORITY$m, function({ context }) {
72209
- const {
72210
- element,
72211
- deleteRetryCycleOldExtElements: oldExtensionElements
72212
- } = context;
72213
-
72214
- const businessObject = getBusinessObject(element);
72176
+ const values = extensionElements.get('values').filter((element) => {
72177
+ return !is$1(element, 'camunda:FailedJobRetryTimeCycle');
72178
+ });
72215
72179
 
72216
- // Only intercept the revert, if the behavior became active
72217
- if (oldExtensionElements) {
72218
- const extensionElements = businessObject.extensionElements;
72180
+ modeling.updateModdleProperties(element, extensionElements, { values });
72181
+ }, true);
72219
72182
 
72220
- extensionElements.values = oldExtensionElements;
72221
- }
72222
- });
72183
+ }
72223
72184
  }
72224
72185
 
72225
-
72226
72186
  DeleteRetryTimeCycleBehavior.$inject = [
72227
- 'eventBus'
72187
+ 'eventBus',
72188
+ 'modeling'
72228
72189
  ];
72229
72190
 
72230
- inherits_browser(DeleteRetryTimeCycleBehavior, CommandInterceptor);
72231
72191
 
72192
+ // helpers //////////
72232
72193
 
72233
- // helper //////////////////
72234
-
72235
- /**
72236
- * Returns true if the attribute 'camunda:asyncBefore' is set
72237
- * to true.
72238
- *
72239
- * @param {ModdleElement} bo
72240
- *
72241
- * @return {boolean} a boolean value
72242
- */
72243
- function isAsyncBefore(bo) {
72244
- return !!(bo.get('camunda:asyncBefore') || bo.get('camunda:async'));
72194
+ function isAsyncBefore(businessObject) {
72195
+ return !!(businessObject.get('camunda:asyncBefore') || businessObject.get('camunda:async'));
72245
72196
  }
72246
72197
 
72247
- /**
72248
- * Returns true if the attribute 'camunda:asyncAfter' is set
72249
- * to true.
72250
- *
72251
- * @param {ModdleElement} bo
72252
- *
72253
- * @return {boolean} a boolean value
72254
- */
72255
- function isAsyncAfter(bo) {
72256
- return !!bo.get('camunda:asyncAfter');
72198
+ function isAsyncAfter(businessObject) {
72199
+ return !!businessObject.get('camunda:asyncAfter');
72257
72200
  }
72258
72201
 
72259
72202
  function getTimerEventDefinition(element) {
72260
72203
  return getEventDefinition$2(element, 'bpmn:TimerEventDefinition');
72261
72204
  }
72262
72205
 
72263
- function getEventDefinition$2(element, eventType) {
72206
+ function getEventDefinition$2(element, type) {
72264
72207
  const businessObject = getBusinessObject(element);
72265
72208
 
72266
72209
  const eventDefinitions = businessObject.get('eventDefinitions') || [];
72267
72210
 
72268
- return find(eventDefinitions, function(definition) {
72269
- return is$1(definition, eventType);
72211
+ return eventDefinitions.find((eventDefinition) => {
72212
+ return is$1(eventDefinition, type);
72270
72213
  });
72271
72214
  }
72272
72215
 
72273
- const HIGH_PRIORITY$n = 15000;
72216
+ const HIGH_PRIORITY$n = 5000;
72274
72217
 
72275
72218
 
72276
72219
  /**
72277
- * Camunda BPMN specific `camunda:exclusive` behavior.
72278
- *
72279
- * When `camunda:asyncAfter` or `camunda:asyncBefore` are set to false
72280
- * on an element, then `camunda:exclusive` shall be set to true. This ensures
72281
- * that the BPMN diagram XML reflects the behavior of Camunda Platform engine.
72220
+ * Camunda BPMN specific camunda:exclusive behavior.
72282
72221
  */
72283
- function UpdateCamundaExclusiveBehavior(eventBus) {
72284
-
72285
- CommandInterceptor.call(this, eventBus);
72222
+ class UpdateCamundaExclusiveBehavior extends CommandInterceptor {
72223
+ constructor(eventBus) {
72224
+ super(eventBus);
72286
72225
 
72287
- this.preExecute([ 'properties-panel.update-businessobject', 'element.updateProperties' ],
72288
- HIGH_PRIORITY$n, function(context) {
72226
+ /**
72227
+ * Set camunda:exclusive to true on camunda:asyncBefore or camunda:asyncAfter set to false.
72228
+ */
72229
+ this.preExecute([
72230
+ 'element.updateProperties',
72231
+ 'properties-panel.update-businessobject'
72232
+ ], HIGH_PRIORITY$n, function(context) {
72289
72233
  const {
72290
72234
  element,
72291
72235
  properties
@@ -72293,125 +72237,53 @@
72293
72237
 
72294
72238
  const businessObject = getBusinessObject(element);
72295
72239
 
72296
- // (1.1) Execute if...
72297
- if (is$1(element, 'camunda:AsyncCapable') && // ...asyncCapable
72298
- properties && // ...properties updated
72299
- (properties['camunda:asyncBefore'] === false || // ...update async before or (1)
72300
- properties['camunda:asyncAfter'] === false) && // ...update async after (2)
72301
- !isExclusive(businessObject) // ...is currently not exclusive
72240
+ if (!is$1(element, 'camunda:AsyncCapable')
72241
+ || (properties[ 'camunda:asyncBefore' ] !== false && properties[ 'camunda:asyncAfter' ] !== false)
72242
+ || isExclusive(businessObject)
72243
+ || (isAsyncAfter$1(businessObject) && properties[ 'camunda:asyncAfter' ] !== false)
72244
+ || (isAsyncBefore$1(businessObject) && properties[ 'camunda:asyncBefore' ] !== false)
72245
+ || (properties[ 'camunda:asyncBefore' ] === true || properties[ 'camunda:asyncAfter' ] === true)
72302
72246
  ) {
72303
-
72304
- // (1.2) ...but don't execute if...
72305
- if ((isAsyncAfter$1(businessObject) && properties['camunda:asyncAfter'] !== false) || // ...asyncAfter will stay
72306
- (isAsyncBefore$1(businessObject) && properties['camunda:asyncBefore'] !== false) || // ...asyncBefore will stay
72307
- (properties['camunda:asyncBefore'] || properties['camunda:asyncAfter']) // one is set to true
72308
- ) {
72309
- return;
72310
- }
72311
-
72312
- // (2) Update the context
72313
- properties['camunda:exclusive'] = true;
72247
+ return;
72314
72248
  }
72249
+
72250
+ properties[ 'camunda:exclusive' ] = true;
72315
72251
  }, true);
72316
- }
72317
72252
 
72253
+ }
72254
+ }
72318
72255
 
72319
72256
  UpdateCamundaExclusiveBehavior.$inject = [
72320
72257
  'eventBus'
72321
72258
  ];
72322
72259
 
72323
- inherits_browser(UpdateCamundaExclusiveBehavior, CommandInterceptor);
72324
-
72325
72260
 
72326
- // helper //////////////////
72261
+ // helpers //////////
72327
72262
 
72328
- /**
72329
- * Returns true if the attribute 'camunda:asyncBefore' is set
72330
- * to true.
72331
- *
72332
- * @param {ModdleElement} bo
72333
- *
72334
- * @return {boolean} a boolean value
72335
- */
72336
- function isAsyncBefore$1(bo) {
72337
- return !!(bo.get('camunda:asyncBefore') || bo.get('camunda:async'));
72263
+ function isAsyncBefore$1(businessObject) {
72264
+ return !!(businessObject.get('camunda:asyncBefore') || businessObject.get('camunda:async'));
72338
72265
  }
72339
72266
 
72340
- /**
72341
- * Returns true if the attribute 'camunda:asyncAfter' is set
72342
- * to true.
72343
- *
72344
- * @param {ModdleElement} bo
72345
- *
72346
- * @return {boolean} a boolean value
72347
- */
72348
- function isAsyncAfter$1(bo) {
72349
- return !!bo.get('camunda:asyncAfter');
72267
+ function isAsyncAfter$1(businessObject) {
72268
+ return !!businessObject.get('camunda:asyncAfter');
72350
72269
  }
72351
72270
 
72352
- /**
72353
- * Returns true if the attribute 'camunda:exclusive' is set
72354
- * to true.
72355
- *
72356
- * @param {ModdleElement} bo
72357
- *
72358
- * @return {boolean} a boolean value
72359
- */
72360
- function isExclusive(bo) {
72361
- return !!bo.get('camunda:exclusive');
72271
+ function isExclusive(businessObject) {
72272
+ return !!businessObject.get('camunda:exclusive');
72362
72273
  }
72363
72274
 
72364
- /**
72365
- * Camunda BPMN specific `camunda:inputOutput` behavior.
72366
- */
72367
- function UpdateInputOutputBehavior(eventBus, modeling) {
72368
-
72369
- CommandInterceptor.call(this, eventBus);
72370
-
72371
- this.postExecute([
72372
- 'element.updateProperties',
72373
- 'element.updateModdleProperties',
72374
- 'properties-panel.update-businessobject-list'
72375
- ], function(context) {
72376
- const {
72377
- element,
72378
- oldProperties,
72379
- propertyName
72380
- } = context;
72381
-
72382
- const businessObject = getBusinessObject(element);
72383
- const inputOutput = getInputOutput(businessObject);
72384
- const extensionElements = businessObject.get('extensionElements');
72385
-
72386
- // do not apply if inputOutput got recently added
72387
- if (!oldProperties && propertyName === 'values') {
72388
- return;
72389
- }
72275
+ function getInputOutput(businessObject) {
72276
+ const extensionElements = businessObject.get('extensionElements');
72390
72277
 
72391
- // remove camunda:inputOutput if there are no input/output parameters anymore
72392
- if (inputOutput && isEmpty$1(inputOutput)) {
72393
- const filtered = extensionElements.values.filter(function(element) {
72394
- return element !== inputOutput;
72395
- });
72278
+ if (!extensionElements) {
72279
+ return;
72280
+ }
72396
72281
 
72397
- modeling.updateModdleProperties(element, extensionElements, {
72398
- values: filtered
72399
- });
72400
- }
72401
- }, true);
72282
+ return extensionElements.get('values').find((value) => {
72283
+ return is$1(value, 'camunda:InputOutput');
72284
+ });
72402
72285
  }
72403
72286
 
72404
-
72405
- UpdateInputOutputBehavior.$inject = [
72406
- 'eventBus',
72407
- 'modeling'
72408
- ];
72409
-
72410
- inherits_browser(UpdateInputOutputBehavior, CommandInterceptor);
72411
-
72412
-
72413
- // helper //////////////////
72414
-
72415
72287
  function getInputParameters(inputOutput) {
72416
72288
  return inputOutput.get('inputParameters');
72417
72289
  }
@@ -72420,81 +72292,117 @@
72420
72292
  return inputOutput.get('outputParameters');
72421
72293
  }
72422
72294
 
72423
- function getInputOutput(businessObject) {
72424
- const extensionElements = businessObject.get('extensionElements');
72295
+ function isInputOutputEmpty(inputOutput) {
72296
+ const inputParameters = getInputParameters(inputOutput);
72297
+ const outputParameters = getOutputParameters(inputOutput);
72425
72298
 
72426
- if (!extensionElements) {
72427
- return;
72428
- }
72299
+ return !inputParameters.length && !outputParameters.length;
72300
+ }
72429
72301
 
72430
- const values = extensionElements.get('values');
72302
+ /**
72303
+ * Camunda BPMN specific camunda:InputOutput behavior.
72304
+ */
72305
+ class UpdateInputOutputBehavior extends CommandInterceptor {
72306
+ constructor(eventBus, modeling) {
72307
+ super(eventBus);
72431
72308
 
72432
- return values.find((value) => {
72433
- return is$1(value, 'camunda:InputOutput');
72434
- });
72435
- }
72309
+ /**
72310
+ * Remove empty camunda:InputOutput on update.
72311
+ */
72312
+ this.postExecute([
72313
+ 'element.updateProperties',
72314
+ 'element.updateModdleProperties',
72315
+ 'properties-panel.update-businessobject-list'
72316
+ ], function(context) {
72317
+ const {
72318
+ element,
72319
+ oldProperties,
72320
+ propertyName
72321
+ } = context;
72436
72322
 
72437
- function isEmpty$1(inputOutput) {
72438
- const inputParameters = getInputParameters(inputOutput);
72439
- const outputParameters = getOutputParameters(inputOutput);
72323
+ const businessObject = getBusinessObject(element),
72324
+ inputOutput = getInputOutput(businessObject),
72325
+ extensionElements = businessObject.get('extensionElements');
72440
72326
 
72441
- return inputParameters.length === 0 && outputParameters.length === 0;
72327
+ // do not remove newly added camunda:InputOutput
72328
+ if (!oldProperties && propertyName === 'values') {
72329
+ return;
72330
+ }
72331
+
72332
+ if (inputOutput && isInputOutputEmpty(inputOutput)) {
72333
+ const values = extensionElements.get('values').filter(function(element) {
72334
+ return element !== inputOutput;
72335
+ });
72336
+
72337
+ modeling.updateModdleProperties(element, extensionElements, { values });
72338
+ }
72339
+ }, true);
72340
+ }
72442
72341
  }
72443
72342
 
72343
+ UpdateInputOutputBehavior.$inject = [
72344
+ 'eventBus',
72345
+ 'modeling'
72346
+ ];
72347
+
72444
72348
  const HIGH_PRIORITY$o = 5000;
72445
72349
 
72446
72350
 
72447
72351
  /**
72448
- * Camunda BPMN specific `camunda:resultVariable` behavior.
72449
- *
72450
- * When `camunda:resultVariable` is removed from a service task like element
72451
- * `camunda:mapDecisionResult` for the element will be cleaned up.
72352
+ * Camunda BPMN specific camunda:resultVariable behavior.
72452
72353
  */
72453
- function UpdateResultVariableBehavior(eventBus) {
72454
-
72455
- CommandInterceptor.call(this, eventBus);
72354
+ class UpdateResultVariableBehavior extends CommandInterceptor {
72355
+ constructor(eventBus) {
72356
+ super(eventBus);
72456
72357
 
72457
- this.preExecute([ 'properties-panel.update-businessobject', 'element.updateProperties' ],
72458
- HIGH_PRIORITY$o, function(context) {
72358
+ /**
72359
+ * Remove camunda:mapDecisionResult on camunda:resultVariable removed.
72360
+ */
72361
+ this.preExecute([
72362
+ 'element.updateProperties',
72363
+ 'properties-panel.update-businessobject'
72364
+ ], HIGH_PRIORITY$o, function(context) {
72459
72365
  const {
72460
72366
  element,
72461
72367
  properties
72462
72368
  } = context;
72463
72369
 
72464
72370
  if (
72465
- is$1(element, 'camunda:DmnCapable') &&
72466
- has(properties, 'camunda:resultVariable') &&
72467
- isEmpty$2(properties['camunda:resultVariable'])
72371
+ is$1(element, 'camunda:DmnCapable')
72372
+ && has(properties, 'camunda:resultVariable')
72373
+ && isEmpty$1(properties[ 'camunda:resultVariable' ])
72468
72374
  ) {
72469
- properties['camunda:mapDecisionResult'] = null;
72375
+ properties[ 'camunda:mapDecisionResult' ] = null;
72470
72376
  }
72471
72377
  }, true);
72472
- }
72473
72378
 
72379
+ }
72380
+ }
72474
72381
 
72475
72382
  UpdateResultVariableBehavior.$inject = [
72476
72383
  'eventBus'
72477
72384
  ];
72478
72385
 
72479
- inherits_browser(UpdateResultVariableBehavior, CommandInterceptor);
72480
-
72481
72386
 
72482
- // helper //////////////////
72387
+ // helpers //////////
72483
72388
 
72484
- function isEmpty$2(value) {
72389
+ function isEmpty$1(value) {
72485
72390
  return value == undefined || value === '';
72486
72391
  }
72487
72392
 
72488
72393
  /**
72489
- * Camunda BPMN specific user task forms behavior ensuring that only one of the following options is configured:
72490
- *
72491
- * 1. embedded, external or Camunda forms using camunda:formKey
72492
- * 2. Camunda forms using camunda:formRef
72394
+ * Camunda BPMN specific user task forms behavior.
72493
72395
  */
72494
72396
  class UserTaskFormsBehavior extends CommandInterceptor {
72495
72397
  constructor(eventBus) {
72496
72398
  super(eventBus);
72497
72399
 
72400
+ /**
72401
+ * Ensure that only one of the following options is configured:
72402
+ *
72403
+ * 1. embedded, external or Camunda forms using camunda:formKey
72404
+ * 2. Camunda forms using camunda:formRef
72405
+ */
72498
72406
  this.preExecute([
72499
72407
  'element.updateProperties',
72500
72408
  'element.updateModdleProperties',
@@ -72508,13 +72416,13 @@
72508
72416
  context.element.businessObject
72509
72417
  );
72510
72418
 
72511
- if ('camunda:formKey' in properties) {
72419
+ if (has(properties, 'camunda:formKey')) {
72512
72420
  Object.assign(properties, {
72513
72421
  'camunda:formRef': undefined,
72514
72422
  'camunda:formRefBinding': undefined,
72515
72423
  'camunda:formRefVersion': undefined
72516
72424
  });
72517
- } else if ('camunda:formRef' in properties) {
72425
+ } else if (has(properties, 'camunda:formRef')) {
72518
72426
  Object.assign(properties, {
72519
72427
  'camunda:formKey': undefined
72520
72428
  });
@@ -72526,23 +72434,23 @@
72526
72434
  });
72527
72435
  }
72528
72436
 
72529
- if (!('camunda:formRefBinding' in properties) && isUndefined(businessObject.get('camunda:formRefBinding'))) {
72437
+ if (!has(properties, 'camunda:formRefBinding') && isUndefined(businessObject.get('camunda:formRefBinding'))) {
72530
72438
  Object.assign(properties, {
72531
72439
  'camunda:formRefBinding': 'latest'
72532
72440
  });
72533
72441
  }
72534
72442
  }
72535
72443
 
72536
- if ('camunda:formRefBinding' in properties && properties[ 'camunda:formRefBinding' ] !== 'version') {
72444
+ if (has(properties, 'camunda:formRefBinding') && properties[ 'camunda:formRefBinding' ] !== 'version') {
72537
72445
  Object.assign(properties, {
72538
72446
  'camunda:formRefVersion': undefined
72539
72447
  });
72540
72448
  }
72541
72449
  }, true);
72450
+
72542
72451
  }
72543
72452
  }
72544
72453
 
72545
-
72546
72454
  UserTaskFormsBehavior.$inject = [ 'eventBus' ];
72547
72455
 
72548
72456
  /**
@@ -85367,7 +85275,7 @@
85367
85275
 
85368
85276
  var constraints = property.constraints || {};
85369
85277
 
85370
- if (constraints.notEmpty && isEmpty$3(value)) {
85278
+ if (constraints.notEmpty && isEmpty$2(value)) {
85371
85279
  return translate('Must not be empty');
85372
85280
  }
85373
85281
 
@@ -85444,7 +85352,7 @@
85444
85352
  return regexp.test(str);
85445
85353
  }
85446
85354
 
85447
- function isEmpty$3(str) {
85355
+ function isEmpty$2(str) {
85448
85356
  return !str || /^\s*$/.test(str);
85449
85357
  }
85450
85358