cancel
Showing results for 
Search instead for 
Did you mean: 

Process Completed Without Attempting the Deferred Item in the Queue (BP Version 6.9.0)

esaugos
Level 6
I have 5 items in the Work Queue, in which initially 2 items were deferred in the queue.
Later On, One item was successfully completed but the 2nd item was not even attempted and the Process got completed. No exceptions observed in the complete process as checked in the session logs.

Screenshots below for reference.

Queue Status:-
31460.png
Process Status:-
31462.png
Process Studio:-
31463.png

31464.png
31465.png





------------------------------
Saurabh Goswami
RPA Developer
Ericsson India Global Pvt. Ltd.
Asia/Kolkata
------------------------------
RPA Solution Architect
4 REPLIES 4

Denis__Dennehy
Level 15
Hello,
At first glimpse of your screenshots it looks like the process competed at 10:27:59 therefore not picking up an item that had been deferred until 10:28:00?
Maybe a bit more of a description of what was expected and what is wrong might help me understand the issue better. An understanding of the expression in your decision stages and the data items being evaluated might be needed to understand the decision result.

------------------------------
Denis Dennehy
Head of Professional Services, EMEA
Blue Prism Ltd
Europe/London
------------------------------

Process is checking for deferred items in queue and if there is any - trying to get item, otherwise exits.

It looks like at 10:27:59 that last deferred item became active, number of deferred items became 0 and process just stopped instead of attempting to work on it.

However, there is no point trying to get deferred item - you won't get it until it becomes active (unworked). And when it becomes active, it stops being deferred and process will miss it. It might only work sometimes if race condition happens - item is still deferred when report data is collected, but not anymore when get item is called.

Include unworked items in Get report count, then process wont miss it.

I'd also stop hammering database for queue data multiple time a second and add reasonable delay between checks when there is no active items to work on:
1) Do we have unworked items? - Get Item - Do stuff - Repeat 1
2) Do we have unworked or deferred items? Wait 5-10 secs and go back to 1, otherwise exit.
Both in (2), because you might also get a race if you only checking for deferred.



------------------------------
Andrey Kudinov
Project Manager
MobileTelesystems PJSC
Europe/Moscow
------------------------------

Is it fine if add the checks as shown below ?

1, After checking only deferred items in Queue, if it goes for a No Condition.
2. Then, Wait for 5 Seconds.
3. Again Get Report Data and check for Unworked and Deferred items both.
4. if Item Count Exists -> Get Next item -> Perform the Activity.
5. Else End the Process.

31441.png
31442.png
31443.png

31444.png


------------------------------
Saurabh Goswami
RPA Developer
Ericsson India Global Pvt. Ltd.
Asia/Kolkata
------------------------------
RPA Solution Architect

Simple fix is just check both instead of just deferred in your original process.

But to stop hammering a server unnecessarily, you want no delay when there is active items, some sleep when there is deferred left and exit when everything is done. I'd do it like this:
31450.png
You don't need to count if "Get Next Item" still returns data, if there is none - you check deferred and sleep if any.
I check unworked too, because checking deferred only might end up with a situation you had. Although unlikely with a 5 sec sleep, it might still happen once in a blue moon.

Stop requested is just something I always add in workqueue scenarios, so that I can safely stop a process without force stopping it inside a lock.




------------------------------
Andrey Kudinov
Project Manager
MobileTelesystems PJSC
Europe/Moscow
------------------------------