How to handle an unexpected error in the middle of the execution, without orchestrator queues?

Hi everyone,

I’m wondering how I could handle an unexpected error in my ReFramework robot. I’ll first describe the process to you for a good understanding of the predicament.

  • During init, the process takes every page from a PDF. Each page corresponds to a transaction item.
  • At the end of the process, the page corresponding to the transaction item gets extracted from the pdf, to be a single page pdf.

So the problem is, if the process fails during item 23/51 for example, and keeps failing afterwards, how do I launch the robot again and get him to start from the 23rd item?

Thanks in advance.

You are performing repeatitive steps in your init which should be handled in your process part of the REF.

Your init is for 1 time steps. Starting up applications, setting up specific data lookups such as your config etc, and… a work divider step called a dispatcher.

You shoul read your pdf file, read it, and make a transactionitem for each page, mayby simply by refering to the page number.

Then in the process, each transaction (page) is handled one by one. If it fails, it can continue where it was, due to the inner mechanics of the REF.

If the desire is to not use orchestrator queues, you can alter your add queue items and get transaction item activities by reading a notepad, or excel to store your progress.

There are simpler loop mechanisms to accomplish what you want (simple do while loop, and a page tracker in some txt file for example), but that would not be useing UiPath’s REF.

1 Like

Thanks for your answer Jeroen,

That’s exactly what I’m doing though. The process restarts the transaction if it failed with a system exception.
The problem stems from when even though the process has been retried 50 times (what i’ve put in), the execution will stop. At this point the robot will need to be reset, and will start over at the first page of the pdf. That’s what I want to manage.

Hi @matteo.tatibouet ,

Using work Queues is the best practice of uipath. but in your case we can go for one approach like storing the processed data in the database tables. Initital state we have to keep one logic in first run like we have to insert all the PDF paths into the database table.

For suppose for first PDF we have successfully processed we will store some data related to PDF and we will mainatin one column with flag like yes means processed blank means not processed like that.

Foe example we have received 50 PDF’s and process got failed on the processing of 35th PDF so bot reset and it will start from the init stage. In the init state we have to keep one logic like before processing the PDF’s we have to verify how many PDF got processed so bot will take only the PDF which are not processed like the entries having the flag as blank.

sharing my thought. please give it a thought. thanks.

Regards,
Kirankumar.

1 Like

Hey thanks for your answer Kirankumar.

I’ve chose against using queues for several reasons, but today I might rethink that decision for these problems exactly. Thanks for sharing your idea, but as you’ve described, it’s similar to the integrated functions of an orchestrator queue.

1 Like

Your most welcome @matteo.tatibouet .

Yeah the database logic which i mentioned similar to the work queue concept.

Please try to use work queues in your RE frame work so that it will make your process more robust. thanks.

Regards,
Kirankumar.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.