Wrong (CMIS) version status after simply importing a document file?

Hi,

I wonder about the version status (CMIS nuxeo:isCheckedIn) after I uploaded a file via the web interface. isCheckedIn is FALSE, which prevents a CMIS user to check out the requested document subsequently. Currently the CMIS user must first check in the 'checked out document' to get around.

Regards

0 votes

1 answers

2109 views

ANSWER



By default, documents created via the Nuxeo Web UI are not yet archived and therefore not yet formally versioned. They are considered initial “Working Copies” in this state and are displayed in the UI with “version” 0.0. This is similar to CMIS document creation with a versioning state of NONE.

In Nuxeo, you must select the the “Edit” tab for the document, select “Increment version” radio button, and then Save in order to version the document. See Nuxeo Versioning for more information.

Once NXP-8965 is resolved, it would seem useful to include the versioning widget on the create form in addition to the edit form. Then a Nuxeo Web user could version the document as part of document creation just like CMIS.

0 votes



Thanks for the documentation hint.

1.) I can well imagine that someone forgets to perform the proposed version jump in order to release the document for CMIS users. Thereafter, no CMIS users can checkout the document (conflict, constraint exception). 2.) If the web ui user drag'n drops a file (which triggers a document creation), than a versioning widget on the create form is not sufficient to avoid additional versioning of the document.

So, for me it is not really clear, why the imported document is initially a working copy.

12/14/2012

ron
There is a reason why the CMIS versioning state of NONE exists. For example, in some scenarios an optimistic locking scheme is more appropriate to manage concurrent access to documents than the pessimistic check-in/check-out version-centric model. CMIS supports optimistic locking using a changeToken. In many of these scenarios, there is no need to archive the document at every change so the overhead required to store every document version is avoided.

If you want to ensure documents created via drag'n drop in Nuxeo are versioned, I suspect you could plugin a custom VersioningService implementation to achieve that behavior. From my perspective, the default Nuxeo versioning behavior seems reasonable despite the fact it differs from the default CMIS behavior.

12/14/2012

The default Nuxeo versioning scheme is "web-oriented", where people create documents with metadata through a web interface and when they're satisfied with it, record a snapshot through versioning. The initial creation can take several steps, go through a workflow or validation, and that's why we don't record a version at this stage.

If you only think in terms of file uploads then yes it makes sense to version things as soon as the document is created. We'll probably implement this in the future, but the reason for this existing behavior is as I state above.

12/24/2012