I would like to know what would be in your opinion the easiest/more efficient way to create a visual tool to compare BPMN 2.0 processes using JBPM web designer?
...way to create a visual tool to compare
BPMN 2.0
processes usingJBPM
web designer?
I don't know how I'd implement it, neither what can JBPM
designer do neither if it's already solved in an existing tool so I can't pick some easiest or efficient solution.
But based on the fact that BPMN
models are actually XML
files and XML
files are actually text
files, I would try to reduce the problem to the text diff visualization.
From the 2 XML
s (old, new) create new "diff" XML
using some existing text-oriented diff algorithm where the "added" things would be marked as green "removed" marked as red and "modified" marked as blue. If the resulting "diff" XML
would be properly formatted BPMN
file then just showing it in a BPMN
viewer would show the differences visually.
I don't keep track of the text diff or binary diff problem for quite long time, but besides consulting Wikipedia: DIFF topic, some proven sources I'm aware of are:
C++
and C
- sourceforge.net/p/winmerge/code/HEAD/tree/trunk/Src/diffutils/srcDelphi
. The application is build around TDiff
component which is (according to the readme) based on papers "An O(ND) Difference Algorithm and its Variations" by E Myers - Algorithmica Vol. 1 No. 2, 1986, pp. 251-266 and "An O(NP) Sequence Comparison Algorithm" by Sun Wu, Udi Manber & Gene Myers. Both papers in PDF
and their source code incarnation are included in the downloadable zip
All of the above contains some "Computer Science" stuff, which was for me difficult to comprehend, but the corresponding code simply does work. For instance while studying the Angus Johnson's tool (I was adding support for comparing complete folders not only files) there were some notes in the comments and readmes claiming that
→ comparing text files is special case of comparing vectors of strings which is special case of comparing vectors of numbers (string hashes) which is some straighforward(?) N-dimensional math problem(!?)
I'm selling what I've bought few years ago, understanding it and using it is up to you, but I believe it might be useful ;)