<?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: CMIS: Custom behaviour not triggered when creating content in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/cmis-custom-behaviour-not-triggered-when-creating-content/m-p/273015#M226145</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Problem solved.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried to bind my behaviour to a custom type xml_struct, when I changed that to cm:content the behaviour got trigged&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;this.policyComponent.bindClassBehaviour(QName.createQName(&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&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;NamespaceService.ALFRESCO_URI, "onCreateNode"), ContentModel.TYPE_CONTENT, this.onCreateNode);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Then in the method onCreateNode I can check what type the content is:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;if (nodeService.getType(newNodeRef).isMatch(&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;QName.createQName(UUModelConstants.NAMESPACE_UU_CONTENT_MODEL, UUModelConstants.TYPE_XML_STRUCT)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;)) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;GOOD!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; I'm not sure I understand why i Can't bind directly to a customized type though. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;With this solution the behaviour will be triggered for every added document which isn't good from a prestanda point of view.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 15 Mar 2011 14:36:05 GMT</pubDate>
    <dc:creator>oskarelisson</dc:creator>
    <dc:date>2011-03-15T14:36:05Z</dc:date>
    <item>
      <title>CMIS: Custom behaviour not triggered when creating content</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/cmis-custom-behaviour-not-triggered-when-creating-content/m-p/273014#M226144</link>
      <description>Hi!I have a custom behaviour that is bind to&amp;nbsp; onCreateNode. This works perfectly when I add content manually via Alfresco Explorer. But when I use a Java OpenCMIS REST/ATOM client to create content the custom behaviour isn't triggered.The code in the cmis client looks like this:&amp;nbsp;&amp;nbsp;&amp;nbsp;Document sammansta</description>
      <pubDate>Tue, 15 Mar 2011 12:05:40 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/cmis-custom-behaviour-not-triggered-when-creating-content/m-p/273014#M226144</guid>
      <dc:creator>oskarelisson</dc:creator>
      <dc:date>2011-03-15T12:05:40Z</dc:date>
    </item>
    <item>
      <title>Re: CMIS: Custom behaviour not triggered when creating content</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/cmis-custom-behaviour-not-triggered-when-creating-content/m-p/273015#M226145</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Problem solved.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried to bind my behaviour to a custom type xml_struct, when I changed that to cm:content the behaviour got trigged&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;this.policyComponent.bindClassBehaviour(QName.createQName(&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&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;NamespaceService.ALFRESCO_URI, "onCreateNode"), ContentModel.TYPE_CONTENT, this.onCreateNode);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Then in the method onCreateNode I can check what type the content is:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;if (nodeService.getType(newNodeRef).isMatch(&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;QName.createQName(UUModelConstants.NAMESPACE_UU_CONTENT_MODEL, UUModelConstants.TYPE_XML_STRUCT)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;)) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;GOOD!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; I'm not sure I understand why i Can't bind directly to a customized type though. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;With this solution the behaviour will be triggered for every added document which isn't good from a prestanda point of view.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Mar 2011 14:36:05 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/cmis-custom-behaviour-not-triggered-when-creating-content/m-p/273015#M226145</guid>
      <dc:creator>oskarelisson</dc:creator>
      <dc:date>2011-03-15T14:36:05Z</dc:date>
    </item>
    <item>
      <title>Re: CMIS: Custom behaviour not triggered when creating content</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/cmis-custom-behaviour-not-triggered-when-creating-content/m-p/273016#M226146</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks very much for posting this workaround.&amp;nbsp; It saved me a lot of trouble trying to track down the problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have submitted a JIRA ticket for this issue: &lt;/SPAN&gt;&lt;A href="https://issues.alfresco.com/jira/browse/ALF-7994?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel" rel="nofollow noopener noreferrer"&gt;https://issues.alfresco.com/jira/browse/ALF-7994?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also, problems can occur in the call to NodeService.getType() unless you first check to see if the node is deleted.&amp;nbsp; I have written about this on our blog:&amp;nbsp; &lt;/SPAN&gt;&lt;A href="http://www.ziaconsulting.com/technology/alfresco-technology/issue-with-alfresco-cmis-and-behaviors/" rel="nofollow noopener noreferrer"&gt;http://www.ziaconsulting.com/technology/alfresco-technology/issue-with-alfresco-cmis-and-behaviors/&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Mar 2011 23:51:43 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/cmis-custom-behaviour-not-triggered-when-creating-content/m-p/273016#M226146</guid>
      <dc:creator>jgiffin</dc:creator>
      <dc:date>2011-03-31T23:51:43Z</dc:date>
    </item>
  </channel>
</rss>

