Dynamic Widget visibility based on the DB value


Hi I am trying to show or hide a text field widget based on a select widget. Please check the below log error

Caused by: org.bonitasoft.engine.expression.ExpressionEvaluationException: org.bonitasoft.engine.expression.exception.SInvalidExpressionException: Declared return type interface java.util.List is not compatible with evaluated type class java.math.BigDecimal for expression getLeaveBal


Submitted by ttoine on Mon, 04/14/2014 - 12:20

Hello, what version of Bonita are you using ? Community or Subscription ?

Submitted by rlg on Tue, 04/15/2014 - 15:09


it seems that your expression getLeaveBal return BigDecimal and the widget seems to want a List.

Submitted by kvenkannababu on Tue, 04/15/2014 - 21:05

I am using 6.2.2 performance edition. Actually getLeaveBal is a text which is having contiligence based on empId with a connector. Based on the empId we should be able to print the leave balance. But two different leave balances are available for each employee which is provided through a select widget. Based on chabge of leave type that leave balance should be populate in the getLeaveBal text field.

Submitted by Pablo Alonso de... on Wed, 04/16/2014 - 10:16


As rig said, it is a problem related with the return type declared, and the given as result. In the groovy editor at the bottom you have the return type, can you check it is not a list but a Long?


Submitted by kvenkannababu on Wed, 04/16/2014 - 12:18

Yes I have check that return type. I gave same datatype in grrovy editor as well as the valiable i need to store. But still it is giving the same error. In mysql db the coulumn type is "leaveBal decimal(10,0)". I gave the rethrn type as double in connector.

Submitted by Pablo Alonso de... on Wed, 04/16/2014 - 13:40

Can you add a screenshoot of data setup and the groovy script?


No answers yet.