ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Error Handler with PROPAGATE

Post new topic  Reply to topic
 Error Handler with PROPAGATE « View previous topic :: View next topic » 
Author Message
accosun
PostPosted: Mon Jan 22, 2007 10:40 am    Post subject: Error Handler with PROPAGATE Reply with quote

Apprentice

Joined: 20 Dec 2001
Posts: 45
Location: Moscow

Hello everybody!

I've got an error handler subflow, which either write a record into Event log or put a message with Exc.List into a special queue, or both. Action is choosing based on the value of external variable, defined in the flow.

Ending part of my subflow is:

________
|````````|
|Compute| (Out)->[MQOutput] (Out)->|Throw|
|________| (Out1)----------------------->|_____|

In Compute ESQL I've got CASE statement:

--ErrorHadling is an external variable
CASE ErrorHandling
WHEN 'LogAndQueue' THEN
Call ExceptionListHandler();
RETURN TRUE;

WHEN 'Log' THEN
Call ExceptionListHandler();
PROPAGATE TO TERMINAL 1;
ELSE
RETURN TRUE;
END CASE;

--End for the main Function
END;

When my message goes to "Log" branch and leaves Compute node with the help of RETURN statement, everything is OK, but when it leaves Compute node with the help of PROPAGATE, I get error messages in Event log:

(1) " ----- ( BR.REQ ) ('subflow.ERROR_H_SUBFLOW_Compute.Main', '13.4') Error detected whilst executing the SQL statement ''PROPAGATE TO TERMINAL 1 FINALIZE DEFAULT DELETE DEFAULT;''.

The message broker detected an error whilst executing the given statement. An exception has been thrown to cut short the SQL program.

See the following messages for details of the error. ------ "

(2) "----- ( BR.REQ ) Exception thrown by throw node 'MF_TEST_WS.ERROR_H_SUBFLOW.Throw'; text is ''''.

The throw node 'MF_TEST_WS.ERROR_H_SUBFLOW.Throw' has received a message and thus has thrown an exception as this is its normal behavior. The message text associated with this exception is ''''.

Since this is application generated (by message flow behavior), the user action is determined by the message flow and the type of exception generated ---"

Why does this happen? May be this usege of PROPAGATE is incorrect?
Back to top
View user's profile Send private message Send e-mail Visit poster's website
elvis_gn
PostPosted: Mon Jan 22, 2007 10:54 am    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi accosun,

Try
Code:
PROPAGATE TO TERMINAL 'out1';


Regards.
Back to top
View user's profile Send private message Send e-mail
accosun
PostPosted: Wed Jan 24, 2007 4:16 am    Post subject: Reply with quote

Apprentice

Joined: 20 Dec 2001
Posts: 45
Location: Moscow

Hi Elvis!

I tried, result is the same. You see, message is sucessfully goes through 'out1' terminal to Throw node. The exception mentioned above appears after user exception has been thrown!
Back to top
View user's profile Send private message Send e-mail Visit poster's website
jefflowrey
PostPosted: Wed Jan 24, 2007 4:20 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Add "RETURN FALSE;" to the end of your ESQL.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
accosun
PostPosted: Wed Jan 24, 2007 5:22 am    Post subject: Reply with quote

Apprentice

Joined: 20 Dec 2001
Posts: 45
Location: Moscow

Hi Jeff!

Thank you for reply!

I tried this at the very beginning.... I post here all records from Event log. Original exception appears due to output queue is disabled for put.

After THROW node:
(1) "( BR.REQ ) Error detected whilst handling a previous error in node 'MF_TEST_WS.ERROR_H_SUBFLOW.Throw'.
The message broker has detected an error in node 'MF_TEST_WS.ERROR_H_SUBFLOW.Throw' whilst handling a previous error.
..."
(2) "( BR.REQ ) Error detected whilst processing a message in node 'MF_TEST_WS.OUT'.
The message broker detected an error whilst processing a message in node 'MF_TEST_WS.OUT'. An exception has been thrown to cut short the processing of the message.
..."
(3) "( BR.REQ ) An error occurred in node 'MF_TEST_WS.OUT' writing message to queue ''OUT.QUEUE'' on queue manager ''QM''. State = ''-1'' ''MQW102'' ''2051'' ''''
An error occurred when a message flow node attempted to write a message to a queue. The reason code from the MQPUT is displayed as the 3rd (native error) state.
..."

For that moment it's OK for me.

(4)"( BR.REQ ) Error detected whilst handling a previous error in node 'MF_TEST_WS.ERROR_H_SUBFLOW.ADD EXCEPTION'.
The message broker has detected an error in node 'MF_TEST_WS.ERROR_H_SUBFLOW.ADD EXCEPTION' whilst handling a previous error.
..."

ADD_EXCEPTION is a ComputeNode

(5)( BR.REQ ) Error detected whilst processing a message in node 'MF_TEST_WS.OUT'.
The message broker detected an error whilst processing a message in node 'MF_TEST_WS.OUT'. An exception has been thrown to cut short the processing of the message.
..."

(6) "( BR.REQ ) An error occurred in node 'MF_TEST_WS.OUT' writing message to queue ''OUT.QUEUE'' on queue manager ''QM''. State = ''-1'' ''MQW102'' ''2051'' ''''
An error occurred when a message flow node attempted to write a message to a queue. The reason code from the MQPUT is displayed as the 3rd (native error) state.
..."

That is very strange, i've got the same exceptions again. May be PROPAGATE statement is the reason?

The following exceptions appear when the message is in the InputNode again. It goes to Failure terminal of the InputNode

(7)"( BR.REQ ) Exception condition detected on input node 'MF_TEST_WS.MQInput'.
The input node 'MF_TEST_WS.MQInput' detected an error whilst processing a message. The message flow has been rolled-back and, if the message was being processed in a unit of work, it will remain on the input queue to be processed again. Following messages will indicate the cause of this exception.
..."

("( BR.REQ ) Error detected whilst processing a message in node 'MF_TEST_WS.ERROR_H_SUBFLOW.ADD EXCEPTION'.
The message broker detected an error whilst processing a message in node 'MF_TEST_WS.ERROR_H_SUBFLOW.ADD EXCEPTION'. An exception has been thrown to cut short the processing of the message.
..."

(9)"( BR.REQ ) ('subflow.ERROR_H_SUBFLOW_Compute.Main', '13.4') Error detected whilst executing the SQL statement ''PROPAGATE TO TERMINAL 1 FINALIZE DEFAULT DELETE DEFAULT;''.
The message broker detected an error whilst executing the given statement. An exception has been thrown to cut short the SQL program.
..."

This is the last one
(10)"( BR.REQ ) Exception thrown by throw node 'MF_TEST_WS.ERROR_H_SUBFLOW.Throw'; text is ''''.

The throw node 'MF_TEST_WS.ERROR_H_SUBFLOW.Throw' has received a message and thus has thrown an exception as this is its normal behavior. The message text associated with this exception is ''''.
..."
Back to top
View user's profile Send private message Send e-mail Visit poster's website
accosun
PostPosted: Wed Jan 24, 2007 5:37 am    Post subject: Reply with quote

Apprentice

Joined: 20 Dec 2001
Posts: 45
Location: Moscow

Of course, i can change this flow and use RouteToLabel and Label nodes instead, but I'd like to find the reason!
Back to top
View user's profile Send private message Send e-mail Visit poster's website
jefflowrey
PostPosted: Wed Jan 24, 2007 5:53 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

It is not valid ESQL to say "PROPAGATE TO TERMINAL 1".

If your code still says that, it's not right. Use the full, correct, case-sensitive name of the terminal.

Make sure that every logical path in your ESQL that follows a PROPAGATE statement either follows a PROPAGATE statement that uses DELETE NONE or ends with "RETURN FALSE;".

Otherwise, you will exit the compute node with a blank message tree, which will cause errors in all sorts of places.

Make sure you have made both of these changes to the code you originally posted, make sure you redeploy your code, and then come back with what the results are.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
accosun
PostPosted: Wed Jan 24, 2007 9:55 am    Post subject: Reply with quote

Apprentice

Joined: 20 Dec 2001
Posts: 45
Location: Moscow

jefflowrey wrote:
It is not valid ESQL to say "PROPAGATE TO TERMINAL 1".


But InfoCenter says that it's possible... Anyway, I tried all possible cases:

1. Fully defined PROPAGATE statement like PROPAGATE TO TERMINAL 'out1' FINALIZE DEFAULT DELETE NONE

2. Short PROPAGATE statement with following RETURN FALSE. I put RETURN FALSE after each PROPAGATE in my ESQL, eg:

CASE ErrorHandling
WHEN 'LogAndQueue' THEN
Call ExceptionListHandler();
PROPAGATE TO TERMINAL 'out1';
RETURN FALSE;
WHEN 'Log' THEN
Call ExceptionListHandler();
RETURN TRUE;
ELSE
PROPAGATE TO TERMINAL 'out1';
RETURN FALSE;
END CASE;

3. Fully defined PROPAGATE statement PROPAGATE TO TERMINAL 'out1' FINALIZE DEFAULT DELETE NONE with following RETURN FALSE

Result is the same

Also i tried different terminal names, but 'out1' is the only valid.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
jefflowrey
PostPosted: Wed Jan 24, 2007 10:21 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

accosun wrote:
jefflowrey wrote:
It is not valid ESQL to say "PROPAGATE TO TERMINAL 1".


But InfoCenter says that it's possible...


I knew I should have doublechecked that...

For everyone else, the reference is
http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r0m0/index.jsp?topic=/com.ibm.etools.mft.doc/ak05110_.htm

The MQOutput node is failing because the destination queue is Put Inhibited.

Hopefully, this is something you are trying to test.

You might consider changing FINALIZE to NONE, also.

I guess I've lost track a bit of what the actual problem is?
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
accosun
PostPosted: Fri Jan 26, 2007 1:16 am    Post subject: Reply with quote

Apprentice

Joined: 20 Dec 2001
Posts: 45
Location: Moscow

The actual problem is that my error handler works incorrecty. It post user exception in EventLog, but also i get additional exceptions, that are posted before. For example:

( BR.REQ ) ('subflow.ERROR_H_SUBFLOW_Compute.Main', '13.4') Error detected whilst executing the SQL statement ''PROPAGATE TO TERMINAL 'out1' FINALIZE DEFAULT DELETE NONE;''.
The message broker detected an error whilst executing the given statement. An exception has been thrown to cut short the SQL program.
..."
Back to top
View user's profile Send private message Send e-mail Visit poster's website
elvis_gn
PostPosted: Fri Jan 26, 2007 1:27 am    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi accosun,
accosun wrote:
The actual problem is that my error handler works incorrecty. It post user exception in EventLog, but also i get additional exceptions, that are posted before. For example:

( BR.REQ ) ('subflow.ERROR_H_SUBFLOW_Compute.Main', '13.4') Error detected whilst executing the SQL statement ''PROPAGATE TO TERMINAL 'out1' FINALIZE DEFAULT DELETE NONE;''.
The message broker detected an error whilst executing the given statement. An exception has been thrown to cut short the SQL program.
..."
Don't worry about this error, the actual error is occuring somewhere after this PROPAGATE, since the error is causing a roll back, you are getting this error...If you fix the actual one, this will also vanish...

Regards.
Back to top
View user's profile Send private message Send e-mail
accosun
PostPosted: Fri Jan 26, 2007 1:52 am    Post subject: Reply with quote

Apprentice

Joined: 20 Dec 2001
Posts: 45
Location: Moscow

OK, PROPAGATE statement is the last one in my Compute node (Except ENDs, of course). Then I have MQOutput and then Throw.

How many error messages should i see in Event Log after the message has passed through THROW node? Some messges, describing the original error + message about user exception?
Back to top
View user's profile Send private message Send e-mail Visit poster's website
elvis_gn
PostPosted: Fri Jan 26, 2007 1:58 am    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi accosun,
accosun wrote:
OK, PROPAGATE statement is the last one in my Compute node (Except ENDs, of course).
I hope you have a RETURN FALSE atleast between the above two lines

accosun wrote:
Then I have MQOutput and then Throw.
Your propagating, and then throwing it back
Then ofcourse you will get the error u are getting...u should put a try catch node infront of the Compute node...or else not propagate in the same path...After such a long topic, I've lost track of your requirements so can't talk about that now...

accosun wrote:
How many error messages should i see in Event Log after the message has passed through THROW node? Some messges, describing the original error + message about user exception?
Not sure if the number is fixed, I usually find 3 or 4...it depends on what all you have in the return path also...but the first in the list will be the actual error...in your case the User exception i guess.

Regards.
Back to top
View user's profile Send private message Send e-mail
accosun
PostPosted: Fri Jan 26, 2007 2:18 am    Post subject: Reply with quote

Apprentice

Joined: 20 Dec 2001
Posts: 45
Location: Moscow

elvis_gn wrote:
Hi accosun,
accosun wrote:
OK, PROPAGATE statement is the last one in my Compute node (Except ENDs, of course).
I hope you have a RETURN FALSE atleast between the above two lines


Yes, of course

accosun wrote:
Then I have MQOutput and then Throw.
Your propagating, and then throwing it back
Then ofcourse you will get the error u are getting...u should put a try catch node infront of the Compute node...or else not propagate in the same path...After such a long topic, I've lost track of your requirements so can't talk about that now...

Oh, may be i don't say about it before - this subflow is the part of Input node's Catch terminal, so i guess there is no need in TryCatch here.


accosun wrote:
How many error messages should i see in Event Log after the message has passed through THROW node? Some messges, describing the original error + message about user exception?
Not sure if the number is fixed, I usually find 3 or 4...it depends on what all you have in the return path also...but the first in the list will be the actual error...in your case the User exception i guess.

I understand, that number of error messages can vary, and i beleive that there shouldn't "other" exception messages in the list.

Regards.[/quote]
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Error Handler with PROPAGATE
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.