Introduction to Work Items
Web service operations are provided that allow you to perform functions that control work items, such as opening, closing, cancelling, allocating, etc.
There are the several services that contain work item-related operations:
- WorkPresentationService - The operations 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 operations for working with work item forms:
- openWorkItem - Opens a work item form.
Note that this operation (from WorkPresentationService) is also used if there is a pageflow associated with the user task. The response from the openWorkItem operation contains the pageflow details, which you use with the startPageFlow operation in the PageFlowService to start the pageflow (the pageflow then opens the form).
Note: Also see the information below about the openWorkItem operation in the ClientService as an alternative to using this operation. - 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 operation (which is in 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.
- getBusinessServiceDetailsByModule - Returns details of the forms used by the page activity in the business service.
- openWorkItem - Opens a work item form.
- ClientService - The operations in this service can be used as an alternative to operations in the WorkPresentationService (see above) when opening and completing work items that start pageflows. When opening a work item using this service, you do not have to explicitly start a pageflow using the PageFlowService API, which is necessary when opening a work item that starts a pageflow using the WorkPresentationService. This service retrieves the appropriate form for the page activity, and ensures that the work item is completed when the pageflow is completed.
This service is available in REST only.
The ClientService contains the following operations:
- openWorkItem - Opens a work item that starts a pageflow.
- openNextWorkItem - Opens the next work item.
- completeWorkItem - Closes the specified work item form and updates the associated input and output data.
- WorkItemSchedulerService - This service contains the rescheduleWorkItem operation. This operation allows you to reschedule an existing work item and update the work item's schedule period and/or update the work item’s data.
- WorkItemManagementService - This service contains many operations that can be used to manage work items, such as allocating, skipping, getting offer set, etc.
The thing to keep in mind, however, is that the three operations 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 operations in WorkPresentationService instead.
Note: Do not use this service to open and complete work items that are being chained. Instead, use the WorkPresentationService.
Also see Progressing a Work Item for information about using the operations in the services described above to progress a work item through a process.