cancel
Showing results for 
Search instead for 
Did you mean: 

Manually re-ordering the work queue real time

TomBlackburn1
Level 7
Hi, Has anyone found a workable solution for a process controller to re-order the work queue? Ok, so I understand that if I add all the data to a queue with a priority of 5, I could add further data to the queue with a higher or lower priority. (Also not sure why the default priority is 0, I would have thought 5 would be more logical). I also understand that it is possible to change the priority of an item already in the queue by creating a process to do this. Both of these aren't workable solutions for me and don't cover the scope of ordering I need. I have a engineered a few workarounds, but nothing that seems to be easy to manage. Can anyone suggest? Thanks Tom
1 REPLY 1

Graeme__Tacon
Level 6
Hi Tom, I don’t know if this will help you, it’s something we have implemented. We have lots of different types of request for one of our backend systems, which all go onto the same queue. We tag each item with the type of request. We have one process which runs on 10 VMs to process that queue. At different times of the day, we wanted to vary what request types got processed first, so have an environment variable which holds multiple lines in the format: Time,VM,Tag(s) i.e. 21:00:00,VW003161,+Urgent|+GPP Application Setup|+TVI|-Background Batch 21:00:00,VW003164,+Urgent|+GPP Application Setup|+TVI|-Background Batch 21:00:00,VW003165,+Urgent|+GPP Application Setup|+TVI|-Background Batch 16:00:00,VW003161,+Urgent|+Settlement Process; -Authorise Settle Policy|-Authorise Settle Policy The processing looks down these lines until it finds one where the current time is after the time specified and the machine matches the machine the process is running on. Then it splits out the tags field by ‘|’ and does a get next item using those tags until it returns an item. So using the above lines, if the time was 16:25 and we were running on VW003161, it would: Get Next Item with tag ‘+Urgent’. If an item was found then process, otherwise Get Next Item with tag ‘+Settlement Process; -Authorise Settle Policy’. If an item was found then process, otherwise Get Next Item with tag ‘-Authorise Settle Policy’. If an item was found then process, otherwise continue with no item found processing The environment variable is copied to a session variable at the start of the process, so we can change it on the fly.