<?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 Accessing variables before and after a node update. in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/accessing-variables-before-and-after-a-node-update/m-p/270986#M224116</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am trying to create a script which will run when a node is updated via "manage content rules" -&amp;gt; "Execute script".&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I would like to know if there is a way to access the variables of a node which is being updated both "before" and "after" the update.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The reason is I need to know which variable is being updated for this particular script is because I need it to execute only when one type of node property is changed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you for any help on this.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 18 Dec 2011 11:08:13 GMT</pubDate>
    <dc:creator>zezom</dc:creator>
    <dc:date>2011-12-18T11:08:13Z</dc:date>
    <item>
      <title>Accessing variables before and after a node update.</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/accessing-variables-before-and-after-a-node-update/m-p/270986#M224116</link>
      <description>Hi,I am trying to create a script which will run when a node is updated via "manage content rules" -&amp;gt; "Execute script".I would like to know if there is a way to access the variables of a node which is being updated both "before" and "after" the update.The reason is I need to know which variable i</description>
      <pubDate>Sun, 18 Dec 2011 11:08:13 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/accessing-variables-before-and-after-a-node-update/m-p/270986#M224116</guid>
      <dc:creator>zezom</dc:creator>
      <dc:date>2011-12-18T11:08:13Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing variables before and after a node update.</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/accessing-variables-before-and-after-a-node-update/m-p/270987#M224117</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi zezom,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can do so using JavaPolicies instead of rules… Check the OnUpdatePropertiesPolicy interface you would need to implement. You will need to implement the onUpdateProperties method which specification is the following:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;public void onUpdateProperties(&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NodeRef nodeRef,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Map&amp;lt;QName, Serializable&amp;gt; before,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Map&amp;lt;QName, Serializable&amp;gt; after);&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;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;Another option could be enabling versioning for property updates and access the previous version's metadata.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Dec 2011 11:23:54 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/accessing-variables-before-and-after-a-node-update/m-p/270987#M224117</guid>
      <dc:creator>amandaluniz_z</dc:creator>
      <dc:date>2011-12-19T11:23:54Z</dc:date>
    </item>
  </channel>
</rss>

