WorkPresentationService

The WorkPresentationService contains functions to perform various operations on work items.

The table below lists the functions available from the WorkPresentationService.

The WorkPresentationService functions do not require a system action.

Function Description Returns
cancelWorkItem Cancels the specified work item. Any changes made to the data will be lost when you cancel a work item. WorkResponseType
closeWorkItem Closes a work item form and updates the associated data with any changes the user has made while it was open.
Note: Note that there is a closeWorkItem function in two services:
  • WorkPresentationService (the one described here) - Use the function in this service to close a form that was opened when the work item was opened with the openWorkItem function in the WorkPresentationService. This is typically called in response to a user clicking the Close button on a work item form.
  • WorkItemManagementService - Use this function if the user task was designed to not open a form nor start a pageflow. This would typically be used only in special use-case client applications -- see closeWorkItem.

This function puts the work item into a Pended state.

WorkResponseType
completeWorkItem Use this function when work on a work item or pageflow has completed. Input and output data associated with the work item is saved to the database. The work item must have a current state of Opened. Its state is changed to Completed.
Note that there is a completeWorkItem function in two services:
  • WorkPresentationService (the one described here) - Use this one if a form was opened when the work item was opened with the openWorkItem function in the WorkPresentationService. This is typically called in response to a user clicking the Submit button on a work item form.
  • WorkItemManagementService - Use this function if the user task was designed to not open a form nor start a pageflow. This would typically be used only in special use-case client applications -- see completeWorkItem.

The request must specify the work item to be completed and also provide the payload.

The response returns the execution status, the payload received in the request message, the work type details, presentation details and pageflow details (if any). If the work item is part of a chained group, the response returns the next work item in the group. If the work item is piled, the response returns the next piled work item.

Note: If the work item is part of a chained group and is also piled, the chained group takes precedence. Once all the chained work items are executed, the next piled work item is executed.

This function puts the work item into a Completed state. Once completed, no further operations can be performed on the work item.

WorkResponseType
openNextWorkItem Opens the next work item in the work queue. WorkResponseType
openWorkItem Retrieves the associated input and output data and opens the work item form.
There is an openWorkItem function in two services:
  • WorkPresentationService (the one described here) - Use this function if the user task was designed to either open a form or start a pageflow, which is typical for most client applications.
  • WorkItemManagementService - Use this one if the user task was designed to not open a form nor start a pageflow. This would typically be used only in special use-case client applications -- see openWorkItem.
WorkResponseType