How to add custom elements to the BPMN XML?

I am using custom elements example to customize my BMPM IO. Unfortunately, the custom-elements project does not have the download BPMN XML file functionality as they have in bpmn-modeler example. I have adopted the same functionality from Modeler example from bpmn js examples. I am able to download the bpmn file but not with custom elements in it. Can someone suggest any work around to get those custom elements in the bpmn XML file as well ?

Hi,

since custom elements are not part of the BPMN standard they’re not supposed to be in the XML of a process. In the example project you can export them by using customModeler.getCustomElements().

Can you please be more specific. My modeler has already the code to get custom elements i.e., customModeler.getCustomElements()