Start the process from where it got stopped


I am having a following process.

  1. Getting 100 of records from DB.
  2. Using each records data I am using it in application, like creating a request for each records.
  3. So, my question is if bot stopped the execution due to some error, next time when I run the same process it should start running from the stopped record. How can i implement it?.



Hi @monish06

use execute non query and give the statement as select * from table name and pass the datatable

and use flow switch activity and give conditions and set a flag as Boolean value as true and false so based on that you can again connect the flag to flow switch and then will execute the flow accordingly

Ashwin S

1 Like

Yes my point is if i run the process manually, and if i stop the process and again start i want to pick the data from the place it stopped. How can i do that?

lets do one thing

—now keep the process in a TRY block of TRY CATCH ACTIVITY
here inside the TRY block we need to have certain steps to be followed as first sequence which is explained at the last point

—then after using query activity and once after getting the datatable from database we can pass that datatable to a excel with write range activity
—where use a FOR EACH ROW loop and pass the datatable variable as input
—inside the loop use a Assign activity like this
count = count + 1
Where count is a variable of type int32 with default value as 0 defined in the variable panel

—next use open browser or any activity that will process the data from datatable with row(“yourcolumnname”).ToString

—now if suddenly the process gets any exception then it goes to CATCH block

—where we can use a assign activity like this
dt = dt.Asenumerable().Skip(count).CopyToDatatable()

This will skip the so far processed count of rows and keep the remaining
—now use WRITE RANGE ACTIVITY and pass the variable dt as input

So when next time the process is ran then if we want the missed data to be processed then use EXCEL APPLICATION SCOPE and READ RANGE activity and for each row loop with sequence activities to be performed with that data AS THE FIRST SET OF SEQUENCE IN THE TRY BLOCK then use query and then same as mentioned above

Cheers @monish06

1 Like

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