How to best integrate with breadcrumb navigation?

I have a lot of nested processes in my diagrams. To enable deep linking, I add the current root element ID as a search parameter, for example /processes/abc?subprocess=cba. I also add the root element ID to the history.

For most navigation scenarios, I have implemented code to correctly set these values, but when I navigate using the breadcrumbs, this sometimes breaks. I have attempted several approaches to fix this, but the code is becoming quite complicated, and I was unable to find a solution that passes all of my test cases.

Is there a straightforward way to integrate/override the breadcrumb navigation to correctly set the root element ID in the URL and in the history state?

I found the code in bpmn-js/lib/features/drilldown/DrilldownBreadcrumbs.js:73 which tells me that there is no way to directly override the navigation.

In the end I found a solution to my problem by handling the state management and search parameter changes on navigation. For this I had to hook into root.set and beforeNavigate (I use SvelteKit). There is a lot more detail to the solution that I cannot share at this point.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.