# Custom element, what is the best approach?

**URL:** <https://forum.bpmn.io/t/custom-element-what-is-the-best-approach/2193>\
**Category:** Modeler\
**Created:** [April 4, 2018, 1:19pm UTC](https://forum.bpmn.io/t/custom-element-what-is-the-best-approach/2193 "2018-04-04T13:19:06Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![gcalvo](https://forum.bpmn.io/letter_avatar_proxy/v4/letter/g/c4cdca/32.png) [@gcalvo](https://forum.bpmn.io/u/gcalvo)\
**Post date:** [April 4, 2018, 1:19pm UTC](https://forum.bpmn.io/t/custom-element-what-is-the-best-approach/2193/1 "2018-04-04T13:19:06Z")

</div>

I’m making a simplified version of the modeler for a particular project that need very little functionality. In order to simplify modelling for the users I wanna be able to create normal parallel gateways and also parallel gateways with the exclusive gateway graphics.

I have a custom palette and a custom json model working fine and I will perform some logic depending on the type of gateway using execution delegates. But I don’t know how to change the graphics of the second type of gateways.

Should I create a custom element or is it enough to change the graphics in the createAction functions invoked in the palette? This models should run in camunda later.

Thanks in advance,  
Gonzalo

---

<div class="post-metadata">

**Author:** ![FaHinse](https://forum.bpmn.io/user_avatar/forum.bpmn.io/fahinse/32/702_2.png) [@FaHinse](https://forum.bpmn.io/u/FaHinse)\
**Post date:** [April 4, 2018, 2:05pm UTC](https://forum.bpmn.io/t/custom-element-what-is-the-best-approach/2193/2 "2018-04-04T14:05:42Z")

</div>

hi @gcalvo,

do I understand you correctly:

You want to create subset of available bpmn elements with 2 elements, the parallel gateway and another gateway with the behaviour of the parallel and the look of the exclusive gateway?

---

<div class="post-metadata">

**Author:** ![gcalvo](https://forum.bpmn.io/letter_avatar_proxy/v4/letter/g/c4cdca/32.png) [@gcalvo](https://forum.bpmn.io/u/gcalvo)\
**Post date:** [April 4, 2018, 4:51pm UTC](https://forum.bpmn.io/t/custom-element-what-is-the-best-approach/2193/3 "2018-04-04T16:51:05Z")

</div>

Yes, that is exactly what I want.

As far as I understand I can define custom elements or simply add properties to existing elements by declaring them in a json model. This is how my especial paralllel gateway looks like:

```auto
{
  "name": "SpecialParallelGateway",
  "extends": [
    "bpmn:ParallelGateway"
  ],
  "properties": [
    {
	"name": "operation",
	"type": "String",
	"isAttr": true
    }
  ]
}

```

And in the Custom Palette I fill the operation field with the code of the operation it has to be performed by the execution listener.

---

<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:** [April 5, 2018, 6:41am UTC](https://forum.bpmn.io/t/custom-element-what-is-the-best-approach/2193/4 "2018-04-05T06:41:16Z")

</div>

You need to change the [renderer](https://github.com/bpmn-io/bpmn-js/blob/master/lib/draw/BpmnRenderer.js) if you want certain elements to be rendered in a specific way. Have you tried this yet?

---

<div class="post-metadata">

**Author:** ![gcalvo](https://forum.bpmn.io/letter_avatar_proxy/v4/letter/g/c4cdca/32.png) [@gcalvo](https://forum.bpmn.io/u/gcalvo)\
**Post date:** [April 5, 2018, 10:16am UTC](https://forum.bpmn.io/t/custom-element-what-is-the-best-approach/2193/5 "2018-04-05T10:16:09Z")

</div>

Can I change the renderer by adding a CustomRenderer module like in [this example](https://github.com/bpmn-io/bpmn-js-examples/blob/master/custom-elements/app/custom-modeler/custom/CustomRenderer.js)?

If I define a custom element will it be processed in camunda like a parallel gateway?

Do I have to create CustomFactoryElement, CustomRules and all the others as well?

---

<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:13pm UTC](https://forum.bpmn.io/t/custom-element-what-is-the-best-approach/2193/6 "2025-07-22T15:13:30Z")

</div>

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


