<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: CMIS Cancel Checkout fails in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/cmis-cancel-checkout-fails/m-p/324143#M11144</link>
    <description>&lt;P&gt;There is a bit of an impedance mismatch between Nuxeo and CMIS versioning. In CMIS, a document is either versioned or not versioned. Nuxeo OTOH, supports a hybrid with its "+" versions. We have chosen to deal with this issue by tweaking the Web UI to enforce a "once versioned, always versioned" semantic to ensure CMIS never encounters documents with hybrid "+" versions which are problematic. I suspect each customer's approach to addressing this impedance mismatch is based on how extensively they use CMIS APIs to interact with the repository.&lt;/P&gt;</description>
    <pubDate>Fri, 26 Sep 2014 05:02:31 GMT</pubDate>
    <dc:creator>rg1_</dc:creator>
    <dc:date>2014-09-26T05:02:31Z</dc:date>
    <item>
      <title>CMIS Cancel Checkout fails</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/cmis-cancel-checkout-fails/m-p/324142#M11143</link>
      <description>&lt;P&gt;I'm using a Nuxeo 5.9.5 repository with CMIS atompub binding.&lt;/P&gt;
&lt;P&gt;I found that I can explicitly checkout a document with a CMIS atompub POST, sending the ID of the document in the payload:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;&lt;A href="http://localhost:8080/nuxeo/atom/cmis/default/checkedout" target="test_blank"&gt;http://localhost:8080/nuxeo/atom/cmis/default/checkedout&lt;/A&gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The checkout can then be canceled by deleting the PWC.  That's done by sending an HTTP Delete message as follows:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;&lt;A href="http://localhost:8080/nuxeo/atom/cmis/default/entry?id=6a76272e-e2ff-4622-9b59-a6aacfd68a54" target="test_blank"&gt;http://localhost:8080/nuxeo/atom/cmis/default/entry?id=6a76272e-e2ff-4622-9b59-a6aacfd68a54&lt;/A&gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I can execute these two commands repeatedly to checkout and then cancel the checkout.  That works OK.  After doing a checkout, the document is both marked as 'checkedout' and 'locked' [I'm not totally clear why there are both properties.]&lt;/P&gt;
&lt;P&gt;Now, if I then use CMIS to update properties on the uncheckedout document, I find that Nuxeo will do an automatic checkout.  I can query the PWC of the document, and it exists.  But I notice that the document is not locked, although it is marked as checked out.&lt;/P&gt;
&lt;P&gt;If I try to cancel the checkout of that document then via CMIS by deleting the PWC, the result is that the entire version series of the document gets deleted.  &lt;STRONG&gt;This is something I don't want!&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;When I inspect the Nuxeo code to see what's happening, I see the following in the method NuxeoCMISService.deleteObjectOrCancelCheckOut(...):&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;        // If doc has versions, is locked, and is checkedOut, then it was likely
        // explicitly checkedOut so invoke cancelCheckOut not delete
        if (verRef != null &amp;amp;&amp;amp; doc.isLocked() &amp;amp;&amp;amp; doc.isCheckedOut()) {
            cancelCheckOut(repositoryId, objectId, extension);
        } else {
            deleteObject(repositoryId, objectId, allVersions, extension);
        }
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;(The comment shown here is from the actual code).  Since at that point the document isn't locked -- doc.isLocked() is false -- it falls through to run the deleteObject(...);&lt;/P&gt;
&lt;P&gt;I'm relatively new to Nuxeo, but what I expect should have happened is that on CMIS property update, if the plan is to auto checkout the document, it should also automatically lock it?&lt;/P&gt;</description>
      <pubDate>Mon, 22 Sep 2014 21:33:19 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/cmis-cancel-checkout-fails/m-p/324142#M11143</guid>
      <dc:creator>dweisinger</dc:creator>
      <dc:date>2014-09-22T21:33:19Z</dc:date>
    </item>
    <item>
      <title>Re: CMIS Cancel Checkout fails</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/cmis-cancel-checkout-fails/m-p/324143#M11144</link>
      <description>&lt;P&gt;There is a bit of an impedance mismatch between Nuxeo and CMIS versioning. In CMIS, a document is either versioned or not versioned. Nuxeo OTOH, supports a hybrid with its "+" versions. We have chosen to deal with this issue by tweaking the Web UI to enforce a "once versioned, always versioned" semantic to ensure CMIS never encounters documents with hybrid "+" versions which are problematic. I suspect each customer's approach to addressing this impedance mismatch is based on how extensively they use CMIS APIs to interact with the repository.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Sep 2014 05:02:31 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/cmis-cancel-checkout-fails/m-p/324143#M11144</guid>
      <dc:creator>rg1_</dc:creator>
      <dc:date>2014-09-26T05:02:31Z</dc:date>
    </item>
  </channel>
</rss>

