Hello. I’m trying to do(https://rpachallengeocr.azurewebsites.net/) with REFramework but a bit different way. I wanted to download all the invoices and then read them and create an excel file that includes (No, ID, Due Date, Company Name, Date, SubTotal, Tax %, Total).
I extracted the table from the site and added it in a data table as dt_ExtractedData . Then, I’ve uploaded the table in a queue with URL reference. Then I wanted to open all URLs in process and downloaded them. Besides I wanted to read the data and then add all info in a data table that I created in init as dt_Output.
But while I’m using REFramework, I keep getting a problem. I’m probably doing something wrong. After I get the data from the queue with Get Transaction Item, I’m using URLs to download but while it is downloading, it uses same transactions again and again randomly and it doesn’t end. when i check the queue, I see some of them successful but some of them in progress and it always keeps working. What am I doing wrong?
Another question, while downloading after “save as”, it waits too much and I don’t know why. I have put delay but it’s in “do while” and it waits too much here.
Thank you so much in advance. I’ll try to add ocr workflows meanwhile and combine the output data in dt_OutputData.
Please answer following questions to help you better
In your case - After reading data table - Are you looping through the data table and add queue item one after the other including the link to extract invoice? Ideally this should be the approach which will result in 4 transaction items if the data table contains 4 rows. Status of all items would be New. Please confirm on this point.
While processing the request - Bot will fetch one item at a time. You can use debug activity to see the status changing in Queue item. Whichever item is getting processed - the status will be In Progress. In the processing stage - you can download the invoice. Read the values and add / append to an excel.
After adding to excel - Status should be successful
PLease see if your BOT is designed as above / working as above details. Let us know if there are any differences
But in that time, it always processes same transactions again and again and it doesn’t end.
I didn’t read invoices to add excel yet. 1st I wanted to download all invoices in a folder, then in the 2nd workflow I was planning to add all the info in an excel file but it failed while downloading.
I’ve translated all comments to English and shared the document again.
@sharazkm32 any further info do you need? I’m trying to learn UiPath, so I’m not good at REFramework as well. I’m trying to do everything well but when it doesn’t work, it’s hard to find what is wrong. I tried to explain what I did in the project and shared all project to show everything clearly.
in process.xaml you need not do get transaction item again that happens in get transaction data state already…already the data would be present in in_TransactionItem argument which is of queueitem type basically the output of get transaction item from get transaction data xaml…and this is the reason you are seeing few in progress left becasue the items you get in process.xaml using get transaction item will not be closed with status…so remove it and use in_Transactionitem
to start with these are the issues I see…and for save as may be the selector might be wrong or is having few attributes which are dynamic…check the same
One thing you need to notice is that - While doing performer - If there are any errors - By default the queue item will be retried for 3 times. This could be one of the reason why you feel like the same item is getting processed again. To confirm that - I would suggest you to change the retry number as 0 and run the process.
To modify retry count, Go to orchestrator–> Your project folder–> Queue–> Edit your queue
Hello. As I told I didn’t change anything in Get Transaction Data state. I just used Get Transaction Item in Process Transaction state. And here I added all my workflows in Invoke Process Workflow as you’ve seen in the SS. Do I have to change something in Get Transaction Data state. I was thinking I don’t need to change anything here.
If you have the flexibility to delete the queue - please delete and add new with the same name without retry option enabled
Run the full process- See how many queue records are added. Note the count
Put a message box of unique reference after getting the transaction item and see the process flow. Whenever message box is displayed - see the status of item in queue after refreshing
I had run the project and waited till all the invoices downloaded, luckily it didn’t last too much but as I told earlier, it chooses randomly and processes it and it doesn’t stop even if all of them processed. You can see the log below:
In process.xaml you need not add get transaction item again…No changes in get transaction data…just use in_Transactionitem values instead of get transaction item in process.xaml
This is my last run log and you can see the orchestrator as well. 12, 1, 8, 11… last items which added queue in orchestrator. And you can see the same in logs as well.
But the problem why the status is always “New” Why it doesn’t change successful even if log says it’s successful?
Ideally there should have been max 12 items but there are many more than that…so looks like add queue item is running everytime may be …check the same…and if you have given retry in queue then failed items will be added back…check the old items if the status has changed
as said please run in debug…use breakpoints and check the queue ui and variables to unerstand
This is my last run, stopped it manually. There are 2 times 9, but there is not 2 and 6 in that time. it always gets random items from queue not in order.
To identify the issue - Delete the queue and add a fresh queue
In the INIT - limit to add only one item
put message boxes at every major step and see whether the status is changing … Instead of running end to end - kindly debug and see where exactly the issue is
Thank you @sharazkm32 and @Anil_G it looks it was a mistake to put Get Transaction Item in Process. And because we had a lot of extra transaction item that waits as New in queue, it was always using them. After removing old queue and adding new one worked. Look at that! Eventually I could reach End Process