Allow Connection Between two DataObjectReference

In our company requirement force us to use association between two DataObjectReference. I have implemented a custom rule for '‘connection.create’ event as following :

if (isAny(source, [‘bpmn:DataObjectReference’, ‘bpmn:DataStoreReference’]) &&

    isAny(target, ['bpmn:DataObjectReference', 'bpmn:DataStoreReference', 'bpmn:Gateway'])) {

    return { type: 'bpmn:SequenceFlow' };


it works and i am able to connect two DataObjectReference but when i attempt to drag one of DataObjectReference objects around the connection disappears. what am i doing wrong? please help me.

For further assistance, please share a CodeSandbox that reproduces your issue in a way that we can inspect it.

I’ve setup react dev workflow in my machine using webpack. is there react based CodeSnadbox bilorplate?

As far as I know: no there is no boilerplate for it.

Your solution should be independent from any JS library, so maybe it’s not necessary to share the react bits but only your custom rules in a simple bpmn-js Application.