completeWorkItem

Use this function when work on a work item or pageflow has completed, and to update the associated data with any changes the user has made while the work item or pageflow was open.

The work item must be Opened, and its state is changed to Completed.

Note that this function is available in two different services:

  • WorkPresentationService - The completeWorkItem function in this service should be used in the following situations:
    • To complete a work item when a form was opened when the work item was opened with the openWorkItem function in the WorkPresentationService. Input and output data associated with the work item is saved to the database. This is typically called in response to a user clicking the Submit button on a work item form.
    • To complete the parent work item when a pageflow was started after the work item was opened with the openWorkItem function in the WorkPresentationService. The work item form is closed and input and output data associated with the work item (and pageflow) is saved to the database.
  • WorkItemManagementService - The completeWorkItem function in this service is used only if the user task does not open a form nor start a pageflow. This would be used only in special use-case client applications.