9 hours ago
Hi
Is it possible to Append To Text File to write exception cases by multiple bots to a single text file? This text file is on a shared drive location for the multiple bots to access.
I am getting an append error when the other bot tries to write to this file (the bot that has created the file on the shared drive is able to write to the text file without issues).
I have created a lock etc, but still getting the append error.
This text file will be used as an input file for manual completion.
Thanks
Using v6.10
6 hours ago - last edited 5 hours ago
Yes, the standard way to do this is to use environment locks so that they wait for each other.
If they tried to concurrently access, it would look like this:
1 - Session A acquires the lock
2 - Session B waits for the lock
3 - Session A writes to the file
4 - Session A releases the lock
5 - Session B acquires the lock
6 - Session B writes to the file
7 - Session B releases the lock
Check for the internal business object "Environment Locking". You'll use the actions Acquire Lock and Release Lock. You don't usually need Query Lock.
You'll want to play around with it to understand how it works and test different scenarios. There's also probably training on the Blue Prism University, and there are YouTube videos about it.
Also note that you can view current Environment Locks in the BP UI in System tab > Workflow > Environment Locks. So, you could do Acquire Lock as a quick test and then go view it in that screen.
2 hours ago
you can save text file with bot name like bot1.txt, bot2.txt, and at last you can add environment lock so that you can collate all the individual text files into one (probably different process or add logic to check nothing is in pending or lock item , if any then loop it until all cases cleared , you can add this logic after acquiring lock).
this will make sure everything is collected properly.