I would like to commit any changes done through a view before re-assigning the task to other users.
The idea is that a user can accept a task, change information and then reassign the task to other users.
I tryied including an applyChange() in the method invoked by the Principal Picker Dialog (defined in the Action), but it doesn’ t work. I suspect the problem could be that the Picker Dialog is invoking the method asynchronously.
How I can persist the data before reassigning it ?
The problem was that by default the picker is placed in a second form. Moving the picker to the same form as the other controls and using applyChanges() persisted the changes before transfering.
I guess you would just create a new action “saveAndReassign” with data flow first invoking the save action and then the reassign action.
Instead of calling the reassign action from the button you would call the “saveAndReassign” from the button.
If the principal picker is not in the same form control then the rest of the task details that are entered by the user, you would put the toggle of the principal picker dialog inside the task form and alter the one way toggle button to an async command link which calles a dummy action and also toggles the principal picker dialog.
This way a server request is send to the server submitting all client side data changes. When the Task is reassigned the data would be in sync.
Direct java calls to the task engine should be avoided here.