I am working on 7.5.1 BPM environment. I have to do an exception handling in an Ajax service.
In the Ajax service I have used an SQL execute Statement which fetches some data from the DB2 database table. I have attached a catch event to this activity.
My problem is that, this catch event does not catch every exception.
For example, In db2 table column there is a square like character □. When I try to fetch this character from a db2 table column I get an exception as follows:
com.lombardisoftware.core.TeamWorksException: The data "□" is not legal for a JDOM character content: 0x1a is not a legal XML character.
The catch event fails to catch this exception.
The catch event should catch it so that I can handle it later.
Does any one have any idea of such a behavior of catch event?
For more understanding I have attached the picture of the Ajax service.
This topic has been locked.
2 replies Latest Post - 2012-10-17T05:49:18Z by PriyankafromPSL
Pinned topic Catch event does not catch every exception thrown by a service
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2012-10-17T05:49:18Z at 2012-10-17T05:49:18Z by PriyankafromPSL
SystemAdmin 110000D4XK7615 PostsACCEPTED ANSWER
Re: Catch event does not catch every exception thrown by a service2012-10-12T19:39:34Z in response to PriyankafromPSLThere are several errors that the error handlers do not catch properly. I hadn't heard of your use case, but another is null pointer exceptions an yet another is attempting to assign a task to a user that doesn't exist. For the ones that I have seen what we usually wind up doing is writting code to ensure that you check for the error condition prior to making the call that might throw that error. Meaning for null, check the object before using it. For user assignment, use the JS-API to see fi the user exists.
For your problem you could write a query that would look to see if that value would be returned by a subsequent query and follow your planned error path if it happens. Likely the item you are seeing is actually a piece of binary data, which cannot be represented in XML/JDOM without doing some encoding. If that column is always going to be either a null or binary, just drop it from the query...
It would be nice if the exception handlers caught all the exceptions, but they simply do not today.
Andrew Paier | Director of Special Operations | BP3 Global, Inc. www.bp-3.com
PriyankafromPSL 270004VRJU6 PostsACCEPTED ANSWER
Re: Catch event does not catch every exception thrown by a service2012-10-17T05:49:18Z in response to SystemAdminThank you Andrew ! Your Answer really helped me confirm that there are still other exceptions which can not be caught and this is a limitation of the BPM tool.