Based on WOPI protocol and also posts over internet including the stackoverflow post CobaltCore assembly, we are able to do the edit at the Office Web App server for ppt/excel/word. One thing we are trying to understand more is about Lock/Unlock. I did some testing for the excel file to understand the lock and unlock. If we could understand this for excel, we would move to word file. Here are what my findings are:
- when I started to edit the excel file at browser, OWA server would call the Lock WOPI Http request ( x-wopi-override header as LOCK) to WOPI server
- after 2 minutes, OWA server would auto save what I have edited by calling PutFile ( x-wopi-override: PUT) to WOPI server
- when I close the browser tab, there would be Unlock Http request call ( x-wopi-override: UNLOCK ) from OWA server to WOPI server
However after above step 2, if I just leave the browse idle for more than 1 hour, actually OWA server would call RefreshLock ( x-wopi-override: REFRESH_LOCK ) every 15 minutes to refresh the same lock although by default the lock should be expired after 30 minutes per WOPI protocol document. With this, it would continue locking the file and there is no chance for WOPI server to release the lock.
I just wonder when we could release the lock at the WOPI server side at the case when user is idle at client side. We could not keep locking the files for couple hours ( I don't know the limit here yet although we could get such message as session expired when viewing SharePoint file at OWA after really long time), this would prevent other users from editing the file. We have the SupportsCoauth as false.
Just wonder if anyone could shed some lights here about the Lock and Unlock behavior and how we could prevent OWA from continuing locking the file.
Note: I could not find better tag for this and there is no WOPI tag at SO, so I added the sames tags as post CobaltCore assembly
Update (Sept 16): it might not prevent other users from editing the file if edition is made at OWA server since OWA server could potentially release lock for first user and lock for second user. We didn't confirm that yet. However not sure how lock would work if another user needs to upload same document from desktop to our server and it would require the lock to override the file.