<?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: Is it possible to detect which event triggered a folder rule? in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/is-it-possible-to-detect-which-event-triggered-a-folder-rule/m-p/21096#M9290</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Martin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 02 May 2017 14:18:38 GMT</pubDate>
    <dc:creator>pedwards99</dc:creator>
    <dc:date>2017-05-02T14:18:38Z</dc:date>
    <item>
      <title>Is it possible to detect which event triggered a folder rule?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/is-it-possible-to-detect-which-event-triggered-a-folder-rule/m-p/21093#M9287</link>
      <description>Hi there,I have a rule on a folder that executes some custom javascript.The rule is triggered:"When items are created or enter this folder"and"When items are updated"I want my script to behave slightly differently for each event.Does anyone know if it is possible to detect which event triggered&amp;nbsp;the</description>
      <pubDate>Thu, 27 Apr 2017 09:57:34 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/is-it-possible-to-detect-which-event-triggered-a-folder-rule/m-p/21093#M9287</guid>
      <dc:creator>pedwards99</dc:creator>
      <dc:date>2017-04-27T09:57:34Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to detect which event triggered a folder rule?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/is-it-possible-to-detect-which-event-triggered-a-folder-rule/m-p/21094#M9288</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Paul,&lt;/P&gt;&lt;P&gt;I don't think there is a handle or something else for the triggering event, but you can set/check a special property on the triggering object. For example a document action triggers the event,&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;test if your property or aspect is already set&lt;/LI&gt;&lt;LI&gt;if not - it's a new doc (meaning onCreate event), so set your property&lt;/LI&gt;&lt;LI&gt;if already set it's a update/change event&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you could also check the modified an created date time - if modified is newer than created, it was a update/change event. (if created is newer than modified, shut down your whole network &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://connect.hyland.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&amp;nbsp;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe thats more work than to handle two separate events... but...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Apr 2017 11:56:31 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/is-it-possible-to-detect-which-event-triggered-a-folder-rule/m-p/21094#M9288</guid>
      <dc:creator>mehe</dc:creator>
      <dc:date>2017-04-27T11:56:31Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to detect which event triggered a folder rule?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/is-it-possible-to-detect-which-event-triggered-a-folder-rule/m-p/21095#M9289</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Or another option would be to use behaviors instead, and then you will be able to detect what caused the execution, and even more details like, the properties that got changed, including the before and after values.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Apr 2017 13:16:30 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/is-it-possible-to-detect-which-event-triggered-a-folder-rule/m-p/21095#M9289</guid>
      <dc:creator>douglascrp</dc:creator>
      <dc:date>2017-04-27T13:16:30Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to detect which event triggered a folder rule?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/is-it-possible-to-detect-which-event-triggered-a-folder-rule/m-p/21096#M9290</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Martin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 May 2017 14:18:38 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/is-it-possible-to-detect-which-event-triggered-a-folder-rule/m-p/21096#M9290</guid>
      <dc:creator>pedwards99</dc:creator>
      <dc:date>2017-05-02T14:18:38Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to detect which event triggered a folder rule?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/is-it-possible-to-detect-which-event-triggered-a-folder-rule/m-p/21097#M9291</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Douglas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 May 2017 14:19:18 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/is-it-possible-to-detect-which-event-triggered-a-folder-rule/m-p/21097#M9291</guid>
      <dc:creator>pedwards99</dc:creator>
      <dc:date>2017-05-02T14:19:18Z</dc:date>
    </item>
  </channel>
</rss>

