Displaying a List of Queues

To query for and display a list of queues do the following:

  1. If you do not already have a VWSession object, you must log in to the Process Engine server and establish a Process session using VWSession.
  2. Get the names of queues accessible through the session using VWSession.fetchQueueNames(). The fetchflag(int) flag specifies the types of queues to be returned. For example:
     
      // Fetch a list of queue names for Work queues (QUEUE_PROCESS)
      // and User Queues (QUEUE_USER_CENTRIC)
      
      int myQueueFlags = (VWSession.QUEUE_PROCESS | VWSession.QUEUE_USER_CENTRIC);
      String[] QueueNames = null;
      QueueNames = MySession.fetchQueueNames(myQueueFlags);
    

    When fetching the queue names, you will need to filter out the Component queues. To filter out the Component queues, get the queue using VWSession.getQueue(), and check the property using VWQueue.getIsConnectorQueue(). This method returns a boolean value indicating whether or not the queue is a Connector queue.

  3. You can use the queue names returned to create an instance of the VWQueue class (VWSession.getQueue() returns VWQueue object).
  4. Display the list of queue names as is appropriate for your application.

Additionally, you may find it helpful to use the QueueHelper Sample class.