<?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>pessimistic logic</title><link>https://community.appian.com/discussions/f/new-to-appian/18710/pessimistic-logic</link><description>to implement the pessimistic locking how to identify/know the data base table is locked or not?</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: pessimistic logic</title><link>https://community.appian.com/thread/122326?ContentTypeID=1</link><pubDate>Tue, 28 Nov 2023 08:43:01 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:56ae62d7-4ca6-4198-a464-18254859a3b6</guid><dc:creator>Stewart Burchell</dc:creator><description>&lt;p&gt;There is a solution for this in the AppMarket:&amp;nbsp;&lt;a href="https://community.appian.com/b/appmarket/posts/pessimistic-locking"&gt;community.appian.com/.../pessimistic-locking&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pessimistic logic</title><link>https://community.appian.com/thread/122322?ContentTypeID=1</link><pubDate>Tue, 28 Nov 2023 07:55:33 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:6218c12c-b51f-4a2d-b2d3-70ce71329c72</guid><dc:creator>yashig2399</dc:creator><description>&lt;p&gt;I need to implement pessimistic locking in my process model. can you share what is implemented for locking?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pessimistic logic</title><link>https://community.appian.com/thread/89135?ContentTypeID=1</link><pubDate>Thu, 16 Dec 2021 08:51:20 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4baa51a6-5734-4a51-bf1e-ae2195bfa043</guid><dc:creator>Stewart Burchell</dc:creator><description>&lt;p&gt;This is how I originally implemented pessimistic locking and for the most part this works...except...there is a small window of opportunity where two users can run the same related action because they hit it at the same time and the data hasn&amp;#39;t yet been replicated/stored where the process report accesses it. In short: it&amp;#39;s not a fool-proof method.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;One of my colleagues has &lt;a href="/b/appmarket/posts/pessimistic-locking"&gt;written a utility&lt;/a&gt;&amp;nbsp;that closes this gap and delivers a robust pessimistic locking solution.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pessimistic logic</title><link>https://community.appian.com/thread/89133?ContentTypeID=1</link><pubDate>Thu, 16 Dec 2021 07:51:54 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:822fa47c-3930-4a62-a287-1daf8a2fc38a</guid><dc:creator>mounikak0002</dc:creator><description>&lt;p&gt;yes, I want to protect related actions for multiple executions??&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pessimistic logic</title><link>https://community.appian.com/thread/89132?ContentTypeID=1</link><pubDate>Thu, 16 Dec 2021 07:29:33 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:7355d8ba-4df3-4788-94be-c4d1365dce19</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;Appian is pretty good in keeping track of process activity. Using a process report, you can easily detect any other active instances. Display that to the user and disable the submit button.&lt;/p&gt;
&lt;p&gt;Then you do not need to implement any locking in DB which has its drawbacks as check-lock and set-lock is not a single atomic transaction. Two processes checking at the same time will collide.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pessimistic logic</title><link>https://community.appian.com/thread/89113?ContentTypeID=1</link><pubDate>Wed, 15 Dec 2021 20:34:22 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4ceb7971-931a-4621-9c71-4df216da49c6</guid><dc:creator>davel001150</dc:creator><description>&lt;p&gt;Yes!&amp;nbsp; This makes me realize exactly how to phrase what I intend to phrase.&amp;nbsp; Thank you, Stefan.&lt;/p&gt;
&lt;p&gt;Every single implementation of pessimistic locking has to be unique to the particulars of the thing you&amp;#39;re trying to pessimistically lock, and both what and who you&amp;#39;re trying to lock it from.&amp;nbsp; They all have to be different based on your specific goals.&lt;/p&gt;
&lt;p&gt;My solution: A.&amp;nbsp; Is protected by a Non Disclosure Agreement&amp;nbsp; B.&amp;nbsp; Is too highly technical for me to go into absolutely all the particulars here if I could&amp;nbsp; C.&amp;nbsp; Even if I could remember all of them precisely&amp;nbsp; D.&amp;nbsp; Would therefore be more difficult than making your own even if I could tell you every detail, and finally E. Wouldn&amp;#39;t even work for your situation if you&amp;nbsp;could copy it exactly.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pessimistic logic</title><link>https://community.appian.com/thread/89105?ContentTypeID=1</link><pubDate>Wed, 15 Dec 2021 18:27:05 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4a3c82d8-502c-4848-9fd3-c44054d68d3e</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;What do you want to achieve? Protecting a record from multiple executions of related actions?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pessimistic logic</title><link>https://community.appian.com/thread/89104?ContentTypeID=1</link><pubDate>Wed, 15 Dec 2021 17:29:36 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b4e73033-580d-4f4b-8776-458222dee04b</guid><dc:creator>priyankabandi</dc:creator><description>&lt;p&gt;Can you please share what you have implemented for locking?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pessimistic logic</title><link>https://community.appian.com/thread/73664?ContentTypeID=1</link><pubDate>Wed, 29 Apr 2020 06:22:08 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f768eadc-4df3-4936-b6b5-3cb41b170ed6</guid><dc:creator>ramakg</dc:creator><description>&lt;p&gt;Thank you for advice&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pessimistic logic</title><link>https://community.appian.com/thread/73661?ContentTypeID=1</link><pubDate>Tue, 28 Apr 2020 20:06:29 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:e180f308-cb28-4000-9a3a-227607788aed</guid><dc:creator>davel001150</dc:creator><description>&lt;p&gt;You add a boolean or equivalent &amp;quot;locked&amp;quot; column to the database table that stores your record, or that is linked in some way to your record.&amp;nbsp; You can also include a timestamp and user identification, but those aren&amp;#39;t strictly required for it to work.&lt;/p&gt;
&lt;p&gt;When a user attempts to start an action that could edit the record, you first query the lock.&amp;nbsp; If it&amp;#39;s set to true, you inform the user that you&amp;#39;re so sorry they&amp;#39;re not allowed to use it now.&amp;nbsp; If it is set to false, you let the user continue their action, and the very first thing you do is set the locked column to true.&lt;/p&gt;
&lt;p&gt;The very last thing your process does after all work on whatever action is complete is to set the lock back to false.&lt;/p&gt;
&lt;p&gt;On the surface it&amp;#39;s very easy.&amp;nbsp; The difficult part is robustly handling all the various different forms of edge cases, such as abandoned processes not permanently locking all users out of a particular record, and other extraneous bits you have to account for when making your solution.&amp;nbsp; But a rudimentary system to get you going isn&amp;#39;t much beyond what I described above.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>