I am trying to integrate the BPMN-VIEWER described in [1] into a custom html page, but am unable to get it to work. The part of the page occupied by “<div cam-widget-bpmn-viewer … ><div>” does not change dynamically to display the BPMN. No errors are reported either (nothing in the Javascript console), so I am unable to figure out what is wrong.
I have verified that the JSON object containing the BPMN XML, as described in [2], is indeed being assigned to the field “diagramXML” of the scope. But do not know what else I should or can check.
How can I debug this problem? Thanks for any help or hints.
The BPMN-VIEWER is embedded in a larger HTML page that has other
(non-camunda) angular artifacts on it, and those parts of the functionality
(based on angular, but not dependent on any camunda API) do seem to be
working correctly.
There are no javascript error messages at all in the console (I use
chrome), so that leaves me with no leads to the solution.
I see that a lot of other users on the forum are “power users” that dig
into the API (and even leverage it to obtain other great effects).
Unfortunately, my role (and time budget) in this effort does not permit
that sort of exploration, and It would help if there were any error
messages produced.
Another thing that might help is a minimal HTML page example that embeds
the viewer, and has facilities to display the BPMN data. I have not found
any documentation about the format in which the BPMN data must be supplied
(as XML or a field of a JSON object?). I have tried both variants, and the
API seems to be happy (no error messages) with both - but in both cases
there is no visual output either.
did you include the camunda commons module as a dependency for your angular module? It should look something like
var myModule = angular.module('myModule', ['cam.commons']);
If you do not include the module, the browser treats the cam-widget-bpmn-viewer attribute like any other attribute on an html element it does not know about and just ignores it.
Unfortunately, I am unable to use the information you provided. Adding the
dependency produces the following error:
Error: [$injector:modulerr] Failed to instantiate module cam.commons due to:
Error: [$injector:nomod] Module ‘cam.commons’ is not available! You either
misspelled the module name or forgot to load it. If registering a module
ensure that you specify the dependencies as the second argument.
I do have the following line (in a different HTML file) being loaded before
the line (in a .js file) that defines the application (where I added the
dependency information you provided).