Error: "The selected record has been modified by another user since it was retrieved"
Reason: The reason we were getting this error in our case was because of the custom scripts. Execution of custom scripts on the Business Components was slowing down the WriteRecord process. This was resulting in the record locking issue.
One way to know if custom scripts are causing this error is to disable all custom scripts (if any) and then try to run the web service to check if you still run into the same error. If yes, following references might help.
Troubleshooting Workflow Process Execution Problems
Defining an Error Exception to Handle an Update Conflict