bpmn-io / bpmn-js-differ

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

SequenceFlow type change is not recognized #13

Open kollerdroid opened 2 years ago

kollerdroid commented 2 years ago

SequenceFlow element type toggling (eg.: Sequence flow -> Default flow) is not recognized as a change. Label change works fine.

_changed property of diff function result should contain something similar:

_changed : {
  Gateway_id: {
     attrs: {
        default: {
          oldValue: undefined,
          newValue: 'Flow_id' 
        }
     }
  }
}

Object model contains this default attribute:

modeler._definitions.rootElements[0].flowElements.find(f => f.id == 'Gateway_id').default

ModdleElement {id: 'Flow_id', name: 'default', $parent: ModdleElement, …}
    $type: "bpmn:SequenceFlow"
    id: "Flow_id"
    name: "default"
    $attrs: (...)
   // ...

Library version: 2.0.2

nikku commented 2 years ago

Thanks for opening this issue. I can reproduce this. Moving to backlog.