Work Items

Functions are provided that allow you to control work items, such as opening, closing, cancelling, allocating, and so on.

The following services contain work item-related operations:

  • WorkPresentationService - The functions in this service are used when the work item presents a form to the user, which is typically the case for most client applications.

    This service contains the following functions for working with work item forms:

    • openWorkItem - Opens a work item form.

      Note that this function (from WorkPresentationService) is also used if there is a pageflow associated with the user task. The response from the openWorkItem function contains the pageflow details, which you use with the startPageFlow function in the PageFlowService to start the pageflow (the pageflow then opens the form).

    • closeWorkItem - Closes the form for the specified work item and updates the associated input and output data. The work item remains in the work list from which it was opened. This is typically called when the user clicks the Close button on the work item form.
      Note: Also see the saveOpenWorkItem function (which is in the WorkItemManagementService) for information about saving changes that have been made on a work item form without closing the form.
    • cancelWorkItem - Closes the form for the specified work item and discards any changes that were made on the form. The work item remains in the work list from which it was opened. This is typically called when the user clicks the Cancel button on the work item form.
    • completeWorkItem - Closes the specified work item form and updates the associated input and output data. The work item is removed from the work list from which it was opened, and the process advances. This is typically called when the user clicks the Submit button on the work item form.
    • openNextWorkItem - Opens the work item form for the next work item in the specified resource’s work list.
  • WorkItemManagementService - This service contains many functions that can be used to manage work items, such as allocating, skipping, getting offer set, and so on.

    The thing to keep in mind, however, is that the three functions that this service has in common with WorkPresentationService (openWorkItem, closeWorkItem, and completeWorkItem) should be called from WorkItemManagementService only when the work item does not present a form to the user. In most cases, a form is presented to the user; when a form is displayed, use the functions in WorkPresentationService instead.

Also see Processing a Work Item for information about using the functions in the services described above to progress a work item through a process.