bpmn-js-differ
A diffing utility for BPMN 2.0 documents. To be used together with bpmn-moddle.
Usage
Get the project via npm:
npm install --save bpmn-js-differ
Use the differ to compare two BPMN 2.0 documents:
; var oldDefinitions newDefinitions; // read with bpmn-moddle var changes = ;
The diff returns an object with the _changed
, _added
, _remove
, _layoutChanged
keys containing all differences between the models.
console;// {// ServiceTask_1: {// model: { $type: 'bpmn:ServiceTask', id: 'ServiceTask_1', ... },// attrs: { name: { oldValue: '', newValue: 'T' } }// }// } console;// {// SequenceFlow_1: { $type: 'bpmn:SequenceFlow', id: 'SequenceFlow_1' }// } console;// {// StartEvent_1: { $type: 'bpmn:StartEvent', id: 'StartEvent_1' }// } console;// {// Participant_1: { $type: 'bpmn:Participant', id: 'Participant_1' }// }
Reading BPMN 2.0 documents
Get bpmn-moddle via npm:
npm install --save bpmn-moddle
Load two diagrams:
; { ;} ;
License
MIT