Hello everyone, I’m running the Generate Yearly Report Performer exercise from the “Automation Developer Professional” certification preparation course, but my code is stuck in a loop and keeps deleting the “Report” folder. If anyone has already done this activity and could help me in a call, I would greatly appreciate it.
Welcome to the community
This issue is happened because report folder is deleted inside the retry loop
Try this approach
- Move the Delete/Create Report folder logic to the INIT state
• In InitAllApplications.xaml, before looping through items.
2. Remove any Delete Folder / Create Folder inside Process.xaml.
The folder should NOT be touched per transaction.
3. Only delete old files at the end of a successful month, not the folder itself.
4. Make sure the Dispatcher does not run again accidentally — check queue items.
Please find the structure for your reference INIT state please Create Report folder if it doesn’t exist And Delete old files only
**PROCESS Transactions -**Download monthly reports and Merge to yearly report Make sure Do NOT delete folder
END PROCESS State There is No cleanup needed here either
Cheers
Make sure to set SetTransactionStatus properly
Inside the Process.xaml:
If successful → SetTransactionStatus (Success)
If PDF not found / upload failed → SetTransactionStatus (Business Rule Exception)
If system error → SetTransactionStatus (System Exception)
If you skip this step:
The item never completes
REFramework restarts the Process
“Delete Reports Folder” runs again
Loop continues
Hi , I’ll do what you’re suggesting, I’ll get back to you soon and let you know, thank you.
This issue happens when the Performer is using the wrong folder path or the wrong delete logic, causing it to repeatedly delete the “Report(s)” folder and restart the process.
Root Cause:
Most of the time the Peformer uses “Report” instead of “Reports”, or recreates/deletes the folder inside the monthly loop. When the expected Yearly Report file is not found, the robot deletes the folder and the procss loops forever.
-
Use correct folder name and structure:
Reports\Yearly-Report-.xlsx
Make sure both Dispatcher and Performer use Reports (with “s”), not Report. -
Create the folder only once, before the monthly loop:
Path.Combine(in_ReportsFolder, in_TaxID) -
Delete only the monthly files, not the main Reports folder:
- Delete files inside
<Reports>\<ID>\Monthly\ - Do not delete the whole folder.
- Ensure the final file name matches the required format:
YearlyReport-.xlsx
If the file name is wrong, the Perfomer thinks it’s missing and restarts → causing the loop.
After correcting the folder path and deleting only the temprary montly reports, your Performer runs normally and uploads the Yearly Report sucessfuly.
You are better to provide more information with screenshots. Then we are able to understand where it is urnning in infinite loop.
If the solution work for you please mark as solved so thread will be closed
Thank You
This usually happens when the delete or clean folder logic is placed inside a loop that runs more than once, so the “Report” folder keeps getting removed every iteration. Check that the activity which deletes or recreates the Report folder runs only once, ideally before the loop starts. Also verify the loop condition, because if the exit condition is never met, the workflow will keep repeating and trigger the delete again. In this exercise, the Report folder should normally be cleared once at the beginning and then only used for file creation inside the loop, not deleted repeatedly.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.