Skip to main content



      Home
Home » Archived » Eclipse Process Manager (Stardust) » How to handle Exception in SQL invocation call application(How to handle Exception in SQL invocation call application)
How to handle Exception in SQL invocation call application [message #1714711] Mon, 16 November 2015 02:39 Go to next message
Eclipse UserFriend
How to handle Exception in SQL invocation call application

I am calling a SQL invocation call which is failing so how can I handle it in my model . As when the SQL invocation fails my model is getting interrupted.

Also in their any way for converting model from interrupted state to Active.
Re: How to handle Exception in SQL invocation call application [message #1714715 is a reply to message #1714711] Mon, 16 November 2015 02:57 Go to previous messageGo to next message
Eclipse UserFriend
Hi,
you need to add onException block in your defaultCamelContext

<camelContext ...>
<onException>
<exception>java.lang.RuntimeException</exception>
<handled><constant>true</constant></handled>
</onException>
...
</camelContext>

This will prevent the current transaction to rollback.
then you can use event handler mechanism to catch the error at Process level.

Regards
Re: How to handle Exception in SQL invocation call application [message #1714751 is a reply to message #1714715] Mon, 16 November 2015 07:09 Go to previous messageGo to next message
Eclipse UserFriend
Thanks for the reply.

Can you please provide detail example of it. whole camel which makes a SQL call throguh sql application . where the exception code needs to be added in that call. Please give a sample example or code
Re: How to handle Exception in SQL invocation call application [message #1715204 is a reply to message #1714751] Fri, 20 November 2015 04:09 Go to previous messageGo to next message
Eclipse UserFriend
Hi Patil,

Please find a attached sample model which shows how the error is handled. The model shows how the SQL Application Activity is aborted on error(e.g "org.springframework.jdbc.BadSqlGrammarException" caused due to use of invalid table name)and the error is handled.

You can refer below documentation how to add "Error Boundary Event"

http://help.eclipse.org/mars/index.jsp?topic=%2Forg.eclipse.stardust.docs.analyst%2Fhtml%2Fhandbooks%2Fmodelling_analyst%2Fpep-events.htm&resultof=%22boundary%22%20%22boundari%22%20%22event%22%20

See section Error Boundary Event - Implementation

Best Regards,
Ashish

[Updated on: Fri, 20 November 2015 04:13] by Moderator

Re: How to handle Exception in SQL invocation call application [message #1715273 is a reply to message #1715204] Fri, 20 November 2015 12:48 Go to previous messageGo to next message
Eclipse UserFriend
Thanks Ashish,

I understood your example. But you showing Error to user and If user completes the activity the process will end.

But I don't want the process should end. The person should contact administrator, once the admin fix the SQL issue the person should resubmit the data back to SQL... get success and go for next activity in process.
Re: How to handle Exception in SQL invocation call application [message #1715683 is a reply to message #1715273] Wed, 25 November 2015 04:11 Go to previous messageGo to next message
Eclipse UserFriend
Any update on this?
Re: How to handle Exception in SQL invocation call application [message #1743623 is a reply to message #1715683] Sat, 17 September 2016 04:53 Go to previous messageGo to next message
Eclipse UserFriend
Dear Patil,

Facing the same issue. not able to receive data from database on next activity.

If you got solution kindly share a simple example which uses SQL Invocation.

Thanks.
dev.khatri@hotmail.com

Re: How to handle Exception in SQL invocation call application [message #1744370 is a reply to message #1743623] Mon, 26 September 2016 07:32 Go to previous messageGo to next message
Eclipse UserFriend
Any your requirement cannot be address by looping back into the original activity after the 'clearing' activity?
Re: How to handle Exception in SQL invocation call application [message #1744488 is a reply to message #1743623] Tue, 27 September 2016 08:11 Go to previous messageGo to next message
Eclipse UserFriend
I found solution for retrieve single row data from database in SQL invocation.
Can anybody suggest me how can I retrieve multiple rows
  • Attachment: Model112.xpdl
    (Size: 44.80KB, Downloaded 207 times)

[Updated on: Tue, 27 September 2016 08:16] by Moderator

Re: How to handle Exception in SQL invocation call application [message #1744540 is a reply to message #1744488] Wed, 28 September 2016 00:54 Go to previous message
Eclipse UserFriend
Hello Dev,

Please refer the following documentation which explains the same:

http://help.eclipse.org/mars/topic/org.eclipse.stardust.docs.analyst/html/handbooks/modelling_analyst/applications/sql-application-overlay.htm

Regards,
Ashish
Previous Topic:Call stored procedure using Camel End Point Application
Next Topic:Portal problems on Neon.1
Goto Forum:
  


Current Time: Sun Jun 22 02:39:35 EDT 2025

Powered by FUDForum. Page generated in 0.06760 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top