cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple Bots Writing To Single Text File

PJNI
Level 2

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

 

1 REPLY 1

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.


Dave Morris, 3Ci at Southern Company