Example of Processing a Work Item with a Form

This topic shows a simple example of the possible flow for a work item that presents information to the user using a custom form.

For additional information, see Displaying a Work Item Form.

Processing a Work Item with a Form

In this example:

Procedure

  1. A work item appears in an organizational entity’s work list. To direct it to a resource (user) within that organizational entity, use the allocateWorkItem call from WorkItemManagementService, specifying the ID of the work item and the GUID of the resource as input parameters.
  2. When the user opens the work item from their client user interface, the client application calls the openWorkItem function from WorkPresentationService, with the work item ID as an input parameter. The WorkPresentationService operation is used instead of the operation of the same name in the WorkItemManagementService, because the work item makes a visual presentation to the user, and WorkPresentationService is optimized for the presentation of forms.
  3. The client application invokes the Forms runtime to display the work item’s initial form. It may make other calls to the Forms runtime for subsequent forms within the work item. See Forms for further information on using the Forms runtime.
  4. When the user has finished with the work item, and indicates this by pressing a Close button or similar in their client application’s user interface, the Forms runtime notifies the client application.
  5. The client then invokes the completeWorkItem function from WorkItemManagementService.
    Note: Throughout this example the state of the work item changes as described in Example of Processing a Work Item.