<?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: Content Model Change? in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/content-model-change/m-p/252531#M205661</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Gotcha.&amp;nbsp; I was hoping I didn't have to create this migration script, and that I missed a step somewhere during the upgrade installation.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So, the steps I am hoping to do:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1.&amp;nbsp; Find all nodes with the aspect cm:workingcopy&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2.&amp;nbsp; For each node, do the following:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2a.&amp;nbsp; Get nodeId from the property cm:source (which I believe comes from the cm:copiedfrom)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2b.&amp;nbsp; Add the aspect cm:checkedOut&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2c.&amp;nbsp; Add a cm:workingcopylink association between the current node and the node from step 2a&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2d.&amp;nbsp; Remove the cm:workingcopy and the cm:copiedfrom aspect &lt;/SPAN&gt;&lt;STRONG&gt;(Hoping this works, even though it doesn't exist in the content model)&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;3.&amp;nbsp; Test check in and undo check out.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'll see what happens.&amp;nbsp; Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 29 Aug 2012 17:06:30 GMT</pubDate>
    <dc:creator>dannyl999</dc:creator>
    <dc:date>2012-08-29T17:06:30Z</dc:date>
    <item>
      <title>Content Model Change?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/content-model-change/m-p/252527#M205657</link>
      <description>Hi,I was upgrading our Alfresco 3.2r system to 4.0.2, and we successfully upgraded it to 3.4.10.&amp;nbsp; We started to upgrade to 4.0.2 and got to the point where it started up succesfully.&amp;nbsp; But then, we came across this error in one of our custom Java-backed webscripts:java.lang.IllegalArgumentException:</description>
      <pubDate>Tue, 28 Aug 2012 00:44:30 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/content-model-change/m-p/252527#M205657</guid>
      <dc:creator>dannyl999</dc:creator>
      <dc:date>2012-08-28T00:44:30Z</dc:date>
    </item>
    <item>
      <title>Re: Content Model Change?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/content-model-change/m-p/252528#M205658</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi danny,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Try this &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NodeRef workingCopyRef = this.getCheckOutCheckInService().getWorkingCopy(getDocument().getNodeRef());&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is supported in Alfresco4.0.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Aug 2012 11:07:43 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/content-model-change/m-p/252528#M205658</guid>
      <dc:creator>mitpatoliya</dc:creator>
      <dc:date>2012-08-28T11:07:43Z</dc:date>
    </item>
    <item>
      <title>Re: Content Model Change?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/content-model-change/m-p/252529#M205659</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Sorry about that.&amp;nbsp; I didn't mean nodeService.getWorkingCopy().&amp;nbsp; I meant checkInCheckOutService.getWorkingCopy() is returning NULL.&amp;nbsp; Again, this is only for the files that were checked out in an older version of Alfresco.&amp;nbsp; I am able to get the working copy for files that were checked out in Alfresco 4.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So the used case would be:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1.&amp;nbsp; Start off with Alfresco 3.4.10&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2.&amp;nbsp; Check out a file&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3.&amp;nbsp; Upgrade to 4.0.2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;4.&amp;nbsp; Call CheckOutCheckInService.getWorkingCopy on the file that was checked out.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Result:&amp;nbsp; NULL&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I hope that makes more sense.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Aug 2012 17:25:01 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/content-model-change/m-p/252529#M205659</guid>
      <dc:creator>dannyl999</dc:creator>
      <dc:date>2012-08-28T17:25:01Z</dc:date>
    </item>
    <item>
      <title>Re: Content Model Change?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/content-model-change/m-p/252530#M205660</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ohh okey use case clear.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So, what you need to do in this case is as follow.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Check which aspect is applied to the working copies of all document.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I guess in 3.4 it was "cm:workingcopy" aspect by looking at the content model of 3.4&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So you can grab all such documents in and add the new checkedOut aspect to it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also there is one more aspect called "cm:copiedfrom" that i guess gives you the original document.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So, you populate the values of&amp;nbsp; "cm:workingcopy" aspect and apply that.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can create alfresco javascript for that.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2012 06:15:54 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/content-model-change/m-p/252530#M205660</guid>
      <dc:creator>mitpatoliya</dc:creator>
      <dc:date>2012-08-29T06:15:54Z</dc:date>
    </item>
    <item>
      <title>Re: Content Model Change?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/content-model-change/m-p/252531#M205661</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Gotcha.&amp;nbsp; I was hoping I didn't have to create this migration script, and that I missed a step somewhere during the upgrade installation.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So, the steps I am hoping to do:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1.&amp;nbsp; Find all nodes with the aspect cm:workingcopy&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2.&amp;nbsp; For each node, do the following:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2a.&amp;nbsp; Get nodeId from the property cm:source (which I believe comes from the cm:copiedfrom)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2b.&amp;nbsp; Add the aspect cm:checkedOut&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2c.&amp;nbsp; Add a cm:workingcopylink association between the current node and the node from step 2a&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2d.&amp;nbsp; Remove the cm:workingcopy and the cm:copiedfrom aspect &lt;/SPAN&gt;&lt;STRONG&gt;(Hoping this works, even though it doesn't exist in the content model)&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;3.&amp;nbsp; Test check in and undo check out.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'll see what happens.&amp;nbsp; Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2012 17:06:30 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/content-model-change/m-p/252531#M205661</guid>
      <dc:creator>dannyl999</dc:creator>
      <dc:date>2012-08-29T17:06:30Z</dc:date>
    </item>
    <item>
      <title>Re: Content Model Change?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/content-model-change/m-p/252532#M205662</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yes, that's the way to go.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Best of luck&amp;nbsp; &lt;span class="lia-unicode-emoji" title=":smiling_face_with_sunglasses:"&gt;😎&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Aug 2012 07:00:33 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/content-model-change/m-p/252532#M205662</guid>
      <dc:creator>mitpatoliya</dc:creator>
      <dc:date>2012-08-30T07:00:33Z</dc:date>
    </item>
  </channel>
</rss>

