cancel
Showing results for 
Search instead for 
Did you mean: 

Boolean properties error in 2.9 (bug?)

ale_carraro
Champ in-the-making
Champ in-the-making
I'm not sure it is a bug in 2.9, but I've got a template that used working in 2.1 and now is not.

I've defined a boolean property in the model in this way:
             <property name="bw:signedByEveryone">
               <type>d:boolean</type>
               <default>false</default>
             </property>
The javascript workflow engine work as usual, since the default is false, and the workflow set it to true in a step, thenhe node browser say it is true.

But both in the property dialog and in my freemarker template accessing the property gives the Exception:

Error on line 8, column 15 in workspace://SpacesStore/e65a20de-4759-11dc-b55f-6dccf9e3a828
Expecting a boolean (true/false) expression here
Expression child.properties["{it.broadwaysolutions}signedByEveryone"] does not evaluate to true/false
it is an instance of freemarker.template.SimpleScalar

The debugger states that the object being evaluated is a SimpleScalar whose value is the String "true"

can anyone tell me if there is a known workaround (or if I'm missing something)?

thanks

Alex
1 REPLY 1

ale_carraro
Champ in-the-making
Champ in-the-making
ok, I found the solution:
in the workflow I set the property to "true" instead of true.

However, in 2.1 it worked also setting the boolean property as a string, while in 2.9 it does not.

I can't understand why setting a string to a boolean property don't throw an exception in the workflow if it is going to do it later… i hate script languages… :wink: