Posted: Tue May 20, 2003 7:11 am Post subject: Error Handling Problem
Apprentice
Joined: 23 Dec 2002 Posts: 28
I'm having a problem with trapping errors in a message flow. When a XML message throws a user exception it rolls back to the failure terminal of the input node correctly and is written to the error queue. However, I need it to roll back to the catch terminal also. The catch terminal is wried to a standard error processing sub-flow that eventually sends an e-mail notification. This process works fine if the error is generated in one of a number of other sub-flows (mostly db errors).
Is there a way to have a user generated error process through the catch terminal also.
MQSeries = 5.2.1
WMQI = 2.1 CSD 3
Code:
SET OutputLocalEnvironment.Destination.MQDestinationList.DestinationData[1].queueName =
CASE
When InputRoot.XML.Table.FUNCTION = 'INVENTORY_ITEMS' Then
'MMS_B2B_ITEMS'
When InputRoot.XML.Table.FUNCTION = 'MATERIAL_MISC' Then
'MMS_B2B_MATERIALS'
When InputRoot.XML.Table.FUNCTION = 'MATERIAL_EXP' Then
'MMS_B2B_MATERIALS'
When InputRoot.XML.Table.FUNCTION = 'MATERIAL_SO' Then
'MMS_B2B_MATERIALS'
When InputRoot.XML.Table.FUNCTION = 'LABOR_ACTUALS' Then
'MMS_B2B_LABOR'
When InputRoot.XML.Table.FUNCTION = 'CHART_OF_ACCOUNTS' Then
'MMS_B2B_COA'
When InputRoot.XML.Table.FUNCTION = 'LABOR_HOURS' Then
'MMS_B2B_LABOR'
When InputRoot.XML.Table.FUNCTION = 'EMPLOYEE_INFO' Then
'MMS_B2B_EQDB'
ELSE
'XXXXX'
END;
IF OutputLocalEnvironment.Destination.MQDestinationList.DestinationData[1].queueName = 'XXXXX'
THEN
Throw user exception message 2591 values ('Invalid Function Code in data');
END IF;
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
By default your message should rollback to catch terminal first. How did you verify that this message is not going to the "catch" terminal of the MQInput node?
To verify this, remove your sub-flow from the catch terminal and attach a simple trace node, which will write the data to some file. _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
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