<?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: How to convert non-versionable node into first version? in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/how-to-convert-non-versionable-node-into-first-version/m-p/253028#M206158</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You could read out the Creator property and set it to the original value after adding the versionable aspect. The drawback would be, that this editing of properties will lead to a subversion (1.1) being created.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Maybe, you could read out the Creator and then run the script that creates the aspect in this users context. The drawback is, I'm not aware of a way to run a class in a user's context. For Java Scripts in a workflow there's &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;lt;action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript"&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;runas&amp;gt;admin&amp;lt;/runas&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;script&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; logger.log("Person " + person.properties["firstName"]);&lt;BR /&gt;&amp;nbsp; &amp;lt;/script&amp;gt;&lt;BR /&gt;&amp;lt;/action&amp;gt;&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 27 Jan 2011 13:09:33 GMT</pubDate>
    <dc:creator>_sax</dc:creator>
    <dc:date>2011-01-27T13:09:33Z</dc:date>
    <item>
      <title>How to convert non-versionable node into first version?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-convert-non-versionable-node-into-first-version/m-p/253027#M206157</link>
      <description>How can I convert non-versionable node into first version in the most effective way?So far I came up with this:&amp;nbsp;&amp;nbsp;&amp;nbsp;public static void addAspect(NodeRef nodeRef, String comment) {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;CheckOutCheckInService checkOutCheckInService = AlfrescoServices.getServiceRegistry().getCheckOutCheckInService</description>
      <pubDate>Wed, 26 Jan 2011 14:09:40 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-convert-non-versionable-node-into-first-version/m-p/253027#M206157</guid>
      <dc:creator>joko71</dc:creator>
      <dc:date>2011-01-26T14:09:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert non-versionable node into first version?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-convert-non-versionable-node-into-first-version/m-p/253028#M206158</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You could read out the Creator property and set it to the original value after adding the versionable aspect. The drawback would be, that this editing of properties will lead to a subversion (1.1) being created.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Maybe, you could read out the Creator and then run the script that creates the aspect in this users context. The drawback is, I'm not aware of a way to run a class in a user's context. For Java Scripts in a workflow there's &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;lt;action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript"&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;runas&amp;gt;admin&amp;lt;/runas&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;script&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; logger.log("Person " + person.properties["firstName"]);&lt;BR /&gt;&amp;nbsp; &amp;lt;/script&amp;gt;&lt;BR /&gt;&amp;lt;/action&amp;gt;&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jan 2011 13:09:33 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-convert-non-versionable-node-into-first-version/m-p/253028#M206158</guid>
      <dc:creator>_sax</dc:creator>
      <dc:date>2011-01-27T13:09:33Z</dc:date>
    </item>
  </channel>
</rss>

