<?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: How can I invoke an action from another action? in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/how-can-i-invoke-an-action-from-another-action/m-p/312528#M265658</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;by action you mean an action that is being run upon a configured folder-rule?&lt;/P&gt;&lt;P&gt;you can run a script at the end of execution of a rule. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 14 Oct 2016 15:08:27 GMT</pubDate>
    <dc:creator>mrks_js1</dc:creator>
    <dc:date>2016-10-14T15:08:27Z</dc:date>
    <item>
      <title>How can I invoke an action from another action?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-can-i-invoke-an-action-from-another-action/m-p/312527#M265657</link>
      <description>Hi,How can I invoke an action from another action?I have an action that extracts metadata from a specific file, another action change type of document in reference to a name.If a name of this file (A) is the same of another file in another directory, file B ( different file but same name)&amp;nbsp; an existi</description>
      <pubDate>Fri, 14 Oct 2016 13:22:47 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-can-i-invoke-an-action-from-another-action/m-p/312527#M265657</guid>
      <dc:creator>bishop_8870</dc:creator>
      <dc:date>2016-10-14T13:22:47Z</dc:date>
    </item>
    <item>
      <title>Re: How can I invoke an action from another action?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-can-i-invoke-an-action-from-another-action/m-p/312528#M265658</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;by action you mean an action that is being run upon a configured folder-rule?&lt;/P&gt;&lt;P&gt;you can run a script at the end of execution of a rule. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Oct 2016 15:08:27 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-can-i-invoke-an-action-from-another-action/m-p/312528#M265658</guid>
      <dc:creator>mrks_js1</dc:creator>
      <dc:date>2016-10-14T15:08:27Z</dc:date>
    </item>
    <item>
      <title>Re: How can I invoke an action from another action?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-can-i-invoke-an-action-from-another-action/m-p/312529#M265659</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Some additional specifics, such as where you are executing the action, what language you wrote the action in, etc., would be helpful, as well as what you have tried so far and any problems you've run into.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But, I will answer assuming you are talking about a rule action. One way to execute any number of actions from a rule is to configure your rule to execute JavaScript. Then, from JavaScript you can invoke as many actions you want on any objects you want.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's a little JavaScript snippet I pulled from the docs that shows how to execute an action from JavaScript:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="java" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14764786047307057 jive_text_macro" data-hasrefreshed="true" data-renderedposition="215.60000610351562_8_1332_64" jivemacro_uid="_14764786047307057"&gt;&lt;P&gt;&lt;SPAN class="kwd"&gt;var&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; myCopyAction &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; actions&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;create&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;(&lt;/SPAN&gt;&lt;SPAN class="str"&gt;"my-copy-action"&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;);&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;&lt;BR /&gt;myCopyAction&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;parameters&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;[&lt;/SPAN&gt;&lt;SPAN class="str"&gt;"destination_folder"&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;]&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; companyhome&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;;&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;&lt;BR /&gt;myCopyAction&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;parameters&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;[&lt;/SPAN&gt;&lt;SPAN class="str"&gt;"destination_name"&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;]&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; &lt;/SPAN&gt;&lt;SPAN class="str"&gt;"Copy of "&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;+&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; document&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;name&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;;&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;&lt;BR /&gt;myCopyAction&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;execute&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;document&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this case, the "document" variable is automatically populated by Alfresco when it invokes the rule. But you could do a search to get another object or whatever you need to, then you could set up as many actions as you want and call execute on those objects.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Oct 2016 20:57:58 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-can-i-invoke-an-action-from-another-action/m-p/312529#M265659</guid>
      <dc:creator>jpotts</dc:creator>
      <dc:date>2016-10-14T20:57:58Z</dc:date>
    </item>
  </channel>
</rss>

