How to access the signals list from a custom palette?

I have found a solution, but I am not sure this is the best approach, can you please tell me?

Thanks to Access to ElementRegistry from CustomContextPadProvider I use the dependency injection to load the canvas from the custom palette.

CustomPalette.$inject = [
  'bpmnFactory',
  'create',
  'elementFactory',
  'palette',
  'translate',
  'canvas'
];

Palette constructor:

export default class CustomPalette {
  constructor(bpmnFactory, create, elementFactory, palette, translate, canvas) {

And finally:

        var definitions = canvas.getRootElement().businessObject.$parent;
        var signalsList = definitions.rootElements.filter(function(element) {
              return element.$type === 'bpmn:Signal';
        });

Best rgrds