I was looking at bpmn-moddle to find where the type Element is defined since it is used, for example, in the values of the extension elements, and I had to extend it in my BPMN extension (token-bpmn-moddle) to put my elements into the extension elements.
I saw that in the BPMN specification, the values of extension elements have the type xsd:any (p62). Is the type Element that exists by default moddle’s way to implement any ?
Thanks in advance for the clarification. I consider extending the moddle documentation with a pull-request if I understand this correctly.
If you have added your moddle extension to the viewer instance, you’ll also have access to the defined properties and attributes in the extension element list.
My use case works fine. I am just wondering where the type Element is defined in moddle. It seems to be in any moddle .json file without being explicitly defined.
It seems necessary to implement extension elements even though, as you said, any XML is valid inside the extension elements. For example, in camunda-bpmn-moddle, it is also used for defining possible extension elements. See the example for the Execution listener below: