# 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?

**URL:** <https://forum.bpmn.io/t/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/7191>\
**Category:** Developers\
**Created:** [February 10, 2022, 9:01am UTC](https://forum.bpmn.io/t/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/7191 "2022-02-10T09:01:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chaomin\_Ruan](https://forum.bpmn.io/user_avatar/forum.bpmn.io/chaomin_ruan/32/3387_2.png) [@Chaomin\_Ruan](https://forum.bpmn.io/u/Chaomin_Ruan)\
**Post date:** [February 10, 2022, 9:01am UTC](https://forum.bpmn.io/t/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/7191/1 "2022-02-10T09:01:20Z")

</div>

![截取图片_20220209163419](https://forum.bpmn.io/uploads/default/original/2X/c/cff92f530a040a072c137b73ef46cb89fd435680.png)  
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?

---

<div class="post-metadata">

**Author:** ![philippfromme](https://forum.bpmn.io/user_avatar/forum.bpmn.io/philippfromme/32/2803_2.png) [@philippfromme](https://forum.bpmn.io/u/philippfromme)\
**Post date:** [February 10, 2022, 9:04am UTC](https://forum.bpmn.io/t/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/7191/2 "2022-02-10T09:04:03Z")

</div>

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](https://github.com/bpmn-io/bpmn-js-example-custom-elements/blob/master/app/custom/CustomPalette.js). This is where the palette is extended through `palette.registerProvider(this);`.

---

<div class="post-metadata">

**Author:** ![Chaomin\_Ruan](https://forum.bpmn.io/user_avatar/forum.bpmn.io/chaomin_ruan/32/3387_2.png) [@Chaomin\_Ruan](https://forum.bpmn.io/u/Chaomin_Ruan)\
**Post date:** [February 10, 2022, 11:22am UTC](https://forum.bpmn.io/t/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/7191/3 "2022-02-10T11:22:30Z")

</div>

Hi, philippfromme  
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? ?

---

<div class="post-metadata">

**Author:** ![philippfromme](https://forum.bpmn.io/user_avatar/forum.bpmn.io/philippfromme/32/2803_2.png) [@philippfromme](https://forum.bpmn.io/u/philippfromme)\
**Post date:** [February 15, 2022, 1:34pm UTC](https://forum.bpmn.io/t/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/7191/4 "2022-02-15T13:34:51Z")

</div>

`<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:

### Custom Attributes

```xml
<bpmn:task custom:foo="bar" />

```

### Extension Elements

```xml
<bpmn:task>
  <bpmn:extensionElements>
    <custom:Foo />
  </bpmn:extensionElements>
</bpmn:Task>

```

The example built using these extension mechanisms: [bpmn-js-examples/custom-elements at main · bpmn-io/bpmn-js-examples · GitHub](https://github.com/bpmn-io/bpmn-js-examples/tree/master/custom-elements)

---

<div class="post-metadata">

**Author:** ![nikku](https://forum.bpmn.io/user_avatar/forum.bpmn.io/nikku/32/5130_2.png) [@nikku](https://forum.bpmn.io/u/nikku)\
**Post date:** [July 22, 2025, 3:42pm UTC](https://forum.bpmn.io/t/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/7191/5 "2025-07-22T15:42:02Z")

</div>

Closed on July 22, 2025, 3:42pm UTC


