bpmn-io / bpmn-js-element-templates

The element template extension for bpmn-js
MIT License
5 stars 3 forks source link

Infinite loop when applying element template #78

Closed philippfromme closed 7 months ago

philippfromme commented 7 months ago

Describe the Bug

After this commit and with element templates that contain properties with duplicate property IDs (here, here) and conditions depending on those applying an element template results in an infinite loop.

Steps to Reproduce

  1. Check out infinite-loop branch
  2. Run npm start
  3. Test case fails

Expected Behavior

Test case passes. Deduplication IDs fixes it but also removing condition fixes it.

Environment

Additional Context

Initially reported via this thread

philippfromme commented 7 months ago

Error only occurs when applying element template to existing element. Creating using bpmn-js-create-append-anything works.

brave_nUrqr5baep

philippfromme commented 7 months ago

Added ready as we should fix this as soon as possible, either by validating IDs to be unique or by preventing the infinite loop.

nikku commented 7 months ago

Fix via https://github.com/bpmn-io/bpmn-js-element-templates/pull/82.