search cancel

Job runs if maximum slots of queue are set to Zero, using put_att

book

Article ID: 202932

calendar_today

Updated On:

Products

CA Automic Workload Automation - Automation Engine

Issue/Introduction

Using :PUT_ATT QUEUE script function does not update the queue as expected when "Generate at runtime" is checked.  The Job is executed even when the maximum slots of queue is set to Zero. The problem is reproduced when the job is set to generate a task at runtime and the queue is set in the pre process.

For background, there is a requirement to dynamically assign jobs' queue from variable objects based on certain conditions; also generate at runtime is necessary.

Steps to reproduce

1. Setup a job JOBS.WIN.NEW.2 with queue as Client_queue
2. Setup a queue Queue.100 and modify it to set maximum slots = 0
3. In the preprocess of the job
: put_att queue = "queue.100"

4. In the attributes tab, be sure that generate task at runtime is checked.
5. Now execute the task and the job executes

c:\>C:\Automic\Automation.Platform\Agents\windows\bin\UCXJWX6M.EXE JNR=0001003017 MNR=0100 PNR=2300 IPA=10.80.90.231 TYP=S TXT="        Job started" Program 'UC4 Job Messenger' version '12.3.4+build.1601882686134' startedUCMDJP: *********************************************************************

Queue

2020-10-27 12:08:42 - U00011907 Queue 'QUEUE.100' in client '0100' has been modified by user 'AE/AE'. Max. slots: '0000000000', Priority: '0000'. 

Environment

Release : 12.3

Component : AUTOMATION ENGINE

Cause

This is behaving as designed.

 Put_att is done at script generation and as queue assignment is done before script generation when using "Generate at runtime", the queue cannot be changed in this way.

So if the object itself uses client_queue, this is the one that will be used even if put_att is used to set a different queue at runtime.

Please refer to the following documentation.

Execution Stages

Resolution

Generate at activation reacts differently as script this way is run before queue assignment.

There is another way to achieve changing the QUEUE at runtime even when "Generate at runtime" is used which is to use variable references for the queue.

Using an example of JobA needing to change to QUEUE_1 at runtime:

1) Create a variable object called something like 'VARA.QUEUE'

2) In VARA.QUEUE, add a single row:
Key: QUEUE
Value1: CLIENT_QUEUE

3) Create job A, Job A can be at generate at runtime

4) In the Attributes tab of Job A, set queue to:
{VARA.QUEUE, QUEUE, 1}
Note: you can also get to this by clicking the dropdown for queue, choosing "{&} Select Variable", choosing "Variable Objects" from the dropdown, choosing "VARA.QUEUE", inserting Key of "QUEUE" and choosing column 1 - this says to use Value 1 of Key "QUEUE" in VARA.QUEUE object

4) Create workflow, WF1.  In the process tab put:
:put_var 'VARA.32453637', 'QUEUE', 'QUEUE_1'

5) Put Job A into WF1

When you run the WF, if the queue is stopped, you should see Job A be in status of Waiting for Queue or Ready for Start.

Attachments