Creating new element types

Hello,

as a follow-up to this question, I am able to create new elements in the palette (with my own icons) but they are linked to “bpmn:…” types. That means that when I drag them on the canvas they will appear but those icons will overwrite existing BPMN types (like the Nyan icon overwrites the service task).

What I want is to create my own types, so when I call the function on the palette (like the exampe does with the startCreate(event) function), I will assign my own type there. This way I can preserve the default BPMN elements.

I went through the custom-elements example, but it wasn’t much of a use to me since I am not interested in drawing the new shapes. This question makes me believe that it is feasible to do so, but I can’t figure out how.

Can you tell me where to define my new types? I’ve already tried to adjust .js files where the "bpmn:…’ types appear, like the BpmnRenderer, the ElementFactory etc. but I’m still not able to drag it to the canvas when I assign that type to the new element in the palette.

I would really appreciate your help!!
Thank you in advance

What do you mean by ‘new elements’? The custom elements example is all about new elements. It also shows you how to add support for them to the modeler.