My question is can we somehow use a BPMN diagram itself as a custom element?
In my case i have to open a new bpmn diag when I click on some particular task. I need to render a new bpmn diag below it using a different xml.
Does anyone have any pointers/suggestions for the above problem?
I think the best here would be to use different Modeler instances. When clicking on one element, render a fresh new diagram inside a new bpmn-js Modeler instance. Wouldn’t that work for you?
By the way, we are currently investigating improved support for collapsed sub-processes: Handle collapsed sub-processes · Issue #1443 · bpmn-io/bpmn-js · GitHub.
That will make navigation across different diagram parts via sub-processes much easier. Maybe something that would solve your issue as well?