<?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>Dynamically executing an expression rule by retrieving the rule name from DB</title><link>https://community.appian.com/discussions/f/general/29233/dynamically-executing-an-expression-rule-by-retrieving-the-rule-name-from-db</link><description>Hi Team, 
 I have a requirement to execute an expression rule by retrieving the rule name from the database. To provide a background on the ask: We have a landing page where tasks from various other applications/line of business is displayed. So every</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Dynamically executing an expression rule by retrieving the rule name from DB</title><link>https://community.appian.com/thread/136588?ContentTypeID=1</link><pubDate>Sun, 09 Jun 2024 20:31:31 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:94050268-3f4e-4980-96ff-85e0a285058e</guid><dc:creator>ashwing</dc:creator><description>&lt;p&gt;Hi! Can you please elaborate on this?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Dynamically executing an expression rule by retrieving the rule name from DB</title><link>https://community.appian.com/thread/115925?ContentTypeID=1</link><pubDate>Mon, 10 Jul 2023 12:51:48 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:321bc14c-6d87-4a8f-86cf-8ebecb0be849</guid><dc:creator>Mathieu Drouin</dc:creator><description>&lt;p&gt;For those wondering, here&amp;#39;s an example of what I meant using the apply function in combination with the getrulereferencebyname in the Content Tools plugin.&lt;/p&gt;
&lt;p&gt;Again, I don&amp;#39;t recommend this approach as it becomes very difficult to find dependencies in your application and troubleshooting becomes difficult. The API approach is more robust IMO.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  apply(getrulereferencebyname(&amp;quot;S_DynamicRule&amp;quot;), {&amp;quot;&amp;quot;})
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Dynamically executing an expression rule by retrieving the rule name from DB</title><link>https://community.appian.com/thread/115923?ContentTypeID=1</link><pubDate>Mon, 10 Jul 2023 12:16:12 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:93da96e5-3e13-4fdd-857b-59bcbf0a429b</guid><dc:creator>Mathieu Drouin</dc:creator><description>&lt;p&gt;Interesting. Care to elaborate?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Dynamically executing an expression rule by retrieving the rule name from DB</title><link>https://community.appian.com/thread/115919?ContentTypeID=1</link><pubDate>Mon, 10 Jul 2023 11:51:28 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:a99fcddf-44dc-4123-a13f-b43ccd2a878d</guid><dc:creator>Arka.Maity</dc:creator><description>&lt;p&gt;Not required to use apply function&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Dynamically executing an expression rule by retrieving the rule name from DB</title><link>https://community.appian.com/thread/115903?ContentTypeID=1</link><pubDate>Mon, 10 Jul 2023 09:42:25 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:272ccfc2-7cb9-431a-829c-72792329466f</guid><dc:creator>Mathieu Drouin</dc:creator><description>&lt;p&gt;Yeah as I mentioned earlier, it is possible to do with the apply function.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://docs.appian.com/suite/help/23.2/fnc_looping_apply.html"&gt;docs.appian.com/.../fnc_looping_apply.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Though I do get the impression that Appian may want us to move away from using this function given the blurb they put at the too strongly suggesting to use forEach instead.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Dynamically executing an expression rule by retrieving the rule name from DB</title><link>https://community.appian.com/thread/115888?ContentTypeID=1</link><pubDate>Mon, 10 Jul 2023 07:26:25 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:fc07ffe7-dbc2-407e-8ec8-a51237e6309d</guid><dc:creator>Arka.Maity</dc:creator><description>&lt;p&gt;Hi Actually you can execute the rule by its UUID/Name.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Dynamically executing an expression rule by retrieving the rule name from DB</title><link>https://community.appian.com/thread/115724?ContentTypeID=1</link><pubDate>Thu, 06 Jul 2023 13:34:19 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:7025fdd0-4c3c-4562-840d-d01b20e0a7ae</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;You can get a rule name by its UUID via the &amp;quot;getContentDetailsByUUID&amp;quot; rule found in a particular plug-in (probably Content Tools).&amp;nbsp; However that doesn&amp;#39;t change the fact that, as far as I know, there&amp;#39;s no supported way to execute an expression rule by its name.&amp;nbsp; &lt;em&gt;(edit: Mathieu mentions below that the function &amp;quot;getrulereferencebyname&amp;quot; can do this.&amp;nbsp; however as noted, this is cumbersome and confusing to use, and relies on old / potentially-deprecated features.)&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;This is why Mathieu raised the idea yesterday of executing Web API calls - because for these it&amp;#39;s trivially easy to execute a call based on just the result of a string look-up (the API endpoint name is already just a string), and the other end of the API call can be paired to a Web API that points to its own expression rule (so if each person makes an expression rule for themselves, they&amp;#39;d also make a Web API object that calls it, and requires certain universal parameters that you enforce).&amp;nbsp; Thus you&amp;#39;d just store the Endpoint Name in the DB.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Dynamically executing an expression rule by retrieving the rule name from DB</title><link>https://community.appian.com/thread/115720?ContentTypeID=1</link><pubDate>Thu, 06 Jul 2023 13:03:40 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:a32aafa5-d24e-415d-ace9-731b141112b5</guid><dc:creator>Nandini Devi Balakrishnan</dc:creator><description>&lt;p&gt;&lt;span&gt;Is there any way to&amp;nbsp;execute an expression rule by its UUID/Name. The UUID/Name of the rules to be executed will be saved in the DB, during the runtime the system should read the UUID/Name and execute the rule corresponding to it.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Dynamically executing an expression rule by retrieving the rule name from DB</title><link>https://community.appian.com/thread/115654?ContentTypeID=1</link><pubDate>Wed, 05 Jul 2023 16:31:41 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:fd14d238-7cb5-41aa-af98-1f0e4888a20d</guid><dc:creator>Mathieu Drouin</dc:creator><description>&lt;p&gt;Not much different than if you were calling an external API.&lt;/p&gt;
&lt;p&gt;You just expose a Web API and create an Connected System + Integration to consume it.&lt;/p&gt;
&lt;p&gt;Maybe this can help: &lt;a href="https://docs.appian.com/suite/help/23.2/Designing_Web_APIs.html"&gt;docs.appian.com/.../Designing_Web_APIs.html&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Dynamically executing an expression rule by retrieving the rule name from DB</title><link>https://community.appian.com/thread/115653?ContentTypeID=1</link><pubDate>Wed, 05 Jul 2023 16:29:12 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:6b6f601c-1bf9-4ad6-9a92-a5aaeea506f7</guid><dc:creator>Nandini Devi Balakrishnan</dc:creator><description>&lt;p&gt;Thanks for the suggestion. One quick question though, how do you call an Web API from within Appian and how to handle authentications when the call is made from Appian&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Dynamically executing an expression rule by retrieving the rule name from DB</title><link>https://community.appian.com/thread/115651?ContentTypeID=1</link><pubDate>Wed, 05 Jul 2023 16:21:28 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:619b4c34-f041-49d8-859d-271d1535ad57</guid><dc:creator>Mathieu Drouin</dc:creator><description>&lt;p&gt;You can try to use the apply function. But I don&amp;#39;t really recommend it.&lt;/p&gt;
&lt;p&gt;If you want to avoid dependencies I think the best approach would be to have each app expose a Web API for the tasks and basically just call those APIs.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>