camunda / camunda-modeler-plugins

Plugins for the Camunda Modeler.
167 stars 67 forks source link

Fix compatibility with Modeler v4.6 #35

Closed rob2universe closed 3 years ago

rob2universe commented 3 years ago

Still working on 4.5, on 4.6:

Cannot read property '$type' of undefined at TransactionBoundaries../node_modules/camunda-transaction-boundaries/lib/TransactionBoundaries.js.TransactionBoundaries._getTransactionBoundaries (webpack:///node_modules/camunda-transaction-boundaries/lib/TransactionBoundaries.js:67:0) at file:///C:/Users/Rob/AppData/Roaming/camunda-modeler/resources/plugins/camunda-transaction-boundaries-plugin/client/client-bundle.js:387:38 at file:///C:/tools/camunda-modeler/resources/app.asar/public/2.2.js:1:14123 at Array.forEach () at forEach (webpack:///node_modules/diagram-js/lib/core/ElementRegistry.js:181:19) at TransactionBoundaries../node_modules/camunda-transaction-boundaries/lib/TransactionBoundaries.js.TransactionBoundaries._getTransactionBoundaryElements (webpack:///node_modules/camunda-transaction-boundaries/lib/TransactionBoundaries.js:105:0) at TransactionBoundaries../node_modules/camunda-transaction-boundaries/lib/TransactionBoundaries.js.TransactionBoundaries.show (webpack:///node_modules/camunda-transaction-boundaries/lib/TransactionBoundaries.js:204:0) at TransactionBoundaries../node_modules/camunda-transaction-boundaries/lib/TransactionBoundaries.js.TransactionBoundaries.toggle (webpack:///node_modules/camunda-transaction-boundaries/lib/TransactionBoundaries.js:280:0) at Object.toggleTransactionBoundaries (webpack:///client/module.js:9:0) at opts (webpack:///node_modules/diagram-js/lib/features/editor-actions/EditorActions.js:170:31) [ error ] This error may be the result of a plug-in compatibility issue. [ info ] Disable plug-ins (restarts the app) [ info ]

pinussilvestrus commented 3 years ago

Seems like we had a change that eventDefinitions are not undefined per default, but an empty array for some elements.

I'll have a look.

pinussilvestrus commented 3 years ago

Related sentry issue: https://sentry.io/organizations/camunda-modeling/issues/2219558353/?project=5223041&query=is%3Aunresolved

pinussilvestrus commented 3 years ago

This will be fixed by https://github.com/bpmn-io/camunda-transaction-boundaries/pull/12 (if merged + released + integrated). We should ensure the plugins is able to deal with those cases.

Furthermore, I pushed a fix to @bpmn-io/extract-process-variables (https://github.com/bpmn-io/extract-process-variables/pull/12) to ensure we do not accidentally override properties.