cancel
Showing results for 
Search instead for 
Did you mean: 

Defer Items are Picked from queue before the Date/time hits

abhilashpatloll
Level 3
Hello All,

Scenario: Our process is processing the items which are differed +2 days form today. From the queue we can clearly see the next review is +2 days  but in the process Get Next Item is picking up those items and starts processing. Not sure what could be the problem.

Note: This process runs on 7 bots.

Did anyone had this issue ? Please let me know.

BP Version - 6.7.0

Thanks,

------------------------------
abhilash patlolla
RPA developer

------------------------------
5 REPLIES 5

NicholasZejdlik
Level 9
Just to verify, does your work queue look something like this?
24338.png

This a shot in the dark, but does your database server have the correct date? The reason I ask is that Get Next Item calls the usp_getnextcase stored procedure, which contains a filter on deferred based on the UTC date on the database server (i.deferred is null or i.deferred < getutcdate()). If for some reason your database server does not have the correct datetime for its time zone, it could cause it to pick up deferred items before it seems like they should be picked up.

------------------------------
Nicholas Zejdlik
RPA Developer
------------------------------

Hello Nicholas,

Thanks for your reply.

Yes, my queue is exactly same as shown in your screenshot.(Next review column)

Yes our database has correct date. And Not all the items are picking by Get Next Item action, out of around 7000 records almost 30 are picked up and processing.
All these 7000 records should be picked up after 2 days.

But my theory is : It is about split seconds of time, first our process loads 7000 records to queue and 7 bots are running at the same time to process them, after multiple steps in the process, process will defer item +2 days and then pick up next item from queue to continue processing. I believe the order of Defer Item action follows this steps inside the action- > first it unlocks and puts into pending state-> then it updates the next review date column.

So, I think in between when BP unlocks the item and updating the next review column to DB, this is where other BOT is picking up and processing the item while it is in pending state.


Let me know if you need more information.

Thanks,

------------------------------
abhilash patlolla
RPA developer
TD
America/Chicago
------------------------------

If I understand correctly, you're loading items into a work queue, then several bots perform work and they eventually defer the work queue items for two days. Is the issue that the items are getting completed ahead of time in spite of having a Next Review Time that's later, or that they're not getting deferred in the first place?

Deferring items shouldn't cause a race condition, as the Defer action does update the deferral time on the item prior to unlocking it.

------------------------------
Nicholas Zejdlik
RPA Developer
------------------------------

Hello Nicholas,

Yes, you are correct. the items are getting completed ahead of time in spite of having Next Review time (+2 Days) The next review column clearly shows us future date in Queue. They are getting deferred properly. No issues with deferring.



------------------------------
abhilash patlolla
RPA developer
TD
America/Chicago
------------------------------

Hi abhilash,

Could you please check all bot machine timings are same or not.

If all time are correct and your database date and timing is matching with them and still facing same issue,Please raise ticket.

defer functionality is working as expected and i think some where date is wrong.

Thanks
Nilesh

------------------------------
Nilesh Jadhav
Senior RPA Specialist
------------------------------
Nilesh Jadhav.
Consultant
ADP,India