So: After the instantiation of the modeller BpmnJSModeler( ... ), i’d like to add more elementTemplates to the existing ones. Rather than having to reload the whole bpmnJSModeler instance.
I’d love to find a way to achieve this! But so far I found nothing in the docs or in any related example…
Maybe there is a way or someone tried something in those directions or can point me towards some meaningful doc entries
Any help is greatly appriciated!
What did you already tried to achieve what you want? Can you give maybe some more details about what you want to achieve at all? Sharing your code in a CodeSandbox would be very appreciated.
Wow that’s already amazing!
I think I got it kinda working so far. (Deep down some customization stuff, so sadly not an easy Sandbox / MWE … )
Working means: the eventbuselementTemplates.changed gets triggered correctly … anyhow, I’m using the bpmn-js-properties-panel for some sort of dealing with the templates, but here the update doesn’t seem to show up. Is there a way for me to “force” the properties-panel to reload the templates as well?
Thanks so far!
I got it working, while trying to build a CodeSandbox to further explain my issue…
For anyone finding this: Here is my dumb Sandbox.
My main error / misconception was that I mustn’t use the elementTemplateLoader.reload() function after setting the templates with elementTemplateLoader.setTempalte(templates) function.
Again: Thanks so much for pointing me to the API! That was the info I needed!