<?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: Create new version with Behaviours/Policies in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/create-new-version-with-behaviours-policies/m-p/297001#M250131</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I prefer to use the EVERY_EVENT notification frequency in almost all instances. But that does not absolve the programmer from doing the necessary pre-condition checks, and "return if not exists" is one of the proper checks to perform for TRANSACTION_COMMIT. Another would be "is the node part of workspace://SpacesStore" by comparing the StoreRef of the NodeRef against the constant in StoreRef-class.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 18 Dec 2016 20:18:18 GMT</pubDate>
    <dc:creator>afaust</dc:creator>
    <dc:date>2016-12-18T20:18:18Z</dc:date>
    <item>
      <title>Create new version with Behaviours/Policies</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/create-new-version-with-behaviours-policies/m-p/296997#M250127</link>
      <description>I have a rather simple behaviour/policy implementation. When an aspect "signedDateAspect" is added to a document, check and set the value for the property "signedDate". The code (relevant part) is below.public class SignedDateAspectPolicy implements NodeServicePolicies.OnAddAspectPolicy {public void</description>
      <pubDate>Fri, 16 Dec 2016 19:50:54 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/create-new-version-with-behaviours-policies/m-p/296997#M250127</guid>
      <dc:creator>zhihailiu</dc:creator>
      <dc:date>2016-12-16T19:50:54Z</dc:date>
    </item>
    <item>
      <title>Re: Create new version with Behaviours/Policies</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/create-new-version-with-behaviours-policies/m-p/296998#M250128</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Forget to specify that it is tested on Alfresco 5.0&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Dec 2016 19:57:09 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/create-new-version-with-behaviours-policies/m-p/296998#M250128</guid>
      <dc:creator>zhihailiu</dc:creator>
      <dc:date>2016-12-16T19:57:09Z</dc:date>
    </item>
    <item>
      <title>Re: Create new version with Behaviours/Policies</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/create-new-version-with-behaviours-policies/m-p/296999#M250129</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your issue likely is related to the fact that you are using TRANSACTION_COMMIT for binding the policy. Unfortunately I see that quite a lot in blog posts or other community examples without people understanding implications / side effects of it. During "Upload New Version" a temporary node will be created (a working copy since "Upload New Version" consists of a check-out/check-in cycle) which will get deleted before the operation is complete. This node will cause the behaviour to be triggered, but since you specified TRANSACTION_COMMIT it will only be called at the end of the transaction after the temporary node has already been deleted again.&lt;/P&gt;&lt;P&gt;This is not related to how versions are created in general - it is just a specific of the "Upload New Version" UI action, which actually simulates three user actions (check-out, edit the working copy, check-in) to ensure some behavioural consistency to different ways a user could interact with the system and trigger these actions invidiually.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 18 Dec 2016 15:03:30 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/create-new-version-with-behaviours-policies/m-p/296999#M250129</guid>
      <dc:creator>afaust</dc:creator>
      <dc:date>2016-12-18T15:03:30Z</dc:date>
    </item>
    <item>
      <title>Re: Create new version with Behaviours/Policies</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/create-new-version-with-behaviours-policies/m-p/297000#M250130</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Axel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your response. That clearly explained check in/out in "Upload New Version" and resulted "node not found". Extremely helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As for the fix, do you think the "return if not exists" approach is acceptable? Or it should switch to other binding such as EVERY_EVENT?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 18 Dec 2016 16:47:50 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/create-new-version-with-behaviours-policies/m-p/297000#M250130</guid>
      <dc:creator>zhihailiu</dc:creator>
      <dc:date>2016-12-18T16:47:50Z</dc:date>
    </item>
    <item>
      <title>Re: Create new version with Behaviours/Policies</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/create-new-version-with-behaviours-policies/m-p/297001#M250131</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I prefer to use the EVERY_EVENT notification frequency in almost all instances. But that does not absolve the programmer from doing the necessary pre-condition checks, and "return if not exists" is one of the proper checks to perform for TRANSACTION_COMMIT. Another would be "is the node part of workspace://SpacesStore" by comparing the StoreRef of the NodeRef against the constant in StoreRef-class.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 18 Dec 2016 20:18:18 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/create-new-version-with-behaviours-policies/m-p/297001#M250131</guid>
      <dc:creator>afaust</dc:creator>
      <dc:date>2016-12-18T20:18:18Z</dc:date>
    </item>
    <item>
      <title>Re: Create new version with Behaviours/Policies</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/create-new-version-with-behaviours-policies/m-p/297002#M250132</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Dec 2016 13:58:57 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/create-new-version-with-behaviours-policies/m-p/297002#M250132</guid>
      <dc:creator>zhihailiu</dc:creator>
      <dc:date>2016-12-19T13:58:57Z</dc:date>
    </item>
  </channel>
</rss>

