Work queue workers

Typically, each work queues shares the standard work item table (StandardWorkQueue) for its work items. However, a worker task operates only on work items that its associated writer inserts into the table. For example, suppose that PolicyCenter distributes the Activity Escalation work queue across a Guidewire cluster, with six workers operating on three different servers. Those workers work only on activity escalation items in the standard work item table. Typically, you configure work queues for multiple workers. Thus, typically, some number of workers operate throughout the day on work items in the standard work queue table.

At specified intervals (defined through the maxpollinterval attribute on worker in work-queue.xml), a worker awakens and checks the work item table for work items from its associated writer. If a worker finds work items available for processing, the worker checks out its quota from the work queue. For each item, the worker sets the following attributes.

Status

Set to checkedout.

The value of the Status attribute can be any one of the following:

  • available
  • checkedout
  • failed

LastUpdateTime

Set to the time at which the worker checks out the work item.

CheckedOutBy

Set to the worker.

After it checks out a quota of work items, the worker task processes them sequentially. Whenever a worker completes a work item successfully, it deletes the item from the table and begins to process the next item. The standard work item table (StandardWorkQueue) is retireable, so successfully completed work items remain in the table for historical reference.

Note: In rare cases, it is possible for PolicyCenter to notify a worker of work, but, the worker finds no work is available after it awakens. For example, for small batch runs, a worker can check out all items in the batch with its first check out quota of items. This action can occur between the time the writer notifies the workers and other workers awaken. If a worker awakens and finds no work items, the worker goes back to sleep.