Reallocating a Work Item

When reallocating a work item to another resource, you need to choose whether to reallocate the work item, or reallocate the work item data.

The principal difference is in the handling of the data associated with the work item:

  • Using reallocateWorkItemData you can update the work item body with new data as part of the operation.
  • Using reallocateWorkItem you do not allocate any new data, but you can choose what to do with the existing data associated with the work item, by setting the boolean element revertData:
    • If you set revertData to "false", the work item is reallocated just as it is, with existing data unchanged.
    • If you set revertData to "true", all existing data is discarded. The work item is returned to its original state by reverting to the snapshot taken when it was scheduled.

You can reallocate an Opened or Pended work item. You can reallocate an Allocated item, but you cannot use reallocateWorkItemData to update the work item body. If you wish to reallocate and update the data for a work item that is already Allocated, change its status first.

The following diagram shows an example of how you might reallocate a work item with fresh data, bearing in mind the need to determine whether it is in a suitable state.

Reallocating a Work Item

Procedure

  1. To determine whether the work item is in a suitable state, call getWorkListItems, specifying the resource (user) or other organizational entity on whose work list the work item currently appears. The response to this function returns among other data the work item state.
  2. Determine whether the required work item is in a state in which the reallocateWorkItemData function can be used—that is, if it is in an Opened or Pended state.
  3. If it is not, call the openWorkItem operation to put the work item in a suitable state to be reallocated.
  4. Call the reallocateWorkItemData function to reallocate the work item to a new user and pass new data to them.