AllocateWorkItem

Allocate a work item to a single resource:

  • The request must specify the work item that should be allocated and the resource to whom it is to be allocated.
  • The response returns details of the allocated work item.

    This operation can only be used if the work item is in a state from which it can be allocated.

Action AllocateWorkItem
Parameter Notes
  • WorkItem: uses sets of ManageId objects to identify a set of work items to allocate. A ManagedId object consists of a work item Id and version.
  • userId: the ID (GUID) of the user to allocate the work item to.
Return VoidResult
Example
private void allocateWorkItem(WorkListItem item)
{
ManagedId id = toManagedObject(item);
HashSet<ManagedId> ids=new HashSet<ManagedId>();
ids.add(id);
BPMWebClientService.getInstance().execute(new AllocateWorkItem(ids, ClientConstants.USER_ID),
new AsyncCallback<VoidResult>()
{
@Override
public void onFailure(Throwable caught)
{
Window.alert("Error: " + caught.getMessage());
}
@Override
public void onSuccess(VoidResult result)
{
Window.alert("Work item allocated");
getWorkList();
}
});
}

Required System Action

workItemAllocation.