Hi,
I am using ReFramework , i extract data from website then save data in Excel file , my question is when i close the website before all data extract how i can delete the file and retry extract again with new data 3 times .
because when i close the browser all process complete with few of data and i need to complete Extract
It depends on where data extraction takes place. If this is happening at the end of the Process state, check the file for an anomaly indicative of all of the data not having been extracted. If the data wasn’t extracted, trigger an Application error by just using the Throw activity with New Exception("This is the message which will be displayed for the error."). Lastly, make sure the retry count in your Config file is set to 3.
In that case, can you make an If activity at the end of the Process state that checks if it’s at the last transaction item by counting the remaining queue items? If that’s the case, have the process then check if the data was correctly scraped. If it wasn’t, throw an error.
If you use Get Queue Items, you can get the ones set to New. Then do a count of the items. If the count is 0, you know you’re at the last transaction.
Yes ; for example it is extra only 50 or 40 then there are some problem occur like the browser close or the connection is interrupted so I want to delete the old data and retry aging open browser and extract again
In that case, use the Message Box activity, but pass an array of options to it {"Yes", "No"}, where the message says something like “Is the data accurate?”. The options go under the Buttons input section. Get the selected option in the output of the Message Box activity ChosenButton.
Next, create a new transition from End Process to Init. If the chosen option is “No”, and RetryCount < the max retry count in the Config file increment the RetryCount variable by 1, and send the process to the Init state.