Closed chillleader closed 6 months ago
Hey @marstamm could you please check if this is related to another bug you recently fixed, or if it's a separate issue?
I can reproduce it on the nightly build as well.
The core reason for this is that a boolean zeebe:property#value
is initially parsed as a string "true"
which is not equal to the boolean true
. Later, in the editing, the value is set to a boolean true
which makes it pass the test. From the metamodel perspective, the fact that we set zeebe:property#value
to a boolean is a hack as in the metamodel the property is defined as a string.
As a quick solution, I will implement casting of the boolean properties. Alternatively, we could consider adjusting the metamodel to accommodate both string and boolean values, but that may break some templates which rely on string "true". Note that for XML it looks the same.
Describe the Bug
If a property condition references another property that happens to be a boolean, the condition is not evaluated correctly when the diagram is first loaded.
Steps to Reproduce
Element template
``` { "$schema": "https://unpkg.com/@camunda/zeebe-element-templates-json-schema/resources/schema.json", "name": "New Connector Template", "id": "201a5308-1f7a-461b-8d1e-783d5c9c79bd", "version": 1715154218173, "appliesTo": [ "bpmn:Task" ], "properties": [ { "id": "myBooleanProp", "type": "Boolean", "label": "Checkbox", "value": false, "tooltip": "Hello world!Link", "binding": { "type": "zeebe:property", "name": "myBooleanProp" } }, { "id": "inputForActiveCheckbox", "type": "String", "label": "Input that appears when checkbox is ACTIVE", "binding": { "type": "zeebe:property", "name": "inputActive" }, "condition": { "property": "myBooleanProp", "equals": true } }, { "id": "inputForInactiveCheckbox", "type": "String", "label": "Input that appears when checkbox is INACTIVE", "binding": { "type": "zeebe:property", "name": "inputInactive" }, "condition": { "property": "myBooleanProp", "equals": false } } ] } ```