<?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 How to bind a policy behavior on custom property in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/how-to-bind-a-policy-behavior-on-custom-property/m-p/87614#M26382</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'd like to bind a&amp;nbsp;behavior to a custom property update policy.&lt;/P&gt;&lt;P&gt;The issue is that the callback function is never called.&lt;/P&gt;&lt;P&gt;I'm likely not using the appropriate policy, but I can't find any example on this.&lt;/P&gt;&lt;P&gt;Binding &lt;SPAN&gt;behavior to a custom type or aspect is working fine.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Code used:&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;private PolicyComponent eventManager;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;...&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;// this works&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;eventManager.bindClassBehaviour(NodeServicePolicies.OnUpdatePropertiesPolicy.QNAME, MY_QNAME_URI.ASPECT_BUSINESSPROPERTIES, new JavaBehaviour(this, "onUpdateProperties", Behaviour.NotificationFrequency.TRANSACTION_COMMIT));&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;// this does not work (&lt;SPAN&gt;onUpdateProperties2 never called)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN&gt; eventManager.bindPropertyBehaviour(NodeServicePolicies.OnUpdatePropertiesPolicy.QNAME, MY_QNAME_URI.ASPECT_BUSINESSPROPERTIES, MY_QNAME_URI.PROP_VENDORID , new JavaBehaviour(this,"onUpdateProperties2", NotificationFrequency.TRANSACTION_COMMIT)); &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;...&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;public void &lt;SPAN&gt;onUpdateProperties&lt;/SPAN&gt;(NodeRef nodeRef, Map&amp;lt;QName, Serializable&amp;gt; before, Map&amp;lt;QName, Serializable&amp;gt; after) {...}&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;...&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN&gt;public void&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;onUpdateProperties2&lt;/SPAN&gt;&lt;SPAN&gt;(NodeRef nodeRef, Map&amp;lt;QName, Serializable&amp;gt; before, Map&amp;lt;QName, Serializable&amp;gt; after) {...}&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN&gt;Any suggestion / example on how to use&amp;nbsp;bindPropertyBehaviour ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN&gt;Vincent&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 01 May 2019 10:30:31 GMT</pubDate>
    <dc:creator>vincent-kali</dc:creator>
    <dc:date>2019-05-01T10:30:31Z</dc:date>
    <item>
      <title>How to bind a policy behavior on custom property</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-bind-a-policy-behavior-on-custom-property/m-p/87614#M26382</link>
      <description>Hi,I'd like to bind a&amp;nbsp;behavior to a custom property update policy.The issue is that the callback function is never called.I'm likely not using the appropriate policy, but I can't find any example on this.Binding behavior to a custom type or aspect is working fine.Code used&lt;IMG id="smileytongue" class="emoticon emoticon-smileytongue" src="https://migration33.stage.lithium.com/i/smilies/16x16_smiley-tongue.png" alt="Smiley Tongue" title="Smiley Tongue" /&gt;rivate PolicyComponent ev</description>
      <pubDate>Wed, 01 May 2019 10:30:31 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-bind-a-policy-behavior-on-custom-property/m-p/87614#M26382</guid>
      <dc:creator>vincent-kali</dc:creator>
      <dc:date>2019-05-01T10:30:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to bind a policy behavior on custom property</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-bind-a-policy-behavior-on-custom-property/m-p/87615#M26383</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You simply cannot bind onUpdateProperties on any specific property. The interface OnUpdatePropertiesPolicy extends from ClassPolicy,and thus does not support use of the bindPropertyBehaviour operation. In fact, there current does not exist ANY policy which extends from&amp;nbsp;PropertyPolicy, and thus the operation bindPropertyBehaviour is not supported for any policy. The concept of a PropertyPolicy and binding on individual properties was an architectural idea / concept which was implemented "in case" it was needed in the future, but was - as far as I know - never utilized by any feature.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 May 2019 11:58:04 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-bind-a-policy-behavior-on-custom-property/m-p/87615#M26383</guid>
      <dc:creator>afaust</dc:creator>
      <dc:date>2019-05-01T11:58:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to bind a policy behavior on custom property</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-bind-a-policy-behavior-on-custom-property/m-p/87616#M26384</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Clear. Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 May 2019 17:37:28 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-bind-a-policy-behavior-on-custom-property/m-p/87616#M26384</guid>
      <dc:creator>vincent-kali</dc:creator>
      <dc:date>2019-05-01T17:37:28Z</dc:date>
    </item>
  </channel>
</rss>

