Author |
Message
|
gmark1 |
Posted: Tue Jul 10, 2007 10:04 am Post subject: Parser Exception in MQInput Node |
|
|
Novice
Joined: 10 Jul 2007 Posts: 11
|
I have the following situation. I have configured a MQInput node to receive messages in CWF. I set the validate option to 'content and value'.
I send an incorrect message to the flow. I have written a non-numeric value in a integer position.
When an error occurs at that node a parser exception is thrown and the message is propagated to the failure terminal. I have connected a Compute node to that terminal. If I look in the trace log it says why the parser exception occured and in which element the parser found the error.
My question is this, can I check in that compute node the name of the element in which the error happened? I need to know its name so I can send an error message with a description to a error queue. I need to know the name of the field so my description is more accurate son I don't have to check all fields on case a true error happens in the future.
Thanks in advance.
PS: I'm from a non-English speaking country and I have only recently been working with WMB(which is in a spanish version). If this post is somehow confusing please let me know and I'll try to claryfy. |
|
Back to top |
|
 |
wbi_telecom |
Posted: Tue Jul 10, 2007 10:17 am Post subject: |
|
|
 Disciple
Joined: 15 Feb 2006 Posts: 188 Location: Harrisburg, PA
|
You will have to write ESQL to search ExceptionList to get the name of the fileld and also the reason code and description. I believe the sample code is available in Infocenter.
Did you change the Parse Timing option to "Complete" in the MQInput node ?
Cheers, |
|
Back to top |
|
 |
gmark1 |
Posted: Tue Jul 10, 2007 10:22 am Post subject: |
|
|
Novice
Joined: 10 Jul 2007 Posts: 11
|
So the name of the field is stored in the exceptionlist. I'll try search fo it. Ok, thank you. |
|
Back to top |
|
 |
gmark1 |
Posted: Tue Jul 10, 2007 10:55 am Post subject: |
|
|
Novice
Joined: 10 Jul 2007 Posts: 11
|
I looked it up in infocenter and there it says that I should use this procedure to retreive the information of the last exception.
CREATE PROCEDURE getLastExceptionDetail(IN InputTree reference,OUT messageNumber integer,
OUT messageText char)
BEGIN
-- Create a reference to the first child of the exception list
declare ptrException reference to InputTree.*[1];
-- keep looping while the moves to the child of exception list work
WHILE lastmove(ptrException) DO
-- store the current values for the error number and text
IF ptrException.Number is not null THEN
SET messageNumber = ptrException.Number;
SET messageText = ptrException.Text;
END IF;
-- now move to the last child which should be the next exceptionlist
move ptrException lastchild;
END WHILE;
END;
this is what I get at the end
ptrException.Number= 5505
ptrException.Text= ''CPI Converter Input Data Invalid''
So know I have the cause of the error but the element in which the exception occured is not in those fields. Do you know what is the name of the field I should search? (i have the Parse Timing option to "Complete" in the MQInput node) |
|
Back to top |
|
 |
gmark1 |
Posted: Tue Jul 10, 2007 11:00 am Post subject: |
|
|
Novice
Joined: 10 Jul 2007 Posts: 11
|
(
(0x01000000):Arbol = (
(0x03000000):File = 'F:\build\S600_P\src\DataFlowEngine\ImbRootParser.cpp'
(0x03000000):Function = 'ImbRootParser::parseNextItem'
(0x03000000):Type = 'ComIbmMQInputNode'
(0x03000000):Name = 'ArmarPeticion_I#FCMComposite_1_11'
(0x03000000):Label = 'ArmarPeticion_I.IF.ATIS.GEST_PET_ALTA'
(0x03000000):Catalog = 'BIPv600'
(0x03000000):Number = 5902
(0x03000000):Text = 'Exception whilst parsing'
(0x01000000):Insert = (
(0x03000000):Type = 5
(0x03000000):Text = 'Root'
)
)
(0x01000000):Arbol = (
(0x03000000):File = 'F:\build\S600_P\src\MTI\MTIforBroker\MtiImbParser2\MtiImbParser.cpp'
(0x03000000):Function = 'MtiImbParser::parseFirstChild'
(0x03000000):Type = 'ComIbmMQInputNode'
(0x03000000):Name = 'ArmarPeticion_I#FCMComposite_1_11'
(0x03000000):Label = 'ArmarPeticion_I.IF.ATIS.GEST_PET_ALTA'
(0x03000000):Catalog = 'BIPv600'
(0x03000000):Number = 5285
(0x03000000):Text = 'ImbRecoverableException caught from worker->parseNext.'
(0x01000000):Insert = (
(0x03000000):Type = 5
(0x03000000):Text = 'ATIS Message Set'
)
)
(0x01000000):Arbol = (
(0x03000000):File = 'F:\build\S600_P\src\cpi\pwf\cwf\cwfworker.cpp'
(0x03000000):Function = 'CWFWorker::parseNext'
(0x03000000):Type = ''
(0x03000000):Name = ''
(0x03000000):Label = ''
(0x03000000):Catalog = 'BIPv600'
(0x03000000):Number = 5171
(0x03000000):Text = 'CWF Parsing error'
(0x01000000):Insert = (
(0x03000000):Type = 2
(0x03000000):Text = '0'
)
)
(0x01000000):Arbol = (
(0x03000000):File = 'F:\build\S600_P\src\cpi\bsutils\datacnv.cpp'
(0x03000000):Function = 'DataCnv::validateDecimal'
(0x03000000):Type = ''
(0x03000000):Name = ''
(0x03000000):Label = ''
(0x03000000):Catalog = 'BIPv600'
(0x03000000):Number = 5505
(0x03000000):Text = 'CPI Converter Input Data Invalid'
(0x01000000):Insert = (
(0x03000000):Type = 5
(0x03000000):Text = 'decimal'
)
)
(0x01000000):Arbol = (
(0x03000000):File = NULL
(0x03000000):Function = NULL
(0x03000000):Type = 5
(0x03000000):Name = NULL
(0x03000000):Label = NULL
(0x03000000):Catalog = NULL
(0x03000000):Number = NULL
(0x03000000):Text = '549A'
(0x01000000):Insert = (
(0x03000000):Type = NULL
(0x03000000):Text = NULL
)
)
That is the exceptionlist tree. '549A' is the value i wrote in the element that should be an integer. I have the cause, i have the strange value that cause the error but I need the element name. |
|
Back to top |
|
 |
gmark1 |
Posted: Tue Jul 10, 2007 11:11 am Post subject: |
|
|
Novice
Joined: 10 Jul 2007 Posts: 11
|
I think I solved it. Thank you. |
|
Back to top |
|
 |
kimbert |
Posted: Tue Jul 10, 2007 12:42 pm Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
I set the validate option to 'content and value'.
I send an incorrect message to the flow. I have written a non-numeric value in a integer position. |
You do not need to set validate to 'content and value' in order to get this type of error. The CWF parser must be able to convert the bitstream value to its logical type ( integer in this case ), so this kind of validation comes 'free'.
'Content and Value' is only required for checking minOccurs, maxOccurs, and Value Constraints ( minLength, maxLength, minInclusive, maxInclusive etc ). |
|
Back to top |
|
 |
|