How to properly initialize a form property of type boolean?

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-02-2012 10:56 AM
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?
<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?
Labels:
- Labels:
-
Archive
Process Snippet.JPG
17 KB
4 REPLIES 4

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-08-2012 03:27 AM
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.
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.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-09-2012 02:36 AM
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.
I know I can use the enum type instead but using a boolean seems more logical.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-09-2012 03:32 AM
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.
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.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-09-2012 05:43 AM
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,
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,
