|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Capturing technical errors in error handling subflow |
« View previous topic :: View next topic » |
Author |
Message
|
prasadpav |
Posted: Mon Sep 05, 2005 9:28 am Post subject: Capturing technical errors in error handling subflow |
|
|
 Centurion
Joined: 03 Oct 2004 Posts: 142
|
Hi,
I'm implementing error handling subflow where the subflow must be capable of distinguishing between the kind of error - Techncial error (Unable to access database, unable to put message to queue..etc) and business errors. If it is technical error we are disabling the input queue and if it is business error then error information is put in MQRFH2 header and then put on a failure queue. Even though I got this functionality working, somehow i'm not convinced about the maintainability of the code. In order to achieve above functionality, this is what I've done:
1) I wired catch terminal of input node error handling subflow
2) For compute nodes which accesses external database, I checked "Treat warnings as errors" and Unchecked "Throw exception on database error". In ESQL, i check SQLCODE < 0, then database error. This takes care of both warnings & database errors. Accordingly I set Technical error as 'T' and business errors as 'B'
The errors which are still not captured in above compute node are:
if the table name is wrong or user synonym not existing, then message broker throws an error. And I want my error handling flow to treat this as a Technical error, so i wired the failure terminal of compute node as (FAILURE ->compute->throw), highlighted Environment tree with a variable which says error type as 'T' and also copied original ExceptionList tree in the compute node connected to compute node.
3) If for some reason I'm unable to write message to any queues, then my error handling sub flow treats the error as Techncial.
The only reason why I think this may be little difficult to maintain and use for further projects is:
1) developer need to remember that he has to uncheck one option in compute node properties "Thrown on database errors" for those interacts with external DB
2) Wiring the failure terminal to another subflow of compute node which accesses external databases
3) Updating the error type as 'T' and 'B'
Also I feel that assessing the type of error is becoming clumsy in my case.
So, i want to know the following based on your experiences:
1) Did anyone used message catalogue for distinguishng Technical errors to business errors? Is it an option?
2) Somehow I feel that, in the above approach, table name not found or user synonyms not available kind of errors will never ever come. I think i'm unnecessary doing that check in the above approach. Any thoughts?
Another simple solution for assessing Technical or Business error is, for all Business errors, use ESQL THROW statement to throw an error message and set message catalogue number to 3001 (Ex: THROW USER EXCEPTION MESSAGE 3001 VALUES('This is Business error'). Using this logic, i might end up in intepreting some business errors as technical errors which accessing database.
Any thoughts of implementing this in a better way is highly appreciated.
Thanks alot,
Prasad |
|
Back to top |
|
 |
kishoreraju |
Posted: Mon Sep 05, 2005 9:47 pm Post subject: |
|
|
Disciple
Joined: 30 Sep 2004 Posts: 156
|
With the first solution we can try. when coming to second one it is not going to workout.
suppose whern you are dealing with tagged delimited messages,if the input message is not there according to the structure that you have defined in the Message defination file then it will throw an Exception and this exception is related to business data.
If i am wrong please correct me. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|