Sorry, I couldn’t understand what exactly do with below points
There is no such locking mechanism.
You can use some sort of locking mechanism on your own. Like
→ Create a notepad file with a status “Completed”. This file can be accessible by other 2 robots.
→ In a while loop (look for this file and status).
→ Once the file is found, break the while loop and proceed with the next activities.
Consider your robots to be humans… I know… SciFi stuff but still.
What happens if 2 persons work on the same document?
either one person can edit, and the others are locked out / get read only errors etc…
The document is a shared document; as long as nobody edits the same part at the same time this is possible.
Scenario 1: if only one entity (human or robot) can edit a document, then the next one should wait untill it is his/her/its turn. So what Nived linked above: build a locking mechanism / detection, and have a bot wait for its turn to write. For example: a looped try/catch writing the document. If failed, wait 3 seconds, then try again, otherwise exit the loop.
Scenario 2: make your target documents shared, so multiple entities can write and save at the same time. Often excel is used, and excel can be easily set to allow multiple users to edit.
Scenario 2 of course being the easy way out, if your documents support this.
Mind that this does allow for an infinite loop, so you need to implement some max number of tries in it as well. Else your bot is waiting indefinately if somebody deletes a document or keeps it opnened before the weekend without shuting down.