Wrap process changes in a locked transaction

[#79386676]
Fix unexpected modification on updating processes through repository

[#79386676]