Enabling tasks to be reassigned at run time
As the author of a client-side human service, you can add implementation logic to your
service to enable Workplace users
to reassign tasks at run time.
About this task
You can trigger the task reassignment through a server-side call from the client-side human
service. The server-side call can be either a server-side JavaScript API or a
Modify
Task
call on the server. After triggering the reassign, you can add further client-side
logic to improve the user experience, for example, a coach to show a message, and a postpone event
or an end event to go back to the task list in Workplace. - If the client-side logic includes a postpone event, the current user can use the navigation
options of the postpone event to return to the task list or to a different user interface when he is
done working with the task.
The current user, who no longer owns the task, cannot manipulate the state or data associated with the task, therefore no data save is performed after the postpone event. When the service execution reaches the postpone event, one of the following actions occurs:- If the task is not claimed when the postpone event is executed, the new owner resumes the task at the node that follows the postpone event.
- If the task is already claimed when the postpone event is executed, the new owner resumes the task at the last save point prior to the task reassignment.
Restriction: To maintain data integrity, the last data save must occur within the same client-side human service as the postpone event, otherwise the new task owner would not be able to resume the task. - If the client-side logic includes an end event, the end event ends the flow for the current user, but does not end the task and does not perform any data save either. When claimed by the next owner, the task is resumed at the last save point, which is located before the last service call.
BPMTaskOwnerError
. For more information, see Catching errors by using error event handlers.The following procedure is provided as an implementation example for a task reassignment. You can use a different implementation to meet your business needs.
Procedure
To enable users to reassign a task: