camunda / camunda-modeler

An integrated modeling solution for BPMN, DMN and Forms based on bpmn.io.
https://camunda.com/products/modeler
MIT License
1.49k stars 477 forks source link

Plugin example #2009

Closed Flubberwurm13 closed 3 years ago

Flubberwurm13 commented 3 years ago

Describe the Bug

[diagram_1.bpmn] Cannot read property 'traits' of undefined at traits (webpack:///node_modules/bpmn-moddle/node_modules/moddle/dist/index.esm.js:470:31) at iterator (webpack:///node_modules/min-dash/dist/index.esm.js:145:15) at type (webpack:///node_modules/bpmn-moddle/node_modules/moddle/dist/index.esm.js:467:10) at registerType (webpack:///node_modules/bpmn-moddle/node_modules/moddle/dist/index.esm.js:416:9) at iterator (webpack:///node_modules/min-dash/dist/index.esm.js:145:15) at pkg (webpack:///node_modules/bpmn-moddle/node_modules/moddle/dist/index.esm.js:415:10) at iterator (webpack:///node_modules/min-dash/dist/index.esm.js:145:15) at packages (webpack:///node_modules/bpmn-moddle/node_modules/moddle/dist/index.esm.js:391:10) at de.g (webpack:///node_modules/bpmn-moddle/node_modules/moddle/dist/index.esm.js:715:18) at call (webpack:///node_modules/bpmn-moddle/dist/index.esm.js:15:9) [ error ]

Steps to Reproduce

  1. run this example: https://github.com/camunda/camunda-modeler-plugins/tree/master/bpmn-js-plugin-moddle-extension-example
  2. add example in to the plugins folder
  3. Start camunda modeler
  4. New BPMN diagram

Environment

nikku commented 3 years ago

Which example should we run?

Flubberwurm13 commented 3 years ago

Soory. Just forgot to add: https://github.com/camunda/camunda-modeler-plugins/tree/master/bpmn-js-plugin-moddle-extension-example

nikku commented 3 years ago

I can run the example without any issue on Camunda Modeler v4.4.0 given the steps to reproduce you provided.

capture kVVBvC_optimized

nikku commented 3 years ago

It also validates correctly if a diagram with a wrong extension usage comes around the corner:

image

Flubberwurm13 commented 3 years ago

I changed the qa.json to this:

BA-Erweiterung.zip

nikku commented 3 years ago

You understand that it is a waste of my time to open an issue like this, without pointing to your changes to lead to this bug?

To fix your issue, revise your extension, start small and see at which point it breaks.