<?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: Reading Aspects in Custom Actions in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/reading-aspects-in-custom-actions/m-p/240645#M193775</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I need to get properties.&amp;nbsp; Are they pre-set as part of the content?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Nov 2009 17:59:37 GMT</pubDate>
    <dc:creator>erictice</dc:creator>
    <dc:date>2009-11-25T17:59:37Z</dc:date>
    <item>
      <title>Reading Aspects in Custom Actions</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/reading-aspects-in-custom-actions/m-p/240643#M193773</link>
      <description>I created a custom action and it kicks off properly.&amp;nbsp; One thing I am curious about though.&amp;nbsp; How do I access Aspect metadata that was not set on the action itself?&amp;nbsp; For instance.&amp;nbsp; The Title and Author fields are out of box metadata that you can see on the content.&amp;nbsp; My action is kicked off on adding c</description>
      <pubDate>Tue, 24 Nov 2009 19:01:46 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/reading-aspects-in-custom-actions/m-p/240643#M193773</guid>
      <dc:creator>erictice</dc:creator>
      <dc:date>2009-11-24T19:01:46Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Aspects in Custom Actions</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/reading-aspects-in-custom-actions/m-p/240644#M193774</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If you are talking about a Java-based Action, the NodeRef the action is running against gets passed in to your executeImpl method:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;protected void executeImpl(Action action, NodeRef actionedUponNodeRef)&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;Once you have that, you can get/set properties to your heart's content&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;Map&amp;lt;QName, Serializable&amp;gt; properties = nodeService.getProperties(actionedUponNodeRef);&lt;BR /&gt;properties.put(SomeCoModel.PROP_IS_ACTIVE, activeFlag);&lt;SPAN class="line-numbers-rows"&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;If you are running JavaScript-based action, the object the action is running against is automatically available in the "document" root variable.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;if (document.hasAspect("sc:webable")) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (document.properties["sc:isActive"] == true) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;document.properties["sc:isActive"] = false;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;document.properties["sc:published"] = new Date();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;document.save();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&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;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope that helps,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jeff&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2009 17:29:39 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/reading-aspects-in-custom-actions/m-p/240644#M193774</guid>
      <dc:creator>jpotts</dc:creator>
      <dc:date>2009-11-25T17:29:39Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Aspects in Custom Actions</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/reading-aspects-in-custom-actions/m-p/240645#M193775</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I need to get properties.&amp;nbsp; Are they pre-set as part of the content?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2009 17:59:37 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/reading-aspects-in-custom-actions/m-p/240645#M193775</guid>
      <dc:creator>erictice</dc:creator>
      <dc:date>2009-11-25T17:59:37Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Aspects in Custom Actions</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/reading-aspects-in-custom-actions/m-p/240646#M193776</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;What would the somecomodel be if I were trying to get the Author metadata as it is an standard alfresco option not one I want to customize?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2009 18:17:23 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/reading-aspects-in-custom-actions/m-p/240646#M193776</guid>
      <dc:creator>erictice</dc:creator>
      <dc:date>2009-11-25T18:17:23Z</dc:date>
    </item>
  </channel>
</rss>

