<?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>How to handle concurency and atomic DB actions</title><link>https://community.appian.com/discussions/f/data/24088/how-to-handle-concurency-and-atomic-db-actions</link><description>Hi, 
 I&amp;#39;m looking a reliable way to deal with concurrent DB access. So I have few questions. 
 First, I would need to use many sequences (like Oracle) for a same table. So I&amp;#39;ve created a &amp;quot;counter&amp;quot; table to handle this : 
 Now I have a &amp;quot;contract&amp;quot; table</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: How to handle concurency and atomic DB actions</title><link>https://community.appian.com/thread/92840?ContentTypeID=1</link><pubDate>Mon, 28 Mar 2022 07:12:58 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:a20c8bfc-f801-4953-aa15-079fa1604305</guid><dc:creator>cedric02</dc:creator><description>&lt;p&gt;Thank you Stefan, maybe I&amp;nbsp;have to make some concurrency tests, to see how Appian deals with this kind of stored procedure.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to handle concurency and atomic DB actions</title><link>https://community.appian.com/thread/92836?ContentTypeID=1</link><pubDate>Mon, 28 Mar 2022 07:00:15 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:af4858a8-48dd-46ca-ad53-139f560dfd6e</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;Appian does not know about any concurrency in process models. I do not have any good ideas, but this seems like a problem to be solved inside the database.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to handle concurency and atomic DB actions</title><link>https://community.appian.com/thread/92835?ContentTypeID=1</link><pubDate>Mon, 28 Mar 2022 06:55:40 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4876495e-fb24-45d5-9d10-0b3fecac28e5</guid><dc:creator>cedric02</dc:creator><description>&lt;p&gt;Yes I&amp;#39;ve verified, our Appian DB&amp;nbsp;is set in AUTO COMMIT mode.&lt;br /&gt;&lt;br /&gt;- If my stored Proc, does just this :&amp;nbsp;SELECT Counter, UPDATE contract,&amp;nbsp;UPDATE Counter,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m afraid that 2 different contracts may stored an&amp;nbsp;identical &amp;quot;sequence_number&amp;quot;.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;- So I was thinking about using &amp;quot;SELECT FOR UPDATE&amp;quot; command to book the counter.&lt;/p&gt;
&lt;p&gt;In that&amp;nbsp;case, I wast asking me how would an Appian process would act ?&lt;/p&gt;
&lt;p&gt;Does the concurrent process will wait for this resource (and retry?) ?&lt;/p&gt;
&lt;p&gt;Does it would throw an error ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to handle concurency and atomic DB actions</title><link>https://community.appian.com/thread/92832?ContentTypeID=1</link><pubDate>Mon, 28 Mar 2022 06:43:50 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:cfcef8b1-dfab-47d4-af76-4f2f7ae7f242</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;When calling a stored procedure, I assume that Appian will not do any transaction control. This makes only sense for simple inserts and updates.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to handle concurency and atomic DB actions</title><link>https://community.appian.com/thread/92831?ContentTypeID=1</link><pubDate>Mon, 28 Mar 2022 06:41:29 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:6aaa5f23-02b1-4852-a92d-e270aacde1aa</guid><dc:creator>cedric02</dc:creator><description>&lt;p&gt;Hi Stefan,&lt;br /&gt;Yes it was the first solution I&amp;#39;ve suggested above (PL/SQL)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to handle concurency and atomic DB actions</title><link>https://community.appian.com/thread/92819?ContentTypeID=1</link><pubDate>Sun, 27 Mar 2022 19:18:10 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:63cc7137-aeb4-41db-9e71-4326efab7163</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;You have some interesting requirements here. Did you think about a stored procedure?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>