How to lock a file present in server and update it ?
My requirement is below:
I have a file in Pega Server. ( Not in Service export directory but in a different place common to all server).
There will be a standard agent which will try to update the file .standard agent runs in multiple nodes. When the agent activity runs it should read the file from folder, get the lock of file and update the file.
1. Would it be possible to lock the file in server, so that other agent not to update the file at same time ?
2. how to read the file from server ? i found the code to read the file from service export directory and it works. when i try to reuse the same code with different source folder it doesn't work.