A PropertiesProvider defines how custom properties are organized into tabs, groups, and input elements. You register it using propertiesPanel.registerProvider(priority, provider).
To ensure your custom properties appear alongside standard BPMN properties, use a lower priority. Use the getGroups method to inject your custom groups into the panel based on the selected element.
function MagicPropertiesProvider(propertiesPanel, translate) {
// Register with a lower priority to load after basic BPMN properties
propertiesPanel.registerProvider(LOW_PRIORITY, this);
this.getGroups = function(element) {
return function(groups) {
// Only show the 'magic' group if a Start Event is selected
if(is(element, 'bpmn:StartEvent')) {
groups.push(createMagicGroup(element, translate));
}
return groups;
}
};
}
function MagicPropertiesProvider(propertiesPanel, translate) {
// Register our custom magic properties provider.
// Use a lower priority to ensure it is loaded after the basic BPMN properties.
propertiesPanel.registerProvider(LOW_PRIORITY, this);
...
this.getGroups = function(element) {
...
return function(groups) {
// Add the "magic" group
if(is(element, 'bpmn:StartEvent')) {
groups.push(createMagicGroup(element, translate));
}
return groups;
}
};
}