This class is a helper class with reusable methods for other samples or applications, particularly QueueSample. This sample demonstrates how to get queue information and report on various queue-related objects.
For more information, see the comments in the sample source. The samples are supplied in the Developer samples section of the IBM® FileNet® P8 Platform publication library.
See also Running the API Samples.
General descriptions of the QueueHelper methods follow:
displayQueueContents()
Displays the contents of a Queue: properties of queue elements, step elements, and work objects. This method retrieves the queue information by using the local methods displayQueueElements(), displayStepElements(), and displayWorkObjects().
displayQueueElementInfo()
Displays the properties of a single queue element with the following steps.
A field names array is set by using VWQueueElement.getUserDefinedFieldNames
Properties of the queue element are logged individually by using VWQueueElement.getWorkObjectNumber.
The VWQueueElement methods getWorkClassName(), getQueueName(), getOperationName(), getLockedStatus(), and getLockedMachine() are used to get more property values, and the results are logged.
displayQueueElements()
Uses VWQueue.createQuery to get a VWQueueQuery object and VWQueueQuery.next to query the series of all queue elements. The local method displayQueueElementInfo() is used to display the queue element information.
displayQueueLockStatus()
Displays lock status information for all workflow queue elements and logs queue names.
displayQueueLockStatus() performs a query of all queue elements similar to displayQueueElements(), but it differs by controlling the loop with VWQueueQuery.next(). VWQueueElement.getLockedUser is used to find a locked work object, and VWQueueElement.getWorkObjectNumber is used to get the work object number.
displayQueueNames()
Logs all queue names by using VWQueueElement.getQueueName.
displayStepElements() and displayWorkObjects()
These two methods display property information for a group of queue elements, step elements, or work objects. The processing steps these methods use are similar, and begin by setting up an iterative query of the elements/objects group, by using VWQueue.createQuery and specifying the appropriate VWFetchType constant to get the VWQueueQuery object, and VWQueueQuery.next to iterate through the group of elements/objects.
getQueue()
Uses VWSession.getQueue to get the VWQueue object for the specified queue name.
getQueueNames()
Uses the VWSession session object flags to filter the queue names to be returned (by VWSession.fetchQueueNames).