I was playing around a little bit. I can check from the workspace wether the file is locked or not via attributes. However when I tried to change them, I got into issues running that process again. Seems that it will be more complicated than just changing the map value...
I'll keep playing around..