cancel
Showing results for 
Search instead for 
Did you mean: 

How to properly initialize a form property of type boolean?

averberne
Champ in-the-making
Champ in-the-making
In my process there is a loop with two user tasks: [attachment=0]Process Snippet.JPG[/attachment]). In the second user task a manager can verify the work performed as part of the first user task. When the work is not performed correctly the first user task should be re-created and so on. In order for the manager to specify wether the work is performed correctly I used the following form property:

<activiti:formProperty id="workCorrect" name="Work performed correct?" type="boolean" required="true"></activiti:formProperty>

The first time the manager claims the 'Verify work' user task and does not check the checkbox the 'Perform work' user task is recreated. However, the next time the manager claims the 'Verify work' user task in order to again verify the work performed as part of the first user task, the following exception is thrown when the activiti explorer tries to render the user task with the check box:

Caused by: java.lang.IllegalArgumentException: CheckBox only accepts Boolean values
        at com.vaadin.ui.Button.setInternalValue(Button.java:546)
        at com.vaadin.ui.AbstractField.setValue(AbstractField.java:493)

So this only happens the second time around.
Does anybody have a suggestion on how to circumvent this exception?
Maybe by using one of the 'value', 'expression' or 'default' atributes?
4 REPLIES 4

yz250
Champ in-the-making
Champ in-the-making
Hey! can you tell me what have you typed in the "condition" tab of the exclusive gateway?
Anyway you can use the enum form property with 2 options "YES" or "NO" instead of the boolean one, I think is better and i always use it.

Ivan.

averberne
Champ in-the-making
Champ in-the-making
The condition is not on the exclusive gateway but on the flows leaving the gateway offcourse. The condition I used on the flow going back is: ${!workCorrect}.
I know I can use the enum type instead but using a boolean seems more logical.

yz250
Champ in-the-making
Champ in-the-making
Right, the condition is on the flow not on the exclusive gateway, sorry my mistake.
mmm I don' t know the solution but I will work on it, any help from other users of the forum would be appreciated.

Ivan.

trademak
Star Contributor
Star Contributor
Hi Andy,

Seems to be a bug in the Activiti Explorer. I saw some commits on trunk since 5.9 was released, so maybe this is already fixed now.
Can you send me a process definition so I can test it?

Thanks,
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.