<?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>Query Rules vs a!queryEntity</title><link>https://community.appian.com/discussions/f/rules/19315/query-rules-vs-a-queryentity</link><description>We are a cloud customer and have recently been experiencing data connection time out errors. When this occurs, we have to manually restart the node where the disruption occurred. As a result it often results in duplicate tasks. So far that hasn&amp;#39;t been</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Query Rules vs a!queryEntity</title><link>https://community.appian.com/thread/75562?ContentTypeID=1</link><pubDate>Fri, 24 Jul 2020 15:25:00 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:37bcad22-940b-461c-a361-263ef1d9dc16</guid><dc:creator>judym598</dc:creator><description>&lt;p&gt;Got it now - that makes sense as far as the new Expression Rule wrapper. As to the data falloff - I&amp;#39;ve done that with some of our view definitions, but will definitely take another look. Thanks so much for your help!&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Query Rules vs a!queryEntity</title><link>https://community.appian.com/thread/75561?ContentTypeID=1</link><pubDate>Fri, 24 Jul 2020 15:14:21 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:91f80133-6c88-4497-9848-afb2824069de</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;The reasoning behind expression rule wrappers around all legacy query rules is, basically, you could reduce your dependence on the legacy objects to nothing other than the expression rules calling them (instead of hardcoded into process models / process instances / forms / etc), in a manner that would basically allow you to quickly do 1:1 replacements of the QR call with its new Expression Rule wrapper, save and deploy.&amp;nbsp; Then when you&amp;#39;re ready to replace a particular QR or set of related QRs, you don&amp;#39;t need to hunt down all old places that used it, or worry (as much) about whether you&amp;#39;ll be breaking a running process instance.&lt;/p&gt;
&lt;p&gt;For the &amp;quot;data falloff&amp;quot; I mentioned - if you have a view that scales up in size with the growth of production data, filtering (regardless of which query you use) won&amp;#39;t help; even pulling back a single row directly from the database can grow super slow when a view is allowed to grow unbounded.&amp;nbsp; The only thing that noticeably helps with this (in my experience, and as an admitted SQL novice) is filtering &lt;em&gt;within the definition of the view itself&lt;/em&gt; - i.e. filtering out all deactivated entries, entries older than X rolling date, etc.&amp;nbsp; This can make the difference between a view that&amp;#39;s pulling back a million entries, versus a view that&amp;#39;s pulling back 10,000 *relevant* entries.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Query Rules vs a!queryEntity</title><link>https://community.appian.com/thread/75558?ContentTypeID=1</link><pubDate>Fri, 24 Jul 2020 14:50:26 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:303e2d50-4ec9-4fec-b0af-99b0f7f0747a</guid><dc:creator>judym598</dc:creator><description>&lt;p&gt;Thanks for your informative response! I only checked a couple instances and some are querying views and others, tables. Some tables contain a LOT of data - 2 million rows, in some cases, so changing those query rules should definitely make a difference. I&amp;#39;m not sure how to address &amp;#39; whether a data fallout can be added&amp;#39; as you mentioned above. I thought&amp;nbsp;we had that covered with the filters, but evidently with the old query rules - that won&amp;#39;t help. Not sure how creating expression rule wrappers around the old QRs would help unless your thought here is to make those expression rules stand out as ones that need to be updated.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Query Rules vs a!queryEntity</title><link>https://community.appian.com/thread/75557?ContentTypeID=1</link><pubDate>Fri, 24 Jul 2020 14:35:25 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:0efcfca4-9692-4bd9-91f4-f6d7b1c172f2</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;In my old longtime project, we began implementaton after Temo was mainstream (thank goodness) but before either SAIL or queryEntity were commonly used (or even present).&amp;nbsp; To wit, we ended up with over 500 legacy query rules in the system.&amp;nbsp; Particularly difficult was that since query rules are not at all flexible, we ended up with dozens upon dozens of nearly identical query rules that differed just by one parameter or something else.&lt;/p&gt;
&lt;p&gt;For yours that are timing out routinely - are they querying from views?&amp;nbsp; The only time I&amp;#39;ve seen consistent in-process query timeout issues was queries which are pulling data back from complex views which look at ever-growing data.&amp;nbsp; The solution to this is multi-pronged, including reassessing the view and its efficiency (and addressing whether a data falloff can be added, i.e. principal items in the view older than X years are no longer included, etc).&amp;nbsp; Additionally, it could help to cherrypick which Query Rules you convert to Query Entities, and finetune those to query efficiently when possible (pulling back only selected columns, a constrained page size, etc).&lt;/p&gt;
&lt;p&gt;A suggestion for your current approach: the transition from Query Rules to queryEntities can be eased by having the QRs abstracted behind an expression rule (where the expression rule has the same inputs as the QR, calls it, and returns the same output).&amp;nbsp; The thinking here is, one of the issues we had on that project was legacy long-life process instances wherein certain breaking query rules were &amp;#39;hardcoded&amp;#39; essentially.&amp;nbsp; In a few places the original rules were wrapped in an expression rule anyway, and in those cases the internal logic of the expression rule could simply be swapped out with the new QE rule call.&amp;nbsp; For other places, we had to phase out the QR calls while making sure to leave the legacy rules sitting around until legacy instances could complete.&lt;/p&gt;
&lt;p&gt;So my current suggestion (if you feel it&amp;#39;s needed) might be: for QRs where you don&amp;#39;t yet have time to develop and test equivalent QE rules, create expression rule wrappers and use those to replace the QRs in all other locations of your processes/forms/etc.&amp;nbsp; With this you could potentially reduce (or eliminate) the legacy instances relying directly on the legacy rules, and then you can take your time with replacing the internal logic of these with new QE logic.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>