AnsweredAssumed Answered

How to properly initialize a form property of type boolean?

Question asked by averberne on May 2, 2012
Latest reply on May 9, 2012 by trademak
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?

Attachments

Outcomes