<?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 About document.updateProperties() and versioning in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/about-document-updateproperties-and-versioning/m-p/73753#M23711</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using CMIS 1.1 API, Alfresco Community 5.1&lt;/P&gt;&lt;P&gt;I have our custom model, and in the model, I did not do anything with versioning related flags.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word;"&gt;Our model extends cm:content. And we have a custom aspect with set of properties associated.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;However, it is documented that CMIS API automatically turn on versioning on (binary) content changes, and not on update of (meta/custom) properties.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let us say, I have a (custom aspect) property in my document called &lt;STRONG&gt;Roll&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;After I created a document as shown in the code below, when I print the details of the properties, I see the version as 1.0, and value of the &lt;STRONG&gt;Roll&lt;/STRONG&gt; property is "1".&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000; font-family: helvetica,arial,sans-serif; font-size: 12px;"&gt;ContentStream contentStream = cmisSession.getObjectFactory().createContentStream(&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #008000; font-family: helvetica,arial,sans-serif; font-size: 12px;"&gt;mDocument.getFileName(), Long.valueOf(content.length), mimeType, stream);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #008000; font-family: helvetica,arial,sans-serif; font-size: 12px;"&gt;insertedDocument = entityFolder.createDocument(cmisProperties, contentStream, VersioningState.MAJOR);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, afterwards, say I did call &lt;SPAN style="color: #0000ff;"&gt;document.updateProperties()&lt;/SPAN&gt;, by setting the value of the &lt;STRONG&gt;Roll&lt;/STRONG&gt; property to "2". Please note that I do not have versioning turned on for property updates.&lt;/P&gt;&lt;P&gt;Even then, when I print the details of the document after updating the properties, it shows the &lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Roll&lt;/STRONG&gt; property value as "2" for version 1.0&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;I also used CMIS workbench directly to check on the value of the &lt;STRONG&gt;Roll&lt;/STRONG&gt; property, and it says "2" for version 1.0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, say I am uploading a new content for this document, with a value of "3" for the &lt;STRONG&gt;Roll&lt;/STRONG&gt; property&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000; font-family: helvetica,arial,sans-serif; font-size: 12px;"&gt;Document existingDocument = getAlfrescoCMISDocumentByProperties(uniqueProperties, user);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #008000; font-family: helvetica,arial,sans-serif; font-size: 12px;"&gt;if (!existingDocument.isLatestVersion()) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #008000; font-family: helvetica,arial,sans-serif; font-size: 12px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;existingDocument = existingDocument.getObjectOfLatestVersion(false);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #008000; font-family: helvetica,arial,sans-serif; font-size: 12px;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000; font-family: helvetica,arial,sans-serif; font-size: 12px;"&gt;String pwcId = null;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #008000; font-family: helvetica,arial,sans-serif; font-size: 12px;"&gt;if (existingDocument.isVersionSeriesCheckedOut()) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #008000; font-family: helvetica,arial,sans-serif; font-size: 12px;"&gt;&amp;nbsp; &amp;nbsp; pwcId = existingDocument.getVersionSeriesCheckedOutId();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #008000; font-family: helvetica,arial,sans-serif; font-size: 12px;"&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #008000; font-family: helvetica,arial,sans-serif; font-size: 12px;"&gt;else {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #008000; font-family: helvetica,arial,sans-serif; font-size: 12px;"&gt;&amp;nbsp;&amp;nbsp; ObjectId oId = existingDocument.checkOut();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #008000; font-family: helvetica,arial,sans-serif; font-size: 12px;"&gt;&amp;nbsp;&amp;nbsp; pwcId = oId.getId();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #008000; font-family: helvetica,arial,sans-serif; font-size: 12px;"&gt;&amp;nbsp;&amp;nbsp; existingDocument.refresh();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #008000; font-family: helvetica,arial,sans-serif; font-size: 12px;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000; font-family: helvetica,arial,sans-serif; font-size: 12px;"&gt;Document pwc = (Document) cmisSession.getObject(pwcId);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000; font-family: helvetica,arial,sans-serif; font-size: 12px;"&gt;...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000; font-family: helvetica,arial,sans-serif; font-size: 12px;"&gt;ContentStream contentStream = cmisSession.getObjectFactory().createContentStream(&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #008000; font-family: helvetica,arial,sans-serif; font-size: 12px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mDocument.getFileName(), Long.valueOf(content.length), mimeType, stream);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #008000; font-family: helvetica,arial,sans-serif; font-size: 12px;"&gt;ObjectId insertedDocumentObjectId = pwc.checkIn(false, cmisProperties, contentStream, user);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: helvetica,arial,sans-serif; font-size: 15px;"&gt;Now after I do the above, I have two versions in the repository: &lt;/SPAN&gt;&lt;SPAN style="color: #333333; font-size: 15px;"&gt;&lt;SPAN style="font-family: helvetica,arial,sans-serif;"&gt;Version 1.0 &lt;/SPAN&gt;&lt;SPAN style="font-family: helvetica,arial,sans-serif;"&gt;and Version 1.1&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: helvetica,arial,sans-serif; font-size: 15px;"&gt;Version 1.0 has the value of &lt;STRONG&gt;Roll&lt;/STRONG&gt; property as "1"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: helvetica,arial,sans-serif; font-size: 15px;"&gt;Version 1.1 has the value of &lt;STRONG&gt;Roll&lt;/STRONG&gt; property as "3"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: helvetica,arial,sans-serif; font-size: 15px;"&gt;The challenging/misleading thing is, CMIS/Alfresco was showing the value as "2" for the &lt;STRONG&gt;Roll&lt;/STRONG&gt; property up until I created version 1.1. Once it created version 1.1, then 1.0's &lt;STRONG&gt;Roll&lt;/STRONG&gt; property value went back to "1" which was the value when it was originally created in the first place, and not the updated value (which is "2")....&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: helvetica,arial,sans-serif; font-size: 15px;"&gt;I have asked this question once before. Please pardon me for repeating.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: helvetica,arial,sans-serif; font-size: 15px;"&gt;However, besides Alfresco, our product integrates with Documentum, KwikTag, Oracle IP/M, Sharepoint, etc.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I have verified that the Documentum, takes the property updates and maintains them against the current version we are working with. Even after making a new version 1.1, it has the latest values for the version 1.0. In the above case, after creating version 1.1, we have the following data.&lt;/P&gt;&lt;P&gt;Version 1.0 has the value of Roll property as "2".&lt;/P&gt;&lt;P&gt;Version 1.1 has the value of Roll property as "3"&lt;/P&gt;&lt;P&gt;Documentum behaves like it allows property updates on a version ("current version") that was created a while ago and keeps it updated with all property changes, at least until we create another version.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I just want to confirm once more that this is the behavior in Alfresco, with my case explained.&lt;/P&gt;&lt;P&gt;I want to rule out the situation that I do not know how to do updateProperties or creating a new version of a document.&lt;/P&gt;&lt;P&gt;I do not want to conclude things prematurely and do something wrong...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please help me?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 24 Jul 2018 21:20:38 GMT</pubDate>
    <dc:creator>sepgs2004</dc:creator>
    <dc:date>2018-07-24T21:20:38Z</dc:date>
    <item>
      <title>About document.updateProperties() and versioning</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/about-document-updateproperties-and-versioning/m-p/73753#M23711</link>
      <description>I am using CMIS 1.1 API, Alfresco Community 5.1I have our custom model, and in the model, I did not do anything with versioning related flags.Our model extends cm:content. And we have a custom aspect with set of properties associated.However, it is documented that CMIS API automatically turn on vers</description>
      <pubDate>Tue, 24 Jul 2018 21:20:38 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/about-document-updateproperties-and-versioning/m-p/73753#M23711</guid>
      <dc:creator>sepgs2004</dc:creator>
      <dc:date>2018-07-24T21:20:38Z</dc:date>
    </item>
    <item>
      <title>Re: About document.updateProperties() and versioning</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/about-document-updateproperties-and-versioning/m-p/73754#M23712</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word; padding: 0px; margin: 0px;"&gt;I resorted to versioning the document in its latest updated state, before creating a new (different) version as initiated by the user.&lt;/P&gt;&lt;P style="background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word; padding: 0px; margin: 0px;"&gt;This worked for me as now.&lt;/P&gt;&lt;P style="background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word; padding: 0px; margin: 0px;"&gt;Without clear API Javadoc comments, it took me a while to learn that the following statement will create a new version of the current document as is. May be I am not looking into the right place.&lt;/P&gt;&lt;P style="background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word; padding: 0px; margin: 0px;"&gt;&lt;SPAN style="color: #808080; font-family: verdana,geneva,sans-serif; font-size: 12px;"&gt;pwc.checkIn(false, null, null, "Preserving properties update");&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word; padding: 0px; margin: 0px;"&gt;&lt;/P&gt;&lt;P style="background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word; padding: 0px; margin: 0px;"&gt;Action 1 - Let us say the user created a document, which will be version 1.0.&lt;/P&gt;&lt;P style="background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word; padding: 0px; margin: 0px;"&gt;Action 2 - Then let us say user updates the (custom meta) properties few times.&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word; padding: 0px; margin: 0px;"&gt;Action 3 - Then the user initiates creates a new version&lt;/P&gt;&lt;P style="background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word; padding: 0px; margin: 0px;"&gt;While completing action-3 in code, we version the document that is at the end of action-2, before creating a version for action-3.&lt;/P&gt;&lt;P style="background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word; padding: 0px; margin: 0px;"&gt;Here is the extract of the code anyways...&lt;/P&gt;&lt;P style="background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word; padding: 0px; margin: 0px;"&gt;&lt;/P&gt;&lt;P style="background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word; padding: 0px; margin: 0px;"&gt;&lt;SPAN style="color: #808080; font-family: verdana,geneva,sans-serif; font-size: 12px;"&gt;Date createDate = new Date(existingDocument.getCreationDate().getTimeInMillis());&lt;/SPAN&gt;&lt;BR style="word-wrap: break-word; padding: 0px; margin: 0px;" /&gt;&lt;SPAN style="color: #808080; font-family: verdana,geneva,sans-serif; font-size: 12px;"&gt;Date lastModifiedDate = new Date(existingDocument.getLastModificationDate().getTimeInMillis());&lt;/SPAN&gt;&lt;BR style="word-wrap: break-word; padding: 0px; margin: 0px;" /&gt;&lt;SPAN style="color: #808080; font-family: verdana,geneva,sans-serif; font-size: 12px;"&gt;if (lastModifiedDate.after(createDate)) {&lt;/SPAN&gt;&lt;BR style="word-wrap: break-word; padding: 0px; margin: 0px;" /&gt;&lt;SPAN style="color: #808080; font-family: verdana,geneva,sans-serif; font-size: 12px;"&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; createANewVersionOfTheDocument (existingDocument);&lt;/SPAN&gt;&lt;BR style="word-wrap: break-word; padding: 0px; margin: 0px;" /&gt;&lt;SPAN style="color: #808080; font-family: verdana,geneva,sans-serif; font-size: 12px;"&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; existingDocument.refresh();&lt;/SPAN&gt;&lt;BR style="word-wrap: break-word; padding: 0px; margin: 0px;" /&gt;&lt;SPAN style="color: #808080; font-family: verdana,geneva,sans-serif; font-size: 12px;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word; padding: 0px; margin: 0px;"&gt;// ... elsewhere&lt;/P&gt;&lt;DIV style="background-attachment: scroll; background-clip: border-box; background-color: transparent; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 25.95px; min-height: 0px; orphans: 2; overflow: visible; position: static; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; padding: 0px; margin: 0px;"&gt;&lt;SPAN style="color: #808080; font-family: verdana,geneva,sans-serif; font-size: 12px;"&gt;private void createANewVersionOfTheDocument(Document theDocument)&lt;/SPAN&gt;&lt;BR style="background-attachment: scroll; background-clip: border-box; background-color: transparent; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; line-height: 25.95px; min-height: 0px; overflow: visible; position: static; padding: 0px; margin: 0px;" /&gt;&lt;SPAN style="color: #808080; font-family: verdana,geneva,sans-serif; font-size: 12px;"&gt;{&lt;/SPAN&gt;&lt;BR style="background-attachment: scroll; background-clip: border-box; background-color: transparent; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; line-height: 25.95px; min-height: 0px; overflow: visible; position: static; padding: 0px; margin: 0px;" /&gt;&lt;SPAN style="color: #808080; font-family: verdana,geneva,sans-serif; font-size: 12px;"&gt;&amp;nbsp;&amp;nbsp;if (theDocument == null) return;&lt;/SPAN&gt;&lt;BR style="background-attachment: scroll; background-clip: border-box; background-color: transparent; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; line-height: 25.95px; min-height: 0px; overflow: visible; position: static; padding: 0px; margin: 0px;" /&gt;&lt;SPAN style="color: #808080; font-family: verdana,geneva,sans-serif; font-size: 12px;"&gt;&amp;nbsp;&amp;nbsp;theDocument.refresh();&lt;/SPAN&gt;&lt;BR style="background-attachment: scroll; background-clip: border-box; background-color: transparent; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; line-height: 25.95px; min-height: 0px; overflow: visible; position: static; padding: 0px; margin: 0px;" /&gt;&lt;SPAN style="color: #808080; font-family: verdana,geneva,sans-serif; font-size: 12px;"&gt;&amp;nbsp;&amp;nbsp;String pwcId = null;&lt;/SPAN&gt;&lt;BR style="background-attachment: scroll; background-clip: border-box; background-color: transparent; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; line-height: 25.95px; min-height: 0px; overflow: visible; position: static; padding: 0px; margin: 0px;" /&gt;&lt;SPAN style="color: #808080; font-family: verdana,geneva,sans-serif; font-size: 12px;"&gt;&amp;nbsp;&amp;nbsp;ObjectId objectId = theDocument.checkOut();&lt;/SPAN&gt;&lt;BR style="background-attachment: scroll; background-clip: border-box; background-color: transparent; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; line-height: 25.95px; min-height: 0px; overflow: visible; position: static; padding: 0px; margin: 0px;" /&gt;&lt;SPAN style="color: #808080; font-family: verdana,geneva,sans-serif; font-size: 12px;"&gt;&amp;nbsp;&amp;nbsp;pwcId = objectId.getId();&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV style="background-attachment: scroll; background-clip: border-box; background-color: transparent; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 25.95px; min-height: 0px; orphans: 2; overflow: visible; position: static; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; padding: 0px; margin: 0px;"&gt;&lt;SPAN style="color: #808080; font-family: verdana,geneva,sans-serif; font-size: 12px;"&gt;&amp;nbsp;&amp;nbsp;try {&lt;/SPAN&gt;&lt;BR style="background-attachment: scroll; background-clip: border-box; background-color: transparent; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; line-height: 25.95px; min-height: 0px; overflow: visible; position: static; padding: 0px; margin: 0px;" /&gt;&lt;SPAN style="color: #808080; font-family: verdana,geneva,sans-serif; font-size: 12px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Document pwc = (Document) cmisSession.getObject(pwcId);&lt;/SPAN&gt;&lt;BR style="background-attachment: scroll; background-clip: border-box; background-color: transparent; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; line-height: 25.95px; min-height: 0px; overflow: visible; position: static; padding: 0px; margin: 0px;" /&gt;&lt;SPAN style="color: #808080; font-family: verdana,geneva,sans-serif; font-size: 12px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;ObjectId newVersionObjectId = pwc.checkIn(false, null, null, "Preserving properties update");&lt;/SPAN&gt;&lt;BR style="background-attachment: scroll; background-clip: border-box; background-color: transparent; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; line-height: 25.95px; min-height: 0px; overflow: visible; position: static; padding: 0px; margin: 0px;" /&gt;&lt;SPAN style="color: #808080; font-family: verdana,geneva,sans-serif; font-size: 12px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Document insertedDocument = (Document) cmisSession.getObject(newVersionObjectId);&lt;/SPAN&gt;&lt;BR style="background-attachment: scroll; background-clip: border-box; background-color: transparent; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; line-height: 25.95px; min-height: 0px; overflow: visible; position: static; padding: 0px; margin: 0px;" /&gt;&lt;SPAN style="color: #808080; font-family: verdana,geneva,sans-serif; font-size: 12px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;insertedDocument.refresh();&lt;/SPAN&gt;&lt;BR style="background-attachment: scroll; background-clip: border-box; background-color: transparent; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; line-height: 25.95px; min-height: 0px; overflow: visible; position: static; padding: 0px; margin: 0px;" /&gt;&lt;SPAN style="color: #808080; font-family: verdana,geneva,sans-serif; font-size: 12px;"&gt;&amp;nbsp;&amp;nbsp;}&lt;/SPAN&gt;&lt;BR style="background-attachment: scroll; background-clip: border-box; background-color: transparent; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; line-height: 25.95px; min-height: 0px; overflow: visible; position: static; padding: 0px; margin: 0px;" /&gt;&lt;SPAN style="color: #808080; font-family: verdana,geneva,sans-serif; font-size: 12px;"&gt;&amp;nbsp;&amp;nbsp;catch (Exception inExc) {&lt;/SPAN&gt;&lt;BR style="background-attachment: scroll; background-clip: border-box; background-color: transparent; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; line-height: 25.95px; min-height: 0px; overflow: visible; position: static; padding: 0px; margin: 0px;" /&gt;&lt;SPAN style="color: #808080; font-family: verdana,geneva,sans-serif; font-size: 12px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;log.error("@createANewVersionOfTheDocument - Error occurred during creation of a new version");&lt;/SPAN&gt;&lt;BR style="background-attachment: scroll; background-clip: border-box; background-color: transparent; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; line-height: 25.95px; min-height: 0px; overflow: visible; position: static; padding: 0px; margin: 0px;" /&gt;&lt;SPAN style="color: #808080; font-family: verdana,geneva,sans-serif; font-size: 12px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;inExc.printStackTrace();&lt;/SPAN&gt;&lt;BR style="background-attachment: scroll; background-clip: border-box; background-color: transparent; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; line-height: 25.95px; min-height: 0px; overflow: visible; position: static; padding: 0px; margin: 0px;" /&gt;&lt;SPAN style="color: #808080; font-family: verdana,geneva,sans-serif; font-size: 12px;"&gt;&amp;nbsp;&amp;nbsp;}&lt;/SPAN&gt;&lt;BR style="background-attachment: scroll; background-clip: border-box; background-color: transparent; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; line-height: 25.95px; min-height: 0px; overflow: visible; position: static; padding: 0px; margin: 0px;" /&gt;&lt;SPAN style="color: #808080; font-family: verdana,geneva,sans-serif; font-size: 12px;"&gt;&amp;nbsp;&amp;nbsp;finally {&lt;/SPAN&gt;&lt;BR style="background-attachment: scroll; background-clip: border-box; background-color: transparent; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; line-height: 25.95px; min-height: 0px; overflow: visible; position: static; padding: 0px; margin: 0px;" /&gt;&lt;SPAN style="color: #808080; font-family: verdana,geneva,sans-serif; font-size: 12px;"&gt;&amp;nbsp;&amp;nbsp;}&lt;/SPAN&gt;&lt;BR style="background-attachment: scroll; background-clip: border-box; background-color: transparent; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; line-height: 25.95px; min-height: 0px; overflow: visible; position: static; padding: 0px; margin: 0px;" /&gt;&lt;SPAN style="color: #808080; font-family: verdana,geneva,sans-serif; font-size: 12px;"&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jul 2018 13:22:34 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/about-document-updateproperties-and-versioning/m-p/73754#M23712</guid>
      <dc:creator>sepgs2004</dc:creator>
      <dc:date>2018-07-26T13:22:34Z</dc:date>
    </item>
    <item>
      <title>Re: About document.updateProperties() and versioning</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/about-document-updateproperties-and-versioning/m-p/73755#M23713</link>
      <description>&lt;P&gt;Hi &lt;A href="https://migration33.stage.lithium.com/t5/user/viewprofilepage/user-id/24818"&gt;@sepgs2004&lt;/A&gt; ,&lt;/P&gt;&lt;P&gt;I am trying to do the same thing. Did it worked for you ?&lt;/P&gt;&lt;P&gt;properties are not updating for the current version, it gets updated on the new uploaded version.&lt;BR /&gt;I have tried &lt;SPAN&gt;cm:autoVersionOnUpdateProps&lt;/SPAN&gt; but dont want multiple versions for every time on update properties.&lt;BR /&gt;Please guide how to customize this to update properties on the current version too.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Monica&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jun 2020 10:50:30 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/about-document-updateproperties-and-versioning/m-p/73755#M23713</guid>
      <dc:creator>monicakumari</dc:creator>
      <dc:date>2020-06-17T10:50:30Z</dc:date>
    </item>
  </channel>
</rss>

