Trouble in hiding a DataObject

Hi,

We are using bpmn.io to allow our users to create/edit their workflow via a bpmn. We would like to hide an existing DataObject because we are using them to store some infos which our users would not need in order to use our app and edit their workflow and we would like to avoid them any confusion about what it is and also prevent them from editing it.

I have found some elements suggesting that it is not possible de get a DataObject through the elementRegistry.getAll(). I have not managed to get the DataObjectReference either.
The best I’ve managed is to get the DOM elements corresponding to the DataObject and its label and apply a “display: none” to them. But, I think it’s kind of a dirty trick and I would like to know if there is a cleaner way to achieve that with bpmn.io.

Thank you.

Hey,

Could you try to demonstrate what you are trying to achieve with a CodeSandbox please? https://codesandbox.io/s/bpmn-js-sandbox-3zkw0

The interesting question is why you’re not able to get data object references via element registry? It’s possible for me, cf. this sandbox: https://codesandbox.io/s/data-objects-9v6jj?file=/src/index.js

Maybe you can share your setup as @oguzeroglu mentioned

Btw. getting the DOM element for a bpmn element and setting it invisible or display:none isn’t that dirty as you might expect, since it’s the easiest way of doing so.

There is the ElementRegistry#getGraphics method to easily get the dom element.