I’ve run into an issue when deploying a business process to a server with multiple bots working in parallel.
The bot extracts a list of tasks to perform from a database, splits it using the ETL split bot task and performs the tasks in parallel. After performing said task, the bot checks if the task was succesfully performed and is supposed to summarize the success or failure of each task in an excel file. Once all tasks have been reported the report should be sent.
There have been no major issues in developing this process with a single bot. However, after moving to a server with two bots, the bot task of compiling task completion fails when multiple bots attempt to perform it in parallel.
The bot checks for the task index in column ‘A’ of the excel report. Once the correct row is found the bot will go to column E and write a completion marker.
Next, the bot should read the total number of completed tasks so far (stored at the bottom of column ‘E’) from the excel file, increase the number by 1 and write the new number of reported tasks back to the same cell.
If the number of reported tasks is equal to the total number of tasks (meaning that everythin is compiled), a flag should be set that later makes the business process send the report.
This worked well with a single “worker”/bot. With multiple bots it does not behave as expected and does not read the correct current total.
I believe that there is a problem when using the open spreadsheet action (with save after last action) for bot tasks that may be running in parallel?
After running a process with three tasks I got the following result:
All three tasks were performed succesfully but were not compiled correctly - looking at the tasks_reported column or the resulting excel report:
I found https://forum.workfusion.com/t/merging-business-process-after-splitting-it-with-etl-bot-task/56898/4 and believe that I can work the solution provided there to skip using a cell for a running total.
However, the parallel compilation step would still behave wierdly as I need the bots to record their successes. E.g. In the above excel image all three rows should be marked with “TK” if they were succesful.