We are using Auto layout to view the BPMN xml on diagram canvas, but getting error in a function, where it requires “di” for source and target elements to connect elements with a sequence flow. In most of the cases, the target element misses di bounds, due to which flow is not rendered correctly.
Tried removing the node with missing di bounds, then the flow works.
Can someone please tell what could be the possible reasons of missing di bounds and missing grid position from a BPMN element in case of auto-layout? Also, is there any other method to get default di bounds or grid position?
Code which gives error:
const sourceDi = source.di;
const targetDi = target.di;
const sourceBounds = sourceDi.get("bounds");
const targetBounds = targetDi.get("bounds");
And the error: