Define a new XML element within bpmn-js-nyan

I have been working with bpmn-js-nyan to introduce a custom hexagonal shape (instead of the nyan cat). The visual representation works fine.
However, right now it’s type is ‘bpmn:ServiceTask’ and I want to introduce a new XML element named ‘ocbpmn:ObjectType’ for the hexagon shape. I then want to introduce some more elements with ocbpmn: prefix (to extend bpmn 2.0 with some shapes and rules for object-centric business process modeling).

How is it possible to define this new XML element within bpmn-js-nyan?

Thank you in advance for your help.

Best Regards,

P.S.: I already worked with bpmn-js-example-custom-shapes but since it did not get updated for over 4 years I shifted to working with this newer bpmn-js-nyan project.

@Jean-Christophe-S The custom shapes example remains to be the relevant source if you want to create elements that are not core to BPMN.

It is much simpler if you base your extension on actual BPMN elements, this is what bpmn-js-nyan does.

You could, for example, extend the BPMN model we’re using to support ocbpmn elements as sub-types of bpmn:Activity. I’m not aware what ocbpmn is and hence cannot really help you.

If you share a working project we’re happy to help you with more concrete advice.

Thank you for your reply. Is it possible to update bpmn-js-example-custom-shapes to the latest bpmn-js version? This would help me a lot. Because I also want to make use of the coloring edges function. By the way, when I spin up a single local modeler instance with the latest bpmn-js version, where is the coloring edges and shapes function that you can use on ?

Also, it looks to me like the nyan cat has taken over the bpmn:ServiceTask type and is not a sub-type of something.

I am currently creating my GitHub repository and feel free to share it once it exists. I’m just figuring out the best place to start for (bpmn-js/diagram-js/bpmn-moddle or bpmn-js-example-custom-shapes or bpmn-js-nyan) to first of all:

  1. Introduce new shapes (and their XML definition - but not essential)
  2. Coloring shapes and edges.
  3. (Maybe later) filter the diagram by those colors.

(ocbpmn is an extension of BPMN that is being developed in the course of my bachelor thesis. The aim is to move from activity-centric business process models to object-centric ones. The term Object-Centric Process Mining may be better known and is strongly related to it.)