cancel
Showing results for 
Search instead for 
Did you mean: 

Retry a failed process after a certain minute and for a certain number of time

ShakiratJimoh
Level 4
Hi, so i have this process that is supposed to run for a particular time.However, when a file is missing,the process sends a mail to the department in charge and then terminates. The robot is expected to  retry the process after 15 min but for 5 attempts only.

My issue is how to schedule the process to retry after 15 min for 5 attempts only when it fails in the control room for the very first time.

Thank you.

------------------------------
Shakirat Jimoh
programmer
Waje smart solution
Africa/Lagos
------------------------------
4 REPLIES 4

peterlacken
Level 7

Hi Shakirat,

A simple way to achieve this is to add the case to a Work Queue in the Item Data collection. Set the scheduler to read from the queue every 5 minutes. Read from the queue for the first time and when the file is not present set a counter in the Item Data collection to 1 and 'Defer' the case on the work queue for 15 minutes. The schedule will try again twice without reading the case off the queue and after the 15 mins have elapsed it will try again the same case. No file again, increment the counter and defer. Put some logic in to check the counter is greater than 5 and send an email.


good luck. 



------------------------------
PeterLacken
Ren Røros Intelligent Automation
Peter.Lacken@rria.no
http://www.rria.no
------------------------------

Jatin__Kalra
Level 5
Hi @Shakirat Jimoh,

As per your statement "My issue is how to schedule the process to retry after 15 min for 5 attempts only when it fails in the control room for the very first time."
To resolve this issue we can make 5 tasks of the same process in schedule.
In schedule we have two option "On Complete" and "On Exception"
In On Exception you can provide the process name or task name.
and keep post completion 15*60 this will resolve you issue.
Key point Uncheck Fail Fast on any errors

Thanks


------------------------------
Jatin Kalra
Assistant Manager
Genpact
Asia/Kolkata
------------------------------
Jatin Kalra Manager Genpact Noida UP [Phone]

Hi @Jatin__Kalra

Thank you for the reply.

I created 5 tasks of the same process in schedule and I put in the 15*60 (900) value in the post completion.

However, when the process terminates it dosen't wait for the 15 mins, it only wait for 5 seconds to start another process instead of 15min. Do you know any reason why that might have happened.

Thank you. PS: I am using BP version 6.7.

------------------------------
Shakirat Jimoh
programmer
Waje smart solution
Africa/Lagos
------------------------------

Hi Shakirat,

It could be reason as the time which we are providing in seconds is for Post Completion Delays (secs) but in our case Bot is getting Exception.
Just for try :  Go To System Tab --> Then System Section -->Schedular --> Try to Change time here.
As you have mention its only waiting for 5 second there could be some default setting we need to check and update that on exception.

Thanks
Jatin Kalra

------------------------------
Jatin Kalra
Manager
Genpact
Noida UP
------------------------------
Jatin Kalra Manager Genpact Noida UP [Phone]