As you can imagine reading the title of this topic, I managed to create some custom elements and added them them to modeler. I’m now wondering why they are not appearing in the *.bpmn file.
I created a custom meta-model specifically for my custom elements - here is the code:
Am I forced to use an external file as specified in the second quoted topic at the very top of this message? Or is it possible to allow custom elements to be saved in the conventional *.bpmn files?
I just feel like the BPMN file given as an examples in the meta-model example act like a task contains the custom elements. Will it work if my custom elements act like separate elements (at the same level as a task)?
It is incredible hard to follow what you did and where you got stuck based on the partial code snippets you provide. In order for me or anyone else to help you (and in order for you to get along better), create a reproducible test case that captures your current implementation. Share it with us and we may be able to help you.
There is at least two ways to create such a test case / prototype:
Amend an existing starter project, hack in the relevant changes and share the result with us.
Create a new library or amend an existing example and add failing test cases that demonstrate the issues you’re experiencing.
I have my work stored in a Github repository, you can find it here, my latest changes concerning the custom element saving are in the feature-objets branch and more precisely in this file.
The process that leads to my issue is the following:
Create a new BPMN diagram
Add a new custom element to the diagram - It’s called risk it is a triangle in the palette
Trying to save the diagram as a BPMN file or trying take a look at its content in the XML tab and the message I show early should appear in the console
Also, as you can see in the package.json file in the camunda-modeler/client project, my library is locally referenced.