I have a Performer “P” process. This “P” is having three things (In sequence mentioned below). It is a single UIPATH project. This process is only designed to handle one queue item in a single end to end execution.
Download File from Web App1
DU
Enter Data to Web App2.
Now I have a dispatcher. This will add transaction to Queue. We have a queue trigger in place. Idea is, as soon as queue is populated. Performer should pick. Now Q1, Q2 and Q3 added to queue. Here dispatcher is separate process.
Now Job1 (Created from “P” process) run and due to less confidence level it will create a action center task and wait until it get the human validation. That means job1 will be suspended.
Now bot will be release so it will pick Q2 as Q1 is suspended. Lets say, while processing Q2, Q1 data validated result come. Now as bot is busy It will continue with Q2 (Current queue item).
After completion of Q2, will it pick Q1 or Q3?
If answer to above is Q3, then for my case I want bot to pick Q1 instead of Q3. How to achieve this?
In this case, you have only 1 job with 3 queue items. Job doesn’t have capability to run through multiple items.
Per my understanding, when action center task is created, that will suspend the job itself so until that particular item is completed in action center, that job cant run any other queue items.
Here, may be you would want to create more than 1 job with different priorities so that 1 can be picked first over another.
Also, you would want to set queue item priority when item is added in queue.
I agree on this. So my perfomer is designed in such a way that, it will pick only one queue item and process. So in this case as soon queue item is added to queue, job will be created for that one queue item. So total 3 jobs for each queue item.
Yes that is why three job will be created in above mentioned ways as I mentioned.
I want something that where if
q1 is suspended due to human validation
Q2 is in progress and human validated q1 document in action center while executing q2. I want now bot to pick q1 after processing q2.
Have you tried setting priority of queue items and verify behavior?
(Q1 as high, Q3 as low) so that Q1 is given priority over Q3?
I believe here, when jobs will be created for Q1,Q2,Q3, those will also be created basis their priority. But you might want to enable priorities and verify its behavior.
But the issue is priority is set while creating queue item. But we can get to know whether it will go to human validation after creating queue item after pass those document to DU. So how to set high priority to human validated queue item. Is there any way to change the queue item status. I dont think so.
Just a small follow-up question first, to clarify. I always thought that queues is an asynchronous system and in theory it shouldn’t matter which item will be executed first.
Could you just provide a small context why Q1 should execute before Q3?
Ok let me tell you that, so while adding to queue we are adding data (in my case number) based on the date. That means case number which is old should process first (this is the requirement). But due confidence level q1 data went for human validation (that Job is suspended). So if use validated q1 data then priority should be given to q1 which is added in the first
The overall point is old case should process first, even if it is on hold due to human validation but, as soon as that is received then bot should start running job j1 first which is suspended rather than bot pick the new item from queue.
Maybe you can update the queue items priority just before creating the action center task.
I’m not sure if it’s possible with UiPath Activities but it’s definitely doable with the Orchestrator API.
So your workflow could be like this (pseudo code):
If confidence < 0.8
queueItem.priority = High
createActionCenterTask
Thinking about it, I’m not sure if this works with items that are not ‘new’.
Maybe @loginerror knows more about this.
Can we set queue item priority to high through API when status is in progress. In the beginning only status become queue in progress by get queue item activity. If that is possible we can make it high.
If we can do the above point, my question still the same. Is Job1 which is suspended for queue item q1 will be resumed first as soon as robot free from job2 of q2. Bot should not pick q3 which is in new status. This should be done automatically.