Please assist with element filtering


#1

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();
      console.log('els',els);

      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!


#2

never mind guys forgot to import is from ModelUtil.js