Symptoms
K2 workflow in SharePoint on a Document library (With versioning enabled). The Document is checked in and it goes through a approval process but while it goes through a approval I have users changing the File (e.g. Adding values) but suddenly my workflow went in error state with the following error message:
The File SharePoint Doc Lib URL]..File name].docx is locked for shared use by User Name]
Diagnoses
The issue was casued by SP locking the file:
http://www.sharepointindepth.com/the-file-is-locked-for-shared-use-by/
Resolution
Provided PS script to release to document lock. (https://sharepointobservations.wordpress.com/2013/09/10/remove-sharepoint-client-side-file-lock/)
Client used the Powershell script to release the lock, then re-tried the instance in the error profile and it worked. This means you must execute the Powershell script before each client event....