<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Hello All,  How can we use like java reflexion in SAIL to can call dyn</title><link>https://community.appian.com/discussions/f/general/6464/hello-all-how-can-we-use-like-java-reflexion-in-sail-to-can-call-dyn</link><description>Hello All, How can we use like java reflexion in SAIL to can call dynamically a rule expression or function from a rule expression? For example something like that: invoke(&amp;quot;rule!name&amp;quot;,{param1;param2}) If it&amp;#180;s not ootb is there any plugin to do that? thank</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Hello All,&lt;br /&gt;&lt;br /&gt;How can we use like java reflexion in SAIL to can call dyn</title><link>https://community.appian.com/thread/25352?ContentTypeID=1</link><pubDate>Wed, 09 Dec 2015 10:04:36 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:9ab0cc29-7876-4e5f-a0c7-b377d21ead10</guid><dc:creator>chetany</dc:creator><description>@sikhivahans, the OP knows about passing rule references to other rules/functions as inputs. He wants to know if rather than passing a reference to a rule or function, can we just pass the name of that function or rule and execute it.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hello All,&lt;br /&gt;&lt;br /&gt;How can we use like java reflexion in SAIL to can call dyn</title><link>https://community.appian.com/thread/25331?ContentTypeID=1</link><pubDate>Tue, 08 Dec 2015 23:51:59 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:75075e39-f582-4b38-82c9-c4d542b842fa</guid><dc:creator>sikhivahans</dc:creator><description>If I understand the context correctly, as per my knowledge we can invoke a rule or function by just passing its reference to other rule via it&amp;#39;s rule inputs. And &amp;#39;APN_uiGridTextColumnAuto&amp;#39;, one of the Appian common objects is a classic example for this which has been shown in the attached picture. In this rule, the rule input &amp;#39;formatter&amp;#39;, which is of &amp;#39;Any Type&amp;#39; data type, has the capability to accept a rule or function by reference. Example: rule!APN_uiGridTextColumnAuto(formatter:fn!tostring) or rule!APN_uiGridTextColumnAuto(formatter:rule!myRuleName)&lt;br /&gt;&lt;br /&gt;Feel free to correct me if I am wrong, as I have been thinking that that the possibility of invoking any rule dynamically(as described in the above examples) can&amp;#39;t be denied.&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="/cfs-filesystemfile/__key/communityserver-discussions-components-files/11/APN_5F00_uiGridTextColumnAuto.png"&gt;&lt;img src="/cfs-filesystemfile/__key/communityserver-discussions-components-files/11/APN_5F00_uiGridTextColumnAuto.png" alt=" " /&gt;&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hello All,&lt;br /&gt;&lt;br /&gt;How can we use like java reflexion in SAIL to can call dyn</title><link>https://community.appian.com/thread/25314?ContentTypeID=1</link><pubDate>Tue, 08 Dec 2015 20:31:12 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:864fc440-027b-4e10-84d2-56c43f0b11dd</guid><dc:creator>chetany</dc:creator><description>Hi Alex, I now understand what you meant. You want to pass the function name rather than a reference to the function. As far as I know, there is no OOTB solution for this. But, it can be done via creating custom Appian plugin code. In your Java method you need to take the rule or function name as input and then get the actual function or rule name. There are APIs for getting a rule or constant by name. Refer ContentService class in Appian&amp;#39;s Java API. There are some methods which can return you the rule or function by name. Once you get that function or rule, you can then pass the parameters to it and evaluate it in Java code and return the result.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hello All,&lt;br /&gt;&lt;br /&gt;How can we use like java reflexion in SAIL to can call dyn</title><link>https://community.appian.com/thread/25308?ContentTypeID=1</link><pubDate>Tue, 08 Dec 2015 19:59:08 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b09ae21c-fdb4-4087-88c4-acf93fd3cfb9</guid><dc:creator>alexis gutierrez</dc:creator><description>Thank you Chetany but I know this &amp;quot;part of solution&amp;quot;. I mean part because your solution is dynamic but is not a total reflexion approach. You are not passing the function name but the pointer on this function.&lt;br /&gt;Your solution will be reflexion programming if you will call the function sum like this: rule!TEST_DYNAMICALLY_CALL_RULE(&lt;br /&gt;  &amp;quot;fn!sum&amp;quot;,&lt;br /&gt;  {1,2,3}&lt;br /&gt;)&lt;br /&gt;To be sure that is dynamic : when you click on precedent from the rule that call TEST_DYNAMICALLY_CALL_RULE the function or rule passed in parameter has to be ignored. &lt;br /&gt;So do you know how I can do it?&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hello All,&lt;br /&gt;&lt;br /&gt;How can we use like java reflexion in SAIL to can call dyn</title><link>https://community.appian.com/thread/25298?ContentTypeID=1</link><pubDate>Tue, 08 Dec 2015 16:28:35 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:79650989-1dde-4d00-bc29-cbe2a3d3d642</guid><dc:creator>chetany</dc:creator><description>An example: Create a rule named TEST_DYNAMICALLY_CALL_RULE with input params &amp;#39;ruleOrFunref&amp;#39;(Any Type) and &amp;#39;&amp;#39;params (Number - array)&amp;#39;. Define the rule as: ri!ruleOrFunRef(ri!params).  Now you can call this rule from another rule and pass the function or ruleName. For eg: you can call it like this:  &lt;br /&gt;rule!TEST_DYNAMICALLY_CALL_RULE(&lt;br /&gt;  fn!sum,&lt;br /&gt;  {1,2,3}&lt;br /&gt;).&lt;br /&gt;&lt;br /&gt;So, here we are passing a rule reference to another rule with the parameters required.  This paradigm is quite common in Functional Programming languages(&lt;a href="https://en.wikipedia.org/wiki/Functional_programming)"&gt;en.wikipedia.org/.../Functional_programming)&lt;/a&gt; where a function takes other functions as arguments or returns a function (languages like LISP, JavaScript, Haskell, Clojure etc. support this.) I hope this is exactly what you wanted to know about.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hello All,&lt;br /&gt;&lt;br /&gt;How can we use like java reflexion in SAIL to can call dyn</title><link>https://community.appian.com/thread/25297?ContentTypeID=1</link><pubDate>Tue, 08 Dec 2015 16:18:14 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:3020690d-9cfa-4e40-8959-5f58a59ddf0b</guid><dc:creator>chetany</dc:creator><description>Hi Alex, SAIL does support passing functions(or rules) to other rules or functions. You can create a rule with &amp;quot;AnyType&amp;quot; as a parameter. Then you can pass the ruleName while calling that rule. For more details got through this link:&lt;a href="https://forum.appian.com/suite/help/7.11/Expressions.html#Indirectly_Evaluating_Arguments"&gt;forum.appian.com/.../Expressions.html&lt;/a&gt;&lt;br /&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hello All,&lt;br /&gt;&lt;br /&gt;How can we use like java reflexion in SAIL to can call dyn</title><link>https://community.appian.com/thread/25296?ContentTypeID=1</link><pubDate>Tue, 08 Dec 2015 15:58:27 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b5d490f2-81c9-4468-9e94-9ced800e8239</guid><dc:creator>Rahul Gundu</dc:creator><description>Could you please elaborate your use case&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>