Remove entries from template group in properties panel

Hi there,

I am trying to remove some entries from the properties panel template section, but, for some reason, the getGroups function is not showing the template group although the group is shown in the properties panel.

image
image

This is my CustomPropertiesProvider.js

import { is } from 'bpmn-js/lib/util/ModelUtil';
const LOW_PRIORITY = 500;

function CustomPropertiesProvider(propertiesPanel) {

  this.getGroups = function (element) {

    return function (groups) {
      console.log(groups);
      if (is(element, 'bpmn:ServiceTask')) {
        groups.forEach(group => {
          if (group.id === 'template') {
            group.entries = group.entries.filter(entry => entry.id !== 'name' && entry.id !== 'description');
          }
        })
        //groups.push({ id: 'Id', label: 'Label' });
      };

      return groups;
    }
  };

  // registration 
  propertiesPanel.registerProvider(LOW_PRIORITY, this);
}

CustomPropertiesProvider.$inject = ['propertiesPanel'];

export default {
  __init__: ['customPropertiesProvider'],
  customPropertiesProvider: ['type', CustomPropertiesProvider]
};

Why is the template group not shown? I need to remove the entries ‘Name’ and ‘Description’ from the template group.

Thank you in advance

Think I found the solution by myself. I changed the LOW_PRIORITY to 100 and now the template group is shown.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.