I have a RE framework that three bots use.
When the execution begins, all three bots begin processing and generate a status report that is already coded in the framework.
All three bots create one excel file every 5 minutes and keep track of each processing item in the status report.
If I have a single RE framework that is used by three bots, each bot will generate its own status report.
So my question is, how can I generate a single status report instead of three?
Because I have to send an email every four hours with the status of the status report that contains all record.
Create a bot to get all status reports and merge and send
update the status of all the bots to the queue only in output fields of the queue and create a process to get queue items and create a status report as needed instead of creating individual status reports
Anil, You have been quite helpful over the last two days; it would be greatly appreciated if you could please provide a detailed step by step solution on both options so that I can implement and test them.
For the first…not sure where you have the files…basically get all the files from the shared location if available and merge them…just use append range to merge
for second…use get queue items which will get the queue items from the queue and then use for loop on the output and currentitem.Output("Keyvalue").ToString will give the output values you add to queue …use those values in add data row activity and create a dataTable and write to excel. Rest all is same as how you create any other report
@Shivam_Rana
1)Make a work flow call this workflow at End process.
2)Make an bool asset and init it with True value.
3) inside work flow get asset value.
4) put if condition and check asset value is True
5) If True then first update asset value as False
(So that no other robot will not use this in case of false)
6) now get all files from folder.
7) merge one by one and move in “Processed” folder.( moving will helpful to avoid duplicates in next run)
8) after merge/collate make new in separate folder and send email.
9) now update asset True so other robot can process that files which is remaining and current robot didn’t pick.
Since all three bots will be accessing the same file, you need to ensure that they don’t write to the file simultaneously and overwrite each other’s data. Use synchronization techniques such as file locks or a central lock file to manage access to the shared Excel file. Only one bot should be allowed to write to the file at a time.
Is it possible for you to share the sample Excel files that are generated by each bot and could you manually create a single final status file and share it with me. This way, I can have a clearer understanding of what you’re expecting.
I can help you by creating a sample workflow that caters to multi-bot execution and generates a single file.
Please find the sample file I have created, which can assist you in tracking who processed each request. I have personally used a similar approach in numerous projects, and it has proven to be effective without any issues.
In the attached workflow, you will find an example of how to create an Excel file. You can adapt this workflow and create a separate workflow specifically for generating the Excel file based on your requirements.
Please note that I have used the latest community version for developing this workflow.
If you have any questions or need further assistance, please let me know. I’m here to help.
Yes, you’re correct. All bots will be writing to single file, but it will wait for 10 seconds if the file is already accessed by other bots.
and “Processed By” column will help you to know which bot has processed those requests.
regarding your query on what changes to make,
You can create separate workflow with do while to write or append excel file where you can pass
in_Datatable,in_filename and in_MaxWaittimetoWrite as argument.
you can set MaxWaittimetoWrite key in config “Constant sheet.”