Please assist with element filtering

Greetings camunders,

I’m trying to filter all elements based on a type.

      let elementRegistry = viewer.get('elementRegistry');
      console.log('elRegistry:' ,elementRegistry);
      let els = elementRegistry.getAll();

      let elements = elementRegistry.filter(function (element) {
        return is(element, 'bpmn:CallActivity');

But keep getting “Uncaught ReferenceError: is is not defined”!
bpmn-viewer.development.js seems to have this method. This is my being stupid but i can not figure this out.

Please assist thank you so much in advance!

never mind guys forgot to import is from ModelUtil.js

1 Like