Processing Chained Work Items

When a business process is designed, several work items may be grouped together in an embedded sub-process and defined as chained. This means that they must be carried out in succession by the same user.

See "Chained Execution" in the TIBCO Business Studio Process Modeling User’s Guide for more information on chaining.

In order to implement chained execution at runtime, when the first work item of a chained group is completed, the next work item in the chain must immediately be opened and allocated to the same resource who executed the first one. To achieve this, use the completeWorkItem operation in WorkPresentationService.

Chained Work Items

In this example:

Procedure

  1. A work item is assigned to a resource (user) by the allocateWorkItem call from WorkItemManagementService, as in Example of Processing a Work Item.
  2. When the user opens the work item from their client user interface, the client application calls the openWorkItem operation from WorkPresentationService, with the work item ID as an input parameter.
  3. When the user has finished with the work item, the client application invokes the completeWorkItem operation from WorkPresentationService (do not use the completeWorkItem operation in WorkItemManagementService when chaining work items). The response to completeWorkItem returns the ID of the next work item in the chained subprocess.
  4. The completeWorkItem response automatically opens the next chained work item; the client application does not need to call openWorkItem again.
    Note: Note that the next chained work item must arrive within the timeout period specified by the CHAINED_TIMEOUT property in the WPProperties.properties file. If no response is received within that period, the chain "breaks", and no further chained work items are executed.

    For more details of this and other properties, see the WPProperties.properties file in the "BPM Properties Files" section of the TIBCO ActiveMatrix BPM - BPM Administration guide.

  5. The completeWorkItem operation is called for as many times as necessary, each time returning the ID of the next chained work item.
  6. Eventually completeWorkItem returns no chained work item information, which indicates that the chained subprocess is completed.