bpmn-io / bpmn-js-element-templates

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

Always persist boolean properties with a default value #91

Open marstamm opened 6 months ago

marstamm commented 6 months ago

Is your feature request related to a problem? Please describe.

When I have a template with a Boolean field, it persists as '' (empty string) when I apply it. Only after I select and unselect it is false persisted.

This leads to inconsistent behavior when I use the property in a condition, like

      "condition": {
        "property": "myBooleanProp",
        "equals": false
      }

Describe the solution you'd like

When first applying a Boolean property, assume a default value of false if none is given.

Describe alternatives you've considered

Additional context

Discovered in https://github.com/bpmn-io/bpmn-js-element-templates/issues/84#issuecomment-2076810255