Work queues that use StandardWorkItem
Guidewire supports creating multiple work queues
that use the same work item type only if that work item is the StandardWorkItem type.
In the PolicyCenter data model, the StandardWorkItem entity type implements
the WorkItem delegate.
The StandardWorkItem entity
type thus inherits the following from the WorkItem delegate:
- Methods to manipulate the work item
- Entity fields that store
such items as
Status,Priority,Attempts, and other similar types of information
Guidewire marks the StandardWorkItem
entity type as final.
Thus, it is not possible to subtype this entity type.
The StandardWorkItem
entity type contains a QueueType
typekey, which obtains its value from the BatchProcessType typelist. It
is the use of this typekey that makes it possible for multiple work queues
to use the StandardWorkItem
type simultaneously.
For example, to query for all StandardWorkItem work items of
a certain type, use a query that is similar to the following:
var target = Query.make(StandardWorkItem).compare(StandardWorkItem#QueueType, Equals, BatchProcessType.TC_CUSTOMWORKITEM)
This query returns all work items for the process that match the filter criteria. The query includes failed work items and work items in progress, not just the work items available for selection.
Error: Two work queues cannot use the same work item type
Guidewire does not support creating multiple
work queues that use the same work item type, except for the StandardWorkItem type. If you
attempt to do so using a work item type other than StandardWorkItem, PolicyCenter throws the following
error:
Two work queues cannot use the same work item type at runtime: workItemType.NameIt is not possible for workers from different work queues to process work items from the same work item database table. In this circumstance, it is not possible for the different sets of workers to determine which work items to process. In any case, it is very likely that there can be database contention issues along with race conditions between the workers in picking up the work items from the queue.
