How to add custom elements to the control panel in camunda, the newly added controls and generate xml code, is it through plugin way or?
Since you’ve already found the example have a look at https://github.com/bpmn-io/bpmn-js-example-custom-elements/blob/master/app/custom/CustomPalette.js. This is where the palette is extended through
Thank you for your reply, I successfully added a new graph node on the palette according to the example, but the xml generated by dragging it in is
<bpmn:task>, the result I want is
<bpmn:CustomTask />, what should I do? ?
<bpmn:CustomTask /> is not a valid use case for an extension. You cannot add new elements to the BPMN namespace. The resulting XML wouldn’t be considered valid. You can, however, use the extension mechanisms that the BPMN spec offers:
<bpmn:task custom:foo="bar" />
<bpmn:task> <bpmn:extensionElements> <custom:Foo /> </bpmn:extensionElements> </bpmn:Task>
The example built using these extension mechanisms: https://github.com/bpmn-io/bpmn-js-examples/tree/master/custom-elements