<?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>Need to conditionally display section only on successful a!queryEntity results</title><link>https://community.appian.com/discussions/f/user-interface/12890/need-to-conditionally-display-section-only-on-successful-a-queryentity-results</link><description>I have an application database that is unreliable in its availability. The UI rule that calls the expression rule works great when the db is available, but fails often with the message Expression evaluation error at function a!queryEntity [line 38]: An</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Need to conditionally display section only on successful a!queryEntity results</title><link>https://community.appian.com/thread/57900?ContentTypeID=1</link><pubDate>Thu, 12 Jul 2018 21:39:19 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:05d06448-3dce-4a4e-b198-559c16bc4100</guid><dc:creator>bradc</dc:creator><description>&lt;p&gt;Here is the application in 18.2 to import and review for those who may be interested.&amp;nbsp; The Query Database smart service will need to be updated to ping the database you&amp;#39;re monitoring.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://community.appian.com/cfs-file/__key/communityserver-discussions-components-files/13/DB-Connection-Checker.zip"&gt;community.appian.com/.../DB-Connection-Checker.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Need to conditionally display section only on successful a!queryEntity results</title><link>https://community.appian.com/thread/57899?ContentTypeID=1</link><pubDate>Thu, 12 Jul 2018 20:57:11 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:be988aa5-c74e-470a-a44a-b55954862464</guid><dc:creator>waynef</dc:creator><description>Yes, I would like to give this a try.  That db is so unstable I need to be able to prevent application trouble tickets when it isn&amp;#39;t operational since it is just used for additional details in a grid.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Need to conditionally display section only on successful a!queryEntity results</title><link>https://community.appian.com/thread/57898?ContentTypeID=1</link><pubDate>Thu, 12 Jul 2018 20:47:27 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:fb162abb-8490-4131-a0c0-44a9de7edd60</guid><dc:creator>bradc</dc:creator><description>Hi Wayne,&lt;br /&gt;
&lt;br /&gt;
I actually did #4 a while back, but I&amp;#39;m sure it can be improved upon.  I basically had a process always running that would ping a table in the specified database and if the ping was not successful after 10 seconds, a constant was set to False to indicate the connection was currently down, otherwise the constant would remain as True.  &lt;br /&gt;
&lt;br /&gt;
With this process constatly running, you would then be able to use the constant in and if() statement as @chetany indicated above.&lt;br /&gt;
&lt;br /&gt;
If you&amp;#39;re interested, I can package up the process I used and you can modify as you see fit,&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Need to conditionally display section only on successful a!queryEntity results</title><link>https://community.appian.com/thread/57897?ContentTypeID=1</link><pubDate>Thu, 12 Jul 2018 20:01:46 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:81089608-aefd-447f-9143-42fa9b324782</guid><dc:creator>waynef</dc:creator><description>Good explanations and I agree with it all.  I was hoping someone had accomplished #4 on your list.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Need to conditionally display section only on successful a!queryEntity results</title><link>https://community.appian.com/thread/57895?ContentTypeID=1</link><pubDate>Thu, 12 Jul 2018 19:03:58 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:52cafe44-3758-44fa-988f-001bd4375d0d</guid><dc:creator>chetany</dc:creator><description>The OP mentions that the rule is working fine when DB connection is available. But fails when the DB is not running. The error that the OP is getting is  not due to some timeout. The error can indicate any number of possible things - database may not be running, query maybe incorrect, table may not exists so on.&lt;br /&gt;
&lt;br /&gt;
In this case however, OP has mentioned that the error is coming when the database connection is not available. Increasing the database timeout is not going to help in this case.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Need to conditionally display section only on successful a!queryEntity results</title><link>https://community.appian.com/thread/57893?ContentTypeID=1</link><pubDate>Thu, 12 Jul 2018 17:31:56 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:14380a51-01bc-4fb4-90b1-830502f04b66</guid><dc:creator>ashish kanchi</dc:creator><description>An error occurred while retrieving the data : You&amp;#39;d usually get this when there is time out when retreiving data from DB &lt;br /&gt;
In appian-mysql-ds.xml file - try modifying &amp;lt;timeout&amp;gt; and increase {not suggested though}.&lt;br /&gt;
My suggestion is to probable create a view or increase the performance of the table of the query&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Need to conditionally display section only on successful a!queryEntity results</title><link>https://community.appian.com/thread/57891?ContentTypeID=1</link><pubDate>Thu, 12 Jul 2018 17:12:04 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:dce6ec86-7995-42f8-881c-1e7e785e767b</guid><dc:creator>chetany</dc:creator><description>1. There is no exception handling mechanism in SAIL. &lt;br /&gt;
2. So developers rely on doing the checks in if(). And checking for null, empty output from SAIL expression evaluation.&lt;br /&gt;
3. The above is an error because when database connection is not available, SAIL expr. evaluation fails. Catching this exception is somethings that we would do in a traditional programming language.&lt;br /&gt;
4. If we had some function to check if the datastore connection is available - we could wrap this in a if() and avoid the exception on the UI. Technically the above error is an exception and Appian stops the SAIL evaluation immediately. The only way I see we can handle such scenario is by creating some external webservice/ping the database hostname:port to find if its running. Frankly - that is too much of effort.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>