<?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: Call external class by javascript in rules of folder in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/call-external-class-by-javascript-in-rules-of-folder/m-p/13606#M6019</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Jeff.&lt;/P&gt;&lt;P&gt;Very &lt;SPAN class="" lang="en"&gt;&lt;SPAN class=""&gt;helpful and helped a lot.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" lang="en"&gt;&lt;SPAN class=""&gt;BS&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 14 Dec 2017 12:32:09 GMT</pubDate>
    <dc:creator>marcog</dc:creator>
    <dc:date>2017-12-14T12:32:09Z</dc:date>
    <item>
      <title>Call external class by javascript in rules of folder</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/call-external-class-by-javascript-in-rules-of-folder/m-p/13602#M6015</link>
      <description>I need to call an external class when an update is made to the document in the folder. The rule will execute a javascript.I would like to know or read about how to make this class call by javascript.If it is possible?Can someone help me?</description>
      <pubDate>Tue, 12 Dec 2017 18:54:55 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/call-external-class-by-javascript-in-rules-of-folder/m-p/13602#M6015</guid>
      <dc:creator>marcog</dc:creator>
      <dc:date>2017-12-12T18:54:55Z</dc:date>
    </item>
    <item>
      <title>Re: Call external class by javascript in rules of folder</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/call-external-class-by-javascript-in-rules-of-folder/m-p/13603#M6016</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Folder rules can invoke Java classes that are instances of ActionExecuterAbstractBase. That means you can write your own Java class and make a call to any other class on the classpath.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Folder rules can also execute JavaScript. That's because there is a Java class that extends ActionExecuterAbstractBase that knows how to run JavaScript.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, your first option is to write a Java class, extend ActionExecuterBase, and call your class from there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But you said you want to call JavaScript and your JavaScript is going to call a class. That's kind of "the long way around" but it's perfectly fine. In that case, you'll need to write a Java class that is a scope processor extension. Basically it just exposes your Java class to JavaScript. That class can call the other Java class that is on the classpath, and because it is a scope processor extension, it will be exposed as a root variable in Alfresco's server-side JavaScript.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All that's left to do at that point is set up your folder rule, use the "Execute Script" action, and point to your server-side JavaScript that makes the call to your new root variable.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Dec 2017 19:41:09 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/call-external-class-by-javascript-in-rules-of-folder/m-p/13603#M6016</guid>
      <dc:creator>jpotts</dc:creator>
      <dc:date>2017-12-12T19:41:09Z</dc:date>
    </item>
    <item>
      <title>Re: Call external class by javascript in rules of folder</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/call-external-class-by-javascript-in-rules-of-folder/m-p/13604#M6017</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN class="" lang="en"&gt;&lt;SPAN class=""&gt;Many thanks Jeff.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" lang="en"&gt;&lt;SPAN class=""&gt;Would you have any examples or reference books for me to take as a basis?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;For I am extremely new to this scenario.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" lang="en"&gt;&lt;SPAN class=""&gt;Thanks&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Dec 2017 11:43:14 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/call-external-class-by-javascript-in-rules-of-folder/m-p/13604#M6017</guid>
      <dc:creator>marcog</dc:creator>
      <dc:date>2017-12-13T11:43:14Z</dc:date>
    </item>
    <item>
      <title>Re: Call external class by javascript in rules of folder</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/call-external-class-by-javascript-in-rules-of-folder/m-p/13605#M6018</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My &lt;A href="https://ecmarchitect.com/alfresco-developer-series-tutorials/actions/tutorial/tutorial.html" rel="nofollow noopener noreferrer"&gt;actions tutorial&lt;/A&gt; shows how to write an action, but I do not show how to do the processor extension.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, the &lt;A href="https://github.com/Conexiam/alfresco-acl-templates" rel="nofollow noopener noreferrer"&gt;ACL Templates add-on&lt;/A&gt; that I maintain on behalf of one of my clients has an example of this. The &lt;A href="https://github.com/Conexiam/alfresco-acl-templates/blob/master/acl-templates-repo/src/main/java/com/conexiam/acl/templates/service/AclTemplateServiceScopedObject.java" rel="nofollow noopener noreferrer"&gt;AclTemplateServiceScopedObject &lt;/A&gt;class exposes the Java-based ACL Template Service to JavaScript.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Dec 2017 19:37:37 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/call-external-class-by-javascript-in-rules-of-folder/m-p/13605#M6018</guid>
      <dc:creator>jpotts</dc:creator>
      <dc:date>2017-12-13T19:37:37Z</dc:date>
    </item>
    <item>
      <title>Re: Call external class by javascript in rules of folder</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/call-external-class-by-javascript-in-rules-of-folder/m-p/13606#M6019</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Jeff.&lt;/P&gt;&lt;P&gt;Very &lt;SPAN class="" lang="en"&gt;&lt;SPAN class=""&gt;helpful and helped a lot.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" lang="en"&gt;&lt;SPAN class=""&gt;BS&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Dec 2017 12:32:09 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/call-external-class-by-javascript-in-rules-of-folder/m-p/13606#M6019</guid>
      <dc:creator>marcog</dc:creator>
      <dc:date>2017-12-14T12:32:09Z</dc:date>
    </item>
  </channel>
</rss>

