How do I insert custom camunda:topic into my bpmn-moddle data?

My team is building it’s own modeler based on the bpmn-js library. I’m still pretty new to it and I’m stuck on how to extending bpmn-moddle object.

Basically we have a serviceTask and I need to include a camunda:topic into my task so that it is included in the XML. So in the end it looks something like this: <bpmn:serviceTask id=“Activity_18390pz” name=“ServiceTask-0001” camunda:topic=“SendNotification”>

Hopefully this makes sense, but I’ve not been able to find the answer I need in any of the example files.

Also is there a good resource or tutorial that people can point me to on how to work with this library.

Thanks so much in advance.

Check out GitHub - camunda/camunda-bpmn-moddle: Camunda moddle extensions for BPMN 2.0 project for Camunda moddle extensions. You may also want to use GitHub - camunda/camunda-bpmn-js: Embeddable Camunda modeling distributions based on bpmn-js which is a Camunda-specific distribution of bpmn-js which includes also the properties panel to edit properties invisible on the diagram.

Thanks but this didn’t really help very much. I’ve actually looked at both of these projects prior to asking any questions in the forum. What I’m looking for is how to add camunda:topic using just pure javascript code. Sorry if this seems like a dumb question – i’m really new to Camunda and BPMN) Is there anything like a tutorial perhaps where it will explain to me how I might interact with the moddle in javascript.

What I’m trying to do is add this attribute to the businessObject (i think that’s what it is called) so that it gets added to the XML when I convert the moddle object.

Thanks again in advance,

Floyd

Hi @showcasefloyd,

I’ve build an example a long time ago how to create preconfigured elements in BPMN.io: GitHub - ingorichtsmeier/camunda-modeler-plugin-connected-elements: Example of a modeller plugin to add some connected elements by dragging them as a single symbol from the palette..

The external service task not included, but it should be easy to add it.

Hope this help, Ingo

Please share a running / prototypical example that clearly shows what you’re trying to achieve, what is working and what is not.

Use our existing starter projects to quickly hack it or share your existing, partial solution on GitHub or via a CodeSandbox. Provide the necessary pointers that allow us to quickly understand where you got stuck.

This way we may be able to help you in a constructive manner.

Thanks :heart:

Thanks I’ll take a look, did you even come across anything like a tutorial I could follow or read through. That might be helpful.

Hi @showcasefloyd,

my journey started here: GitHub - ingorichtsmeier/camunda-modeler-plugin-connected-elements: Example of a modeller plugin to add some connected elements by dragging them as a single symbol from the palette.

Hope this helps, Ingo