Author |
Message
|
Maverik |
Posted: Thu Jun 16, 2005 2:56 am Post subject: Hide input message on Exception ? |
|
|
Apprentice
Joined: 14 Jun 2005 Posts: 27
|
Hi,
I am trying to avoid sending my input message to the output when an exception is thrown.
I am throwing a user exception and connecting the failure terminal to the output queue itself.....
I get the exception in the exception tree along with the input message being copied...
Can i prevent the input message from going out ??? |
|
Back to top |
|
 |
mayur2378 |
Posted: Thu Jun 16, 2005 8:03 am Post subject: |
|
|
Apprentice
Joined: 26 May 2004 Posts: 47
|
Do you have a restriction in setting up another queue in case of FAILURE. How do you plan to handle errors? |
|
Back to top |
|
 |
shalabh1976 |
Posted: Thu Jun 16, 2005 9:15 pm Post subject: |
|
|
 Partisan
Joined: 18 Jul 2002 Posts: 381 Location: Gurgaon, India
|
Assuming that you have your reasons for connecting the failure to the output ( even though this is not a recommended design strategy), why don't you put in a compute node in between the failure and output node.
You can manipulate the input message here ( another way of saying that you can handle the exception).
For eg, suppose you want only the exceptionlist as an XML in the output, you can write:
SET OutputRoot.Properties.MessageFormat = 'XML';
SET OutputRoot.XML.Error = InputExceptionList; _________________ Shalabh
IBM Cert. WMB V6.0
IBM Cert. MQ V5.3 App. Prog.
IBM Cert. DB2 9 DB Associate |
|
Back to top |
|
 |
elvis_gn |
Posted: Sat Jun 18, 2005 10:04 am Post subject: |
|
|
 Padawan
Joined: 08 Oct 2004 Posts: 1905 Location: Dubai
|
But this would mean that i send the error as the XML message.....
I dont think the client wants that.
I have noticed that the moment the code runs through the Exception statement, the input message is by default sent with the exception.
I guess there is no workaround other than adding another compute node and only copying the InputExceptionList to OutputExceptionList. |
|
Back to top |
|
 |
jefflowrey |
Posted: Sat Jun 18, 2005 5:54 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Look.
Three nodes or four, isn't going to make a difference.
There's almost no good reason to connect the failure path to the same output node as the main processing path. There are *some* circumstances where the need to limit the number of open handles on the qmgr is very important, and thus it makes sense to use fewer output nodes rather than more.
Your flow should represent the logical flow of your code as clearly as possible.
You will never get the system to give you a plain ExceptionList without the body of the message as well, unless you instruct it to do so with code. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
|