Injecting pre-defined bpmn:message

EDITED:
I would like to inject a few hard-coded “bpmn:message” such that they will appear as default drop-down options for bpmn:MessageEventDefinition in the General->Details->Message on the properties panel.

Can you give me some hints how to do this? Thanks in advance.

Hi @suwekonghilaw,

You will have to update the MessageEventDefinition implementation to prefill the dropdown selection per default.

You could also have a look on how to work with element templates.

Thanks, I just came across element templates and it does a big chunk of my requirements!

A few questions:

  1. Is there any way to force apply an element template programatically such that we don’t need to explicitly select from the drop down? Using “isDefault” is probably a way to do it, but I couldn’t figure out how to hide “elementTemplate-chooser”: false" even after adding it to entriesVisible.
  2. Is there a way to fine-tune “appliesTo” such that, for example, they work with typed event like “bpmn:MessageEventDefinition”?

Thanks in advance.