Load 2 bpmn files and show diff

I need to be able to load 2 different bpmn files, then show the difference between them in a single modeller (not side by side). I know I can use the bpmn-js-differ example to generate “an object with the _changed, _added, _removed,” which is great.
How can I add together the 2 models to show them in a single viewer, assuming they will have some events and flows in common and others will be different?

Have you tried BPMN model diffing | demo.bpmn.io ?

Yes. I don’t want to show them side-by-side, but in a single viewer, added together, using colors to show which are in A, B and in both.

In that case, you will probably need to build it yourself. AFAIK there is no such project.

My question is, if I have the two lists of events and flows (A and B) can I programatically add them to a new model that will have A+B?

Is the source code of the model diffing example available?

You can do that. Check out this example: bpmn-js-examples/modeling-api at master · bpmn-io/bpmn-js-examples · GitHub

The closest one is GitHub - bpmn-io/bpmn-js-diffing: Visual diffs for BPMN 2.0 diagrams

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.