<?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>Catch &amp;quot;Write to Database&amp;quot; Smart Service exceptions</title><link>https://community.appian.com/discussions/f/general/8241/catch-write-to-database-smart-service-exceptions</link><description>Hi, All: I have a question about exception thrown by write to db smart service: Is there any way to catch the exception(any db transaction exception) so that to handle it gracefully like bypassing following nodes to end the whole process instance. We</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Catch "Write to Database" Smart Service exceptions</title><link>https://community.appian.com/thread/34661?ContentTypeID=1</link><pubDate>Thu, 18 Aug 2016 20:19:16 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c86550e7-b991-414b-bad1-9ac73db71d29</guid><dc:creator>senthilar</dc:creator><description>Just a variation of what andrewg has mentioned, &lt;br /&gt;1) Wrap your smart service within a sub-process. &lt;br /&gt;2) Add an (timer based) exception flow to that sub-process. &lt;br /&gt;&lt;br /&gt;If there is an error in the smart service, the sub-process would get hung-up and the exception flow would be taken. That way your process could become aware of an exception. You could also add error notifications to this exception path.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Catch "Write to Database" Smart Service exceptions</title><link>https://community.appian.com/thread/34628?ContentTypeID=1</link><pubDate>Wed, 17 Aug 2016 20:13:01 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:57d556d7-5627-416f-aa8a-4c9d5fe1de51</guid><dc:creator>Andrew P Gramann</dc:creator><description>A few things:&lt;br /&gt;&lt;br /&gt;1) Most DB transaction errors are predictable, so your design should be able to avoid most error scenarios before activating the DB write.&lt;br /&gt;&lt;br /&gt;2) It&amp;#39;s not perfect, but you can infer an exception using a timer.  For instance, activate a node scheduled to execute 10 minutes from when it is reached at the same time you activate your DB write.  Cancel the time node if your DB write finishes successfully.  If the 10 minutes is reached, there was probably an error and you can have your process route to your error logic.  Note that this will not work if you need to chain the user to a subsequent form.&lt;br /&gt;&lt;br /&gt;3) If you can make your logic work in SAIL, the new smart service functions (including write to data store) have some built in error handling capabilities.  Check the documentation for more info.&lt;br /&gt;&lt;br /&gt;Hope that helps.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Catch "Write to Database" Smart Service exceptions</title><link>https://community.appian.com/thread/34625?ContentTypeID=1</link><pubDate>Wed, 17 Aug 2016 19:38:36 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:79ff029f-c90a-49da-ba2e-2d0afb079d6c</guid><dc:creator>yaminw</dc:creator><description>Thanks for the response. But my specific is that in case of exception, I need to branch out to end event so I need to find out if there is an exception on db node. I just wonder how to catch that or is there a way to find that. thanks&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Catch "Write to Database" Smart Service exceptions</title><link>https://community.appian.com/thread/34623?ContentTypeID=1</link><pubDate>Wed, 17 Aug 2016 19:14:30 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:12de826e-9018-43c2-9123-d9adfc7a1f29</guid><dc:creator>janakik</dc:creator><description>Always the best design would be having the DB nodes as a subprocess in Asynchronous mode, Unless you don&amp;#39;t require the sequence id in the process which is generated from the Write to DB node.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>