Work queues and server roles
In the base configuration, Guidewire assigns work queue functionality to servers with the
workqueue role. File work-queue.xml associates
the workequeue server role with the application work queue
functionality.
workqueue
(#workqueue) indicates that the value that follows the hash mark is
a server role and not a server ID.The workqueue role is merely the default role, however. You are free to
create and assign new work queue management roles. You can also use server roles to
enable or disable certain work queues on a specific PolicyCenter server.
Defining a new work queue role
roles attribute on the
<registry> element in file config.xml.
In the base configuration, Guidewire defines the following server roles:<registry roles="batch, workqueue, scheduler, messaging, startable, ui" />
activitywq), add the new server role to the list of roles:<registry roles="batch, workqueue, activitywq, scheduler, messaging, startable, ui" />
Assigning a work queue to specific PolicyCenter cluster servers
Suppose that you want to assign the management of the activity work queues in the PolicyCenter cluster to a subset of the cluster servers with the
activityworkqueue role. By default, PolicyCenter distributes all other work queues to those servers with
the default workqueue role.
For example, in file work-queue.xml, you define the following:
<?xml version="1.0"?>
<work-queues xmlns="http://guidewire.com/work-queue" defaultServer="#workqueue">
<work-queue workQueueClass="com.guidewire.pl.domain.escalation.ActivityEscalationWorkQueue" … >
<worker server="#activityworkqueue"/>
</work-queue>
<work-queue workQueueClass="com.guidewire.pl.domain.geodata.geocode.GeocodeWorkQueue" … >
<worker/>
</work-queue>
</work-queues>
In this example:
- If a server has the
workqueuerole only, then that server:- Starts an executor for
the
GeocodeWorkQueuework queue. - Does not start an executor
for the
ActivityEscalationWorkQueuework queue.
- Starts an executor for
the
- If a server has the
activityworkqueuerole only, then that server:- Starts an executor for
ActivityEscalationWorkQueuework queue. - Does not start an executor
for the
GeocodeWorkQueuework queue.
- Starts an executor for
- If a server has both the
activityworkqueueandworkqueueroles, then that server starts executors for both work queues. - If a server has neither the
activityworkqueuenor theworkqueuerole, then the server does not start an executor for either of these work queues.
