bpmn-js-differ
bpmn-js-differ copied to clipboard
Timer Event is not recognized in the differ module
Describe the Bug
When we compare two models, and there is a difference in the "duration" configuration in the timer event, then bpmn-js-differ neither populate in the "list of changes" section nor show it on the difference on the models.
Steps to Reproduce
- create two BPMNs (clone each other) with timer event with default event duration as PT1S
- take the second BPMN file and change the above same event's duration to PT15S
- upload these two BPMN Files in the https://demo.bpmn.io/diff, to see if the tool can alert the timer difference.
- diff tool doesn't alert a difference at the timer event.
Expected Behavior
- Diff tool is expected to show the different between two models
- Tool may have to high light there is a difference in timer event node.
- Tool may have to list this difference in "List of changes" panel.
Environment
- Host (Browser/Node version: Version 105.0.5195.125 (Official Build) (64-bit)
- OS: [e.g. Windows 7]: Windows 11
- Library version: [e.g. 2.0.0]
Hi, thank you for opening this issue. I can reproduce this. Moving to Backlog for now.
As this is currently not a high priority item for us, I would like to encourage you to provide a PR for this issue. I investigated a bit and maybe you find my findings helpful to get started.
Root Cause
We only track the bpmn attributes as defined in https://github.com/bpmn-io/bpmn-js-differ/blob/819773dc8302a224bd38318b1837610a1c7eaf9b/lib/change-handler.js#L60-L67
The Timer is defined in bpmn:TimerEventDefinition, which is not part of the list.
hey @marstamm,
Thank you for the reply, yes I have noticed it is not a part of tracked attributes, I will be modifiying the code to include that, Thanks for the response once again.
@marstamm Thank you for providing this open source, learnt little bit on how things work with BPMN.js, I have modified the local snippet as per my needs, and now the code recognize these events including Camunda ones too. Thanks.

Thank you for providing this open source
And you plan to contribute that back?
@nikku I need to do some unit test, and will keep you posted as per the output. Thanks.