2

We use Alfesco activiti diagrams in a Java environment. These diagrams are versionned ; we use indeed GIT.

Often we have merge conflits merging branches. This is really painfull to resolve, because we must compare the text content of the file to check differences. Sometimes it is less painful to re-apply a change than to merge.

Are there best practices to merge such diagrams? Maybe tools to help?

Rolintocour
  • 2,934
  • 4
  • 32
  • 63
  • In theory, you could write a custom merge strategy for handling the format. Maybe there is one out there already. – jub0bs Jul 05 '17 at 14:14
  • Activiti is a XML format, GIT can merge it. The problem is that, when it shows you the conflicts, you only see XML nodes whereas you are not supposed to manipulate the source code, only edit edit graphically (with Eclipse). My wish is eg. to see the graphical differences between 2 activiti diagrams. – Rolintocour Jul 05 '17 at 18:17
  • Merging XML documents is not fun at all. What I usually try to do is to keep diagrams as small as possible and use "call activity" to refactor areas that are more likely do change – Philippe Sevestre Jul 05 '17 at 19:04

2 Answers2

0

The better way I found to view the differences between commited diagrams, with the Eclipse activiti plugin, is to: - automatically save the diagram as an image on saving - commit this image - to handle conflicts, view the differences with P4Merge which can show the differences between 2 images

Rolintocour
  • 2,934
  • 4
  • 32
  • 63
0

In theory you have different options to compare process model diagrams in BPMN format:

  • compare the two BPMN files - which contains plain xml - with any of the existing text comparison tools or IDEs hat you may use in your daily work with your sourcecode.
  • do a manual graphical comparison by open the models using one of the existing modelling tools (e.g. jbpm, camunda, kogito etc.).
  • or by generating images and compare these.
  • use one of the tools that provides a visual diff like bpmn-js-differ or BPMNDiffViz.

Nevertheless to my knowledge, there is no tool yet which really automate the merge of BPMN XML-files.

To come around this issue keep working not in parallel or simplify the merging by building the process models not in xml but as (java) source code as supported e.g. with jbpm and camunda.

Check also this question duplicate: Merging two versions of bpmn (xml) files

Oliver
  • 332
  • 1
  • 11
  • If you are interested in creating process model via java source code you can checkout: https://github.com/Arvato-Systems/kie4developer With this lib it's possible to create process models and deploy them on a jbpm engine. For more details see the wiki of the repo. – Oliver Jun 25 '21 at 11:18
  • Camunda provides 2 ways to create BPMN diagrams programmatically. 1. https://docs.camunda.org/manual/7.15/user-guide/model-api/bpmn-model-api/create-a-model/ This is the standard way 2. https://docs.camunda.org/manual/7.15/user-guide/model-api/bpmn-model-api/fluent-builder-api/ This is used for simpler diagrams that don't need complex bpmn elements as it is still work in progress and doesn't support all BPMN elements – Rajshree Rai Jul 01 '21 at 11:25