Support Boolean conditions in templates
See original GitHub issueIs your feature request related to a problem? Please describe
When I want to create an element template that has conditional rendering, I want to use a Checkbox to toggle the rendering.
This is useful when multiple Values are either required or empty:
Currently, zeebe:properties
do not support Boolean values. Using a normal property causes an import warning, because the engine does not support my arbitrary bpmn property.
Describe the solution you’d like
zeebe:properties
support boolean values
Describe alternatives you’ve considered
Use a drop-down (yes/no) instead of a Checkbox and compare against this value
Additional context
https://camunda.slack.com/archives/GP70M0J6M/p1663658474448209
Issue Analytics
- State:
- Created a year ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
Boolean Operators - Django Template Tags - GeeksforGeeks
This article revolves about how to use boolean operators in Templates. The {% if %} tag evaluates a variable, and if that variable...
Read more >Create conditional (Boolean) expressions - Microsoft Support
This article explains how to create conditional (also known as Boolean) expressions in Access. A conditional expression evaluates to either true or false,...
Read more >If true false conditions in Templates - help - Meteor forums
I am saving that document in setting. Then I am getting the validationStatus which is a boolean value. rafael ...
Read more >Boolean Condition Wizard - Windward Studios
The Boolean Condition Wizard is a new Wizard in the Windward Designer that assists in writing logical statements for tags that return a...
Read more >if statement - If clause in helm chart - Stack Overflow
The documentation for the Go text/template package explains what the if ... Because that, our chart had to support both a boolean true ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I vote for supporting Boolean bindings in our bindings. Binding a String value is not intuitive for a Checkbox.
I think having a descriptive ID + Boolean value gives the user a familiar experience when it comes to optional templates.
I’m not to familiar with zeebe:properties inner workings, but AFAIK they are not processed by the engine and are meant as temporary values for conditionals only. We could support Boolean values for zeebe:properties but not input/output mappings, where Boolean values don’t make as much sense.
I’m wondering what the most elegant way to support above case is: Support boolean in our bindings or make checkbox bind to string (or feel boolean expression), too.
Checkbox is a binary (on or off) state, so if the checkbox is enabled, bind the designated (string) value to it could be a thing.
Non
property
bindingsoptional
does not make sense for Checkbox. It is implicit (always optional).value
must be mandatory for every but theproperty
binding (kept optional for property to not break existing templates ⬇️).property
bindingsvalue
is optional forproperty
binding (if not taken we assume property is boolean property and serialize as true if checked).Establising bindings during template application and upgrading
If we take this route we need to have a
defaultChecked=true|false
attribute that we consult during initial template application and upgrading.Considering upgrading between templates, we’d always need to make sure that the binding value is a valid declared value (
value
or nothing). At the same time, during upgrade, we preserve the (visual) checked state.If we go the boolean route we’d need to properly represent the boolean across all bindings (i.e. serialize it as
= true
input and output mappings.