Author |
Message
|
jhalstead |
Posted: Wed May 29, 2002 4:21 am Post subject: Using exception list in a trace node |
|
|
 Master
Joined: 16 Aug 2001 Posts: 258 Location: London
|
I'm wanting to use bits of the exception list in a trace node which writes to file when a message is being passed to a failure queue.
If I put in a basic:
########################################
Message Passed through to failure queue.
########################################
TIMESTAMP: ${CURRENT_TIMESTAMP}
MSGID: ${Root.MQMD.MsgId}
###############
EXCEPTION LIST:
###############
${ExceptionList}
and this provides the following output:
########################################
Message Passed through to failure queue.
########################################
TIMESTAMP: 2002-05-29 13:25:00.127068
MSGID: X'414d51204557534430312e42415720203ceb807900646023'
###############
EXCEPTION LIST:
###############
(
(0x1000000)RecoverableException = (
(0x3000000)File = '/build/S201_P/src/DataFlowEngine/ImbDataFlowN
ode.cpp'
(0x3000000)Line = 538
(0x3000000)Function = 'ImbDataFlowNode::createExceptionList'
(0x3000000)Type = '5c95967c-e600-0000-0080-cb074f2ecada'
(0x3000000)Name = '5c95967c-e600-0000-0080-cb074f2ecada'
(0x3000000)Label = 'EWS.NEON.MsgFlow.NeonRules'
(0x3000000)Text = 'Node throwing exception'
(0x3000000)Catalog = 'MQSIv201'
(0x3000000)Severity = 3
(0x3000000)Number = 2230
(0x1000000)UnknownException = (
(0x3000000)File = '/build/S201_P/src/Neon/NeonLIL/ImbNeonRulesProcesso
r.cpp'
(0x3000000)Line = 365
(0x3000000)Function = 'ImbNeonRulesProcessor::::processRules'
(0x3000000)Type = '5c95967c-e600-0000-0080-cb074f2ecada'
(0x3000000)Name = '5c95967c-e600-0000-0080-cb074f2ecada'
(0x3000000)Label = 'EWS.NEON.MsgFlow.NeonRules'
(0x3000000)Text = 'Rules evaluation failed.
Application group : '%s'
Message type : '%s'
Rules Error # : %ld
Rules Error Message : '%s'
'
(0x3000000)Catalog = 'MQSIv201'
(0x3000000)Severity = 3
(0x3000000)Number = 4021
(0x1000000)Insert = (
(0x3000000)Type = 5
(0x3000000)Text = 'APPLICATION GROUP NAME'
)
(0x1000000)Insert = (
(0x3000000)Type = 5
(0x3000000)Text = 'MESSAGE TYPE'
)
(0x1000000)Insert = (
(0x3000000)Type = 2
(0x3000000)Text = 'ERROR CODE'
)
(0x1000000)Insert = (
(0x3000000)Type = 5
(0x3000000)Text = 'ERROR MESSAGE TEXT'
)
)
)
)
I've highlighted the bits from the exception list I'd like to extract, however I've had no luck doing this. There is some example ESQL in the Control centre guide [Appendix C, exception & destination list structure] but I'm unsure if this can be used in the trace node?
Anyone got any ideas if what I'm hoping is possible?
Thanks
Jamie |
|
Back to top |
|
 |
ernest-ter.kuile |
Posted: Wed May 29, 2002 5:03 am Post subject: |
|
|
 Apprentice
Joined: 13 May 2002 Posts: 49 Location: KLM Holland
|
Just a wild guess.
If you can write ${Root.MQMD.MsgId} in your trace node. As an extention to that, you might try something like this :
Code: |
${ExceptionList.RecoverableException.UnknownException.Label}
${ExceptionList.RecoverableException.UnknownException.Text}
${ExceptionList.RecoverableException.UnknownException.Insert[0].Text}
${ExceptionList.RecoverableException.UnknownException.Insert[1].Text}
${ExceptionList.RecoverableException.UnknownException.Insert[2].Text}
${ExceptionList.RecoverableException.UnknownException.Insert[3].Text}
|
|
|
Back to top |
|
 |
ernest-ter.kuile |
Posted: Wed May 29, 2002 5:13 am Post subject: |
|
|
 Apprentice
Joined: 13 May 2002 Posts: 49 Location: KLM Holland
|
Note that if this doesn't work, you can use a compute node to handle the ExceptionList
for example you could add a compute node just before the trace node and select its properties, advanced. Set Compute mode to ExceptionList and LocalEvironment, and copy whatever you need to the OutputLocalEnvironment.Variables.whatever
and printout in your trace node ${LocalEnvironment}
Have fun. |
|
Back to top |
|
 |
jhalstead |
Posted: Wed May 29, 2002 9:00 am Post subject: |
|
|
 Master
Joined: 16 Aug 2001 Posts: 258 Location: London
|
many thanks for your input ernest, implementing the following:
########################################
Message Passed through to failure queue.
########################################
TIMESTAMP: ${CURRENT_TIMESTAMP}
MSGID: ${Root.MQMD.MsgId}
###########################
Return from NEONRules Node:
###########################
App Group:${ExceptionList.RecoverableException.UnknownException.Insert[1].Text}
Msg Id:${ExceptionList.RecoverableException.UnknownException.Insert[2].Text}
Rules Error Code:${ExceptionList.RecoverableException.UnknownException.Insert[3].Text}
Rules Error Msg:${ExceptionList.RecoverableException.UnknownException.Insert[4].Text}
I get the following output in my trace file:
########################################
Message Passed through to failure queue.
########################################
TIMESTAMP: 2002-05-29 18:28:55.244976
MSGID: X'414d51204557534930312e42415720203cf3a3aa000f8013'
###########################
Return from NEONRules Node:
###########################
App Group:'ORDER'
Msg Id:'OrdConf'
Rules Error Code:'-1001'
Rules Error Msg:'Rules configuration missing Application Group -- AppGrp - 'ORDER', MsgType - 'OrdConf''
PERFECT!
THANKS! |
|
Back to top |
|
 |
kirani |
Posted: Wed May 29, 2002 10:13 am Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
This will not work always becase Exceptions can be of different type. Within ExceptionList.RecoverableException you may have nested exceptions of type UserException, DatabaseException, ConversionException,ParserException....
Instead of referring to specific Exception you should refer to generic Exception. I would suggest you to write some ESQL code which will extract required information from ExceptionList and write it to LocalEnvironment Tree. In your trace node refer to LocalEnvironment tree while prining values. _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
jhalstead |
Posted: Thu May 30, 2002 2:25 am Post subject: |
|
|
 Master
Joined: 16 Aug 2001 Posts: 258 Location: London
|
With the NEONRules node I only every get the structure outlined in the initial note as a result of tracing the exception list. The UserException, DatabaseException, ConversionException,ParserException.... sub exceptions never arise (perhaps these are more relevant to compute nodes?).
Anyway thanks for the warning, I'll do more investigation. |
|
Back to top |
|
 |
|