Author |
Message
|
abs_cal |
Posted: Wed Aug 06, 2008 12:34 pm Post subject: Want to receive Exception message with original message |
|
|
Acolyte
Joined: 18 Aug 2005 Posts: 62
|
Trying to get the Exception message/list with original message while any error occurs inside a message flow. Can anyone help me to understand what need to be done in order to capture/get exception list in a queue?
Thanks in advance. |
|
Back to top |
|
 |
AkankshA |
Posted: Wed Aug 06, 2008 7:45 pm Post subject: |
|
|
 Grand Master
Joined: 12 Jan 2006 Posts: 1494 Location: Singapore
|
In that case you need to make exceptionList tree structure a part of your msg payload... since MQ gets nly payload with headers.. _________________ Cheers |
|
Back to top |
|
 |
vaibhav_vy |
Posted: Wed Aug 06, 2008 10:02 pm Post subject: |
|
|
Apprentice
Joined: 04 Aug 2008 Posts: 28
|
To be very specific, always attach compute node to Catch terminal of Input node such as MQInput, HTTPInput etc used in your message flow. This will ensure that even if you get exception anywhere in message flow, it will be caught and control is transferred to Catch terminal of Input node unless you catch exception using TryCatch nodes. Once control is transferred, you can write specific code to handle that exception. To solve your issue, copy input message & ExceptionList to output message. For example, if u are using XMLNSC parser, use can use code like,
SET OutputRoot.XMLNSC.OriginalMessageData = InputBody;
SET OutputRoot.XMLNSC.ExceptionData = InputExceptionList;
If u are making changes to Input data & want original message, save first it to Environment immediately after you get the request so that you can later retrieve it like,
SET Environment.Variables.InputMessage = InputBody ;
& in exception handling retrieve it using,
SET OutputRoot.XMLNSC.OriginalMessageData = Environment.Variables.InputMessage ;
SET OutputRoot.XMLNSC.ExceptionData = InputExceptionList; |
|
Back to top |
|
 |
AkankshA |
Posted: Wed Aug 06, 2008 10:58 pm Post subject: |
|
|
 Grand Master
Joined: 12 Jan 2006 Posts: 1494 Location: Singapore
|
vaibhav_vy wrote: |
SET OutputRoot.XMLNSC.OriginalMessageData = InputBody;
SET OutputRoot.XMLNSC.ExceptionData = InputExceptionList;
|
Would ASBITSTREAM not be required here  _________________ Cheers |
|
Back to top |
|
 |
vaibhav_vy |
Posted: Thu Aug 07, 2008 9:09 pm Post subject: |
|
|
Apprentice
Joined: 04 Aug 2008 Posts: 28
|
That would be require only when message domain is BLOB. For rest, above code would work fine. |
|
Back to top |
|
 |
AkankshA |
Posted: Fri Aug 08, 2008 1:50 am Post subject: |
|
|
 Grand Master
Joined: 12 Jan 2006 Posts: 1494 Location: Singapore
|
Quote: |
SET OutputRoot.XMLNSC.OriginalMessageData = InputBody;
SET OutputRoot.XMLNSC.ExceptionData = InputExceptionList; |
AFAIK these create the subtree under the specified path... statements like
OutputRoot.XMLNSC.ExceptionDataData.*[1].... are required to access it further..
However if one needs the complete exceptionlist tree as one element then ASBITSTREAM and CAST is the way to go fwd..
vaibhav_vy wrote: |
That would be require only when message domain is BLOB. For rest, above code would work fine. |
ASBITSTREAM results the o/p as blob but the i/p is a reference to any field.. any domain and any type.. _________________ Cheers |
|
Back to top |
|
 |
|