bpmn-io / bpmn-js-differ

A diffing utility for BPMN 2.0 documents.
44 stars 16 forks source link

Diff method did not find changes on two completely different process definitions #7

Closed robpal94 closed 6 years ago

robpal94 commented 6 years ago

The diff Method returns the same results, when comparing two models, that are exactly the same and two completely different models with different collaborations.

Consider the following two process definitions: process1 process2

When calling the diff() method on both of these processes, I would not expect a result that looks like, both processes are the same (or that there are no changes). The current behavior makes it very hard to distinguish, if two compared processes are the same or if these are actually complete different processes.

nikku commented 6 years ago

Please provide a failing test case with what you'd expect the differ to output.

robpal94 commented 6 years ago

Basically it would be nice, if an exception is thrown to let the user of this library know, when two processes are not comparable. Like so:

https://github.com/robpal94/bpmn-js-differ/blob/master/test/spec/differ.js#L401

nikku commented 6 years ago

I don't quite agree with your notion of not comparable.

The diagrams are comparable:

Because of this I'd rather mark the collaboration as added / removed than throwing an exception.

nikku commented 6 years ago

Proposal: We talk about the collaboration being added or removed, visually speaking:

image

Works when diffing process with collaboration diagrams, too:

image

robpal94 commented 6 years ago

I also thought at this while I was on my way home. This would also be a good Idea, probably better then marking two diagrams as incomparable. Is such a feature currently implemented?