Hi,
I have written a code which reads the entries from Excel, Goes to different websites for scrapping the data based on a code.
So main work flow:
Which will invoke different work flows based on the Country codes.
the Individual workflows will scrape the data and will write into an excel.
So say for example the excel contains country codes like :US,IN,UK etc
So if its US it will go to Amazon.com and scrape values and write into an excel and once done it will close the IE browser.
Again will invoke a new workflow and scrape another site say xyz.com and does the same process and so on.
Issue:
whenever the site is not working or network connectivity issue, the Browser stops working. UiPath throws an error.
So i m passing the Current browser value inside the workflow to main workflow as out argument.
and using a try catch block and close tab to close the browser, but the varible contains nothing in the main workflow.
Yes the inside workflow browser value is passed back to main workflow using out argument.
The plan is say for some country code the sites might not work , so to avoid the workflow to fail, just close the currently open IE browser and start processing next country code till all codes are processed.
Any thoughts or ideas are really appreciated.
Thanks
Anil Kumar
Fine…
That sounds good, but would like to suggest you one thing buddy… Hope tgat would help you
… As you said you have different workflows that handles different browser to scrape and write those data in a excel…so I would say, let those workflows itself be inside a TRY part of TRY CATCH BLOCK, as the workflow includes the open browser and if it fails it will throw an exception which will be caught by CATCH block where we can mention Activities like a log message with a message like “Unfortunately an error occured on opening browser” + Exception.Message
Which would be stored in log file with the error message as well…and nextly we can use a close tab to close that browser…
Like wise in each workflow this can be handled to avoid disruption of process getting excecuted…as the error with browser will be caught by CATCH block…
And if this is been folloed already, you ared doing good, thats a solicit way to handle this exception or kindly implement this and let know for any queries or clarification buddy
Hope this would help you
Cheers @Anil_choudhary
1 Like
Hi @Anil_choudhary,
you said you handled that IE error with try catch block. And if error then you sent a out variable to main work flow.
Do one thing, instead of passing the ‘out argument’ to main work flow, you do that Close IE Tab workflow in the catch block. So your browser variable are valid.
TanQ,
Michael Udhaya
1 Like
Still any issue buddy @Anil_choudhary
1 Like
Thanks a lot for the responses.
Well My aim was to just handle the issue at global or main workflow level.
So where i m calling the other workflows i wanted to use it there.
The solution you shared the try catch inside the individual workflow is valid and implemented already.
Well thanks a lot for your responses.
2 Likes