Skip to main content



      Home
Home » Archived » Eclipse Process Manager (Stardust) » How to handle Exception in Rest service call application(How to handle Exception in Rest service call application)
How to handle Exception in Rest service call application [message #1714446] Thu, 12 November 2015 12:26 Go to next message
Eclipse UserFriend
How to handle Exception in Rest service call application

I am calling a rest service which is failing at their end so how can I handle it in my model . As when the service fails my model is getting interrupted.

Also in their any way for converting model from interrupted state to Active.

[Updated on: Thu, 12 November 2015 12:52] by Moderator

Re: How to handle Exception in Rest service call application [message #1714716 is a reply to message #1714446] Mon, 16 November 2015 02:58 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 Rest service call application [message #1714750 is a reply to message #1714716] Mon, 16 November 2015 07:07 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 web service REST post call throguh Rest 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 Rest service call application [message #1715209 is a reply to message #1714750] Fri, 20 November 2015 04:23 Go to previous messageGo to next message
Eclipse UserFriend
Hi Patil,

Please find attached sample model for Exception handling(I/O exception Handled).

Best Regards
Ashish
Re: How to handle Exception in Rest service call application [message #1715270 is a reply to message #1715209] Fri, 20 November 2015 12:35 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 web service issues the person should resubmit the web service data back to service ... get success and go for next activity in process.
Re: How to handle Exception in Rest service call application [message #1715682 is a reply to message #1715270] Wed, 25 November 2015 04:08 Go to previous message
Eclipse UserFriend
Any update on this??
Previous Topic:Problems deploying to Tomcat
Next Topic:Stardust 3.0.1 support for BPMN 2.0
Goto Forum:
  


Current Time: Sun Jun 22 02:47:20 EDT 2025

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

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

Back to the top