ONLYOFFICE / DocumentServer

ONLYOFFICE Docs is a free collaborative online office suite comprising viewers and editors for texts, spreadsheets and presentations, forms and PDF, fully compatible with Office Open XML formats: .docx, .xlsx, .pptx and enabling collaborative editing in real time.
https://www.onlyoffice.com
GNU Affero General Public License v3.0
4.87k stars 1.09k forks source link

Missing WOPI Callback after user saves a document #1884

Closed rsoika closed 3 months ago

rsoika commented 2 years ago

Do you want to request a feature or report a bug? I want to request a feature/enhancement

What is the current behavior? I am missing the WOPI POST Call back to our wopi Host after integrating OnlyOffice via WOPI Protocoll

What is the expected behavior? When I change the document or explicitly save the document I expect that a WOPI POST Call back is initiated. But this does not happen.

Did this work in previous versions of DocumentServer? I did test this with the latest version

DocumentServer version: Docker image onlyoffice/documentserver:latest

Operating System: not relevant

Browser version: not relevant

Background: I had a long discussion in the forum beginning with some connection problems but than going about the WOPI protocoll in detail. See here: https://forum.onlyoffice.com/t/running-onlyoffice-with-docker-compose-wopi-connection-refused-while-connecting-to-upstream/2189

Alexandre from the forum pointed me somehow into the wrong direction and I already did a lot of workarounds. Please note that the DNS problems mentioned in the form are all sorted out. And I think the WOPI integration is correct from our side as you can see in this screen cast:

I repeat the core problem from the discussion now:

At least I need to wait the autoAssembly interval of 5 minutes until OnlyOffice dis send the update and my WOPI host receive the fresh document from the OnlyOffice documentServer. This is not acceptable and would exclude the product for our customers. I think I understand your strategy in updating which comes form integrations like owncloud.

I will try to explain the situation: We are developing an open source workflow suite (https://github.com/imixs/imixs-office-workflow). Users can create or process a process instance and can add any kind of information to it. With the integration of OnlyOffice we want to offer our customers a way to edit documents via OnlyOffice. But from our Worklfow-perspective, the user can edit any kind of form data, add documents or at least edit existing documents with OnlyOffice. When the user triggers the Workflow Action (e.g. save, approve, reject) we store all information including the documents into the workflow storage. The timestamp is an important data here. We generate a protocol over all data this user has added/changed. After a process step it may be that the workflow instance and all its data is now locked (e.g. archived) and it is not allowed any more to change it.

And for this reason I need the updated version from OnlyOffice immediately after the user clicks in OnlyOffice on the save button. Processing information depends on business rules within our BPMN process model and this is far outside of logic of the documentStorage from OnlyOffice.

I think from the perspective of OwnCloud or NextCloud the situation is much more easy and your idea to wait a little bit until all users have finished editing is fine. But in your workflow scenario it is not possible to change the document after the user has finished his task.

See the screen cast below for better understanding the situation:

image

If the user clicks the save button, a WOPI POST should be send from the OnlyOffice client to the WOPI Host. But This did not happen.

igwyd commented 2 years ago

Hello @rsoika, please don't duplicate your question on different platforms, we are aware of your request and we are working in this direction. Wait for information at https://forum.onlyoffice.com. If you have a business proposal then you can contact our sales department sales@onlyoffice.com.

rsoika commented 2 years ago

Sorry but I was wondering as I did not found an issue on github. I just think that it is easier to document on github as on the forum page. And I wanted to concentrate the topic a little bit more as the forum thread includes also other topics (DNS). Feel free to close this.

igwyd commented 2 years ago

Forcesave is currently not implemented in WOPI, this requires a protocol extension. We have issue 58764 in our private issue tracker.

rsoika commented 1 year ago

Hi, I want to ask if this issue has made some progress? Until the wopi API is not supporting me a way to react on the save action from the user I can't switch from Collabora to OnlyOffice :-(

igwyd commented 1 year ago

Hello, unfortunately there is nothing new in this direction, this task is not a priority right now.

Vladimir-Panov commented 8 months ago

Hello, have you a progress with this issue?

rsoika commented 8 months ago

I think there is still no progress. Only-office seems to ignore the WOPI standard :-(

igwyd commented 8 months ago

Hello, we don't ignore WOPI, we are developing the standard, but not this feature. We already have several requests forcesave option and reporting each to developers. But you are right, unfirtunately no progress right now in this line.

Vladimir-Panov commented 8 months ago

Hello, I have questions about suggested workaround solution (API: Command service) 1) Can we call the Command service from the WOPI Server? 2) The commands work through the API, so in addition to the WOPI, we also have to implement a significant part of the API, namely callback handler, etc? 3) Instead of a sequence of three requests between the WOPI server and the client, is it possible to get by with one request that will immediately receive the contents of the file from the WOPI client (OnlyOffice)? 4) Command service uses a “key” as identifier of the file. But with WOPI there is only file_id. What key can we use with a command if the file was opened in OnlyOffice by WOPI? document.key = file_id ?

igwyd commented 8 months ago

@Vladimir-Panov you are already communicate on the forum with support team. Your questions will be answered there

igwyd commented 5 months ago

Helo, the feature has been implemented and will be released in the next major release. https://github.com/ONLYOFFICE/server/commit/1c274edd9b4f6431b179cb4a5ca7285f0c32ca80 https://github.com/ONLYOFFICE/web-apps/commit/33d86393fe79119bf2eab876216007af6abc1e33 After release, you can check the save by clicking "Save button" in the editors. For example, you can do this in our test example, add:

<input name="docs_api_config" value="{&quot;editorConfig&quot;:{&quot;customization&quot;:{&quot;forcesave&quot;:true}}}" type="hidden">

in the form tag https://github.com/ONLYOFFICE/document-server-integration/blob/master/web/documentserver-example/nodejs/views/wopiAction.ejs#L53-L56. Here the guide how to install and run test example - https://api.onlyoffice.com/editors/example/nodejs.

Rita-Bubnova commented 3 months ago

DocumentServer v8.1.1 is released so I close this issue. Feel free to comment or reopen it if you got further questions.