Error: No provider for "bpmnFactory"!


#1

Hello Bpmn.io,

I have implemented a complex modeler with properties-panel, custom renderer, custom elements and so one … and it works fine as Modeler.

When I start the viewer, I receive following error message.

image

The modeler runs with a lot of modules, but the viewer does not need or should not need all of these modules. I found 1 file which contains “bpmnFactory”. It is my CustomElementFactory.js which is part of my CustomRenderer. The CustomRenderer is necessary to show my customElements in the viewer.
I used the CustomElement (https://github.com/bpmn-io/bpmn-js-examples/tree/master/custom-elements) example as guidance.

Do you have any idea how to solve this issue?

Thanks in advance,
Anja


#2

Hi @Anja
its true that the Viewer does not include the bpmnFactory module per default. So you have to use the modeler instead or including the module separately into the viewer. See this post or also this for more information.

It is always a good idea to provide some more input via code examples or test cases so we can help you in detail.


#3

Hi Niklas,

thank you very much for your reply.
I move my CustomElementFactory.js into another module and it worked again.

Best Regards,
Anja


#4