Developing workers for your custom work queue

In your custom work queue class, override the processWorkItem method that your custom work queue class inherits from WorkQueueBase to provide the programming logic for a worker task. The workers of a work queue are inherently single threaded. Do not attempt to improve the processing rate of individual workers by spawning threads from within your processWorkItem method.

The processWorkItem has a work item as its single parameter. You access the target, or unit of work, for the worker through the WorkItem.Target property. The type and target type of the work item are the types that you specified in the constructor of your custom work queue class derived from WorkQueueBase. At the same time that PolicyCenter calls the processWorkItem method, it sets the Status field of the work item to checkedout.