I’m trying to create a custom SVG image for CustomTask of type ServiceTask. I referred these( ref1, ref2 ref3) articles to create the custom SVG.
When it executes, I’m getting Error: Cannot resolve circular dependency! (Resolving: bpmnRenderer -> pathMap -> pathMap).
// CustomPathMap
import BpmnRenderer from 'bpmn-js/lib/draw/BpmnRenderer';
export class CustomPathMap extends BpmnRenderer {
static $inject = ['config.bpmnRenderer', 'eventBus', 'styles', 'pathMap'];
constructor(config: any, eventBus: any, styles: any, pathMap: any) {
super(config, eventBus, styles, pathMap, 1200);
}
drawShape(visuals, element) {
if (is(element, "bpmn:ServiceTask")) {
// return this.drawCustomTask(visuals, element);
// todo
}
}
}
// modeler instance.
this.modeler = new RtBpmnModeler({
container: '#js-canvas',
keyboard: { bindTo: document },
propertiesPanel: { parent: '#js-properties-panel' },
additionalModules: [
PropertiesPanelModule,
PropertiesProviderModule,
{ __init__: 'pathMap', pathMap: ['type', CustomPathMap] }, // tried this => { [BPMN.InjectionNames.pathMap]: ['type', CustomPathMap] },
]
});
Screenshot
Any lights on this issue.