cancel
Showing results for 
Search instead for 
Did you mean: 

Redwood script to close or change the execution status of a Process queue

Former Member
0 Kudos


Trying to run a Rewwood script to close or change the exection status of a Process quqe. I follow the instrucion in  the Administration Guide, but script is not work. No failure, just not working

Here's my script:

{

  // get the queue

  Queue aQ = jcsSession.getQueueByName("ECC_Queue_TEMP");

  // check to see if the queue is open

  if (aQ.isOpen())

     {

          //hold the queue

          aQ.hold();

          jcsSession.persist();

     }

}

Please review & assist Thanks

Accepted Solutions (0)

Answers (2)

Answers (2)

h_carpenter
Active Contributor
0 Kudos

Hi Larry,

Try this:

{

  // get the partition

Partition part = jcsSession.getPartitionByName("GLOBAL");

  // get the queue

  Queue aQ = jcsSession.getQueueByName(part, "ECC_Queue_TEMP");

  //Check if we found a queue:

if (aQ != null)

  {

  jcsOut.println("Found queue");

  jcsOut.println("Queue is "+ aQ.getStatus().name());

  // check to see if the queue is open

  if (aQ.isOpen())

     {

          //hold the queue

          aQ.hold();

          jcsSession.persist();

     }

  }

}

Regards,

HP

Former Member
0 Kudos

Thanks. I tried, several combination of these scripts and no success. But for some unknown reason, I resubmitted my original script for the "Hold Queue"and it worked

nanda_kumar21
Active Contributor
0 Kudos

Is ECC_Queue_TEMP in Global partition? If, not then you have to get the queue in the following way:

getQueueByName(Partition partition, String name)

Thanks

Nanda

Former Member
0 Kudos

Yes it is an Global partition.. any more ideas.. Thanks

nanda_kumar21
Active Contributor
0 Kudos

can you add jcsOut.println("inside if"); inside the if loop to see if the if loop is true?

Also is the queue open?

Thanks

Nanda