Author |
Message
|
PRKUMAR |
Posted: Wed Jun 05, 2013 6:22 am Post subject: Message flow terminating before publishing the message |
|
|
Apprentice
Joined: 04 Sep 2012 Posts: 36
|
Hi,
My input message format is XML. I am getting 10 orders in single XML message. I need to validate each order and if all the information is right then i need to PUBLISH that particular order(i am achieving this by using propagate statement). If any order is invalid, i need to capture order id of that particular order. At the end, i need to throw an error with all invalid order id's.(if present)
The exception handler sub-flow of our project behaves like if it receives any user or broker exception it logs the failure message and terminates the flow.
So, the problem here is if my input message contains 2 orders(1st order is valid and the second order is invalid). Before publishing the first order(using PUBLICATION node) it is validating 2order details since it is invalid it is logging error and terminating the flow and the first order details isn't publishing.
I am using while loop and propagate statement to send each valid order details to publication node. For the first order, my flow propagates the message to publication node and the control again comes back for 2nd order and it finds invalid and throwing an error. Error genration and termination is happening before 1st message gets publishing.
Please help me how do I overcome this situation. I want the valid order should be published and the invalid order should be error logged. |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Jun 05, 2013 6:39 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
You need to change your error handling and catch errors on the propagating branch where you then need to log the error in a "happy path" way...
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
Tech1621 |
Posted: Wed Jun 05, 2013 6:54 am Post subject: Re: Message flow terminating before publishing the message |
|
|
Novice
Joined: 29 May 2013 Posts: 23
|
PRKUMAR wrote: |
Hi,
...
So, the problem here is if my input message contains 2 orders(1st order is valid and the second order is invalid). Before publishing the first order(using PUBLICATION node) it is validating 2order details since it is invalid it is logging error and terminating the flow and the first order details isn't publishing.
I am using while loop and propagate statement to send each valid order details to publication node. For the first order, my flow propagates the message to publication node and the control again comes back for 2nd order and it finds invalid and throwing an error. Error genration and termination is happening before 1st message gets publishing.
Please help me how do I overcome this situation. I want the valid order should be published and the invalid order should be error logged. |
Please provide some more info about your validation as in are you validation in using compute node?
I suggest use flow order node and connect one terminal with your validation and keep a flag in it and then Pub
the second terminal if u connect to compute node containing the error generation if the flag is up else goes back to propogate , there don't forget to remove the flag..!
hope it helps  _________________ Anything is easy if you believe in yourself.. |
|
Back to top |
|
 |
kash3338 |
Posted: Wed Jun 05, 2013 7:04 am Post subject: Re: Message flow terminating before publishing the message |
|
|
Shaman
Joined: 08 Feb 2009 Posts: 709 Location: Chennai, India
|
PRKUMAR wrote: |
So, the problem here is if my input message contains 2 orders(1st order is valid and the second order is invalid). Before publishing the first order(using PUBLICATION node) it is validating 2order details since it is invalid it is logging error and terminating the flow and the first order details isn't publishing. |
How about setting the transactionality of your publication to NO? I guess that is what you want. |
|
Back to top |
|
 |
PRKUMAR |
Posted: Thu Jun 06, 2013 12:47 am Post subject: |
|
|
Apprentice
Joined: 04 Sep 2012 Posts: 36
|
It seems that, raising the exception causes the message shall not be published.
How do I set the transactionality of publication to NO? |
|
Back to top |
|
 |
kash3338 |
Posted: Thu Jun 06, 2013 12:54 am Post subject: |
|
|
Shaman
Joined: 08 Feb 2009 Posts: 709 Location: Chennai, India
|
PRKUMAR wrote: |
How do I set the transactionality of publication to NO? |
Using MQOutput node. Have a Alias created for your topic and define the alias name in MQOutput node. Give it a try! |
|
Back to top |
|
 |
|