When we are working with multi bot process,
At the end of the transaction each of the bot should update the data in an excel, when we are using multi bot architecture how can we avoid getting the error when all the bots are trying to update the records into a same excel file??
We have a locking and unlocking mechanism in place. Follow these steps:
Use the File Exists activity to check if the original file exists. Let’s call the output variable OriginalFileExist.
Use a While activity with the condition OriginalFileExist = True.
Inside the loop, add the Rename File activity to change the name of the original file.
Proceed with the necessary operations using Excel or Workbook activities.
Once all Excel-related tasks are completed, rename the file back to its original name using another Rename File activity.
Then change the OriginalFileExist to False.
This approach ensures that the first bot to access the file enters the loop, renames the file, and performs the required operations. If another bot arrives at the same time, it will wait until the first bot restores the original filename. Once the first bot finishes, the next bot can proceed with the same process.
For this scenario instead of updating in the all the bot push that value to another queue and make it seperate process to update the status in single bot.