<?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 set association of custom type in custom action in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/set-association-of-custom-type-in-custom-action/m-p/254168#M207298</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi! I am trying to write custom action which like the move-replacing action by ecmarchitect.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I get one problem that i can not solve.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;First, I have create two custom type which is derived from the cm:folder, call test:model and test:version. The test:model has an association test:lastVersion which has the test:version type.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I want to implement an custom action, which set the test:lastVersion (association) to the given version.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The executeImpl funktion is showed as follow:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;protected void executeImpl(Action ruleAction, NodeRef actionedUponNodeRef)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; NodeRef version = (NodeRef)ruleAction.getParameterValue("test-version");&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; NodeRef model = (NodeRef)ruleAction.getParameterValue("test-model");&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; nodeService.setProperty(model,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; QName.createQName(NAMESPACE_TEST_CONTENT_MODEL, "lastVersion"), version);&lt;BR /&gt;}&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;/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;SPAN&gt;In this code the version and model are the parameters of the action. I can modify all other properties of both nodes exclusive the association (in this case test:lastVersion). Perhaps the type of the version is wrong. I need help, any ideas.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 30 Nov 2012 11:46:42 GMT</pubDate>
    <dc:creator>ccc_chen</dc:creator>
    <dc:date>2012-11-30T11:46:42Z</dc:date>
    <item>
      <title>set association of custom type in custom action</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/set-association-of-custom-type-in-custom-action/m-p/254168#M207298</link>
      <description>Hi! I am trying to write custom action which like the move-replacing action by ecmarchitect.I get one problem that i can not solve.First, I have create two custom type which is derived from the cm:folder, call test:model and test:version. The test:model has an association test:lastVersion which has</description>
      <pubDate>Fri, 30 Nov 2012 11:46:42 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/set-association-of-custom-type-in-custom-action/m-p/254168#M207298</guid>
      <dc:creator>ccc_chen</dc:creator>
      <dc:date>2012-11-30T11:46:42Z</dc:date>
    </item>
    <item>
      <title>Re: set association of custom type in custom action</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/set-association-of-custom-type-in-custom-action/m-p/254169#M207299</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I found the solution.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In this case, createAssociation is used to create an association, setProperties is used to modify the properties.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Nov 2012 13:38:41 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/set-association-of-custom-type-in-custom-action/m-p/254169#M207299</guid>
      <dc:creator>ccc_chen</dc:creator>
      <dc:date>2012-11-30T13:38:41Z</dc:date>
    </item>
  </channel>
</rss>

