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.