Author |
Message
|
mchillin |
Posted: Mon Oct 02, 2006 2:16 am Post subject: Store Environment Variables with rollback to MQInput Failure |
|
|
Novice
Joined: 27 Sep 2006 Posts: 16
|
We have an error handling flow which stores the error in the exception list.
The problem being that at the moment of the rollback to the MQInput node, the exception list disappears and starts from zero when the message is propagated to the failure terminal.
Is there a way of mantaining the exception list and recovering it after the rollback or passing the Exception list to the failure terminal of the MQInput node directly?
Is it possible to invoke rollback after the message has been left in an MQOutput queue without going through the MQInput Failure terminal?
Thanks... |
|
Back to top |
|
 |
Edde |
Posted: Mon Oct 02, 2006 2:35 am Post subject: Re: Store Environment Variables with rollback to MQInput Fai |
|
|
 Acolyte
Joined: 01 Oct 2006 Posts: 67 Location: Moscow, Russia
|
mchillin wrote: |
The problem being that at the moment of the rollback to the MQInput node, the exception list disappears and starts from zero when the message is propagated to the failure terminal. |
Read this redpaper about handling errors in message flow. |
|
Back to top |
|
 |
jbanoop |
Posted: Mon Oct 02, 2006 3:19 am Post subject: |
|
|
Chevalier
Joined: 17 Sep 2005 Posts: 401 Location: SC
|
Store the error in environment in case you need it on the failure path of MQInput.
The better approach would be to have an error handler subflow or somethign on that lines in the main path of execution. The try-catch would catch the exception, you should do what ever you want to do with the exception (lik caputring diagnostic info) then and , after it is done you can use the throw node to throw the exception back.
By setting transactionality on the MQOutput node you can make the mqoutput node commit outside the LUW.
It is not possible in my understanding to rollback a transaction in MB (using MB's roll back mechanism) without the path to the failure termial.
Anoop |
|
Back to top |
|
 |
mchillin |
Posted: Mon Oct 02, 2006 8:38 am Post subject: |
|
|
Novice
Joined: 27 Sep 2006 Posts: 16
|
Thanks for the reply..
The flow we have uses the catch terminal so that we dont loose the Exception List when we throw a user exception. Then we store it in the RFH2, then leaving the message in an MQOutput. The message is then currently used to inform DB2 tables, this is where the problem is.... being as the previous flow is still pending either a commit or a rollback and so the tables are held uniquely. Resulting in a DEADLOCK in DB2, but in order to free the tables we would have to pass through the throw node and effectively loosing all the data saved in the RFH2.
How can I do a roll back once I have sucessfully passed the message (with the RFH2) to the following flow? |
|
Back to top |
|
 |
jbanoop |
Posted: Mon Oct 02, 2006 10:12 pm Post subject: |
|
|
Chevalier
Joined: 17 Sep 2005 Posts: 401 Location: SC
|
I did not quite make out your problem .. however just as a note.. if you are doing the DB2 insert within the message flow you can as well set the node transactionality property (of that node which is doing the update) to No. This would commit the work done by that node irrespective of the success/failure of the flow as a whole.
Hope it helps
Regards,
Anoop |
|
Back to top |
|
 |
Edde |
Posted: Mon Oct 02, 2006 10:51 pm Post subject: |
|
|
 Acolyte
Joined: 01 Oct 2006 Posts: 67 Location: Moscow, Russia
|
mchillin wrote: |
The flow we have uses the catch terminal so that we dont loose the Exception List when we throw a user exception. Then we store it in the RFH2, then leaving the message in an MQOutput. The message is then currently used to inform DB2 tables, this is where the problem is.... being as the previous flow is still pending either a commit or a rollback and so the tables are held uniquely. |
As i understand you have a message flow with Catch terminal connected to MQInput.
In your error handlind routine you store ExceptionList in RFH2, then leave message in MQOutput.
If you have no nodes after MQOutput, message flow finishes.
How can it be pending if your output message is succesfully placed in output queue?
Or your database operations are in the same routine connected to Catch terminal, but after a MQOutput? |
|
Back to top |
|
 |
|