Author |
Message
|
RocknRambo |
Posted: Wed Dec 29, 2004 3:18 pm Post subject: Unit of Work |
|
|
Partisan
Joined: 24 Sep 2003 Posts: 355
|
I'm using Propagate statement to produce multiple messages from a input message (N cardinality chidren for Root).
now, on each item after a computation lookup, I need to pass onto the next node based on the lookup results. If +ve lookup, need to pass or throw an exception, if -ve.
can I make it in sinlge flow, I mean for ex: 5 items, 3 got +ve lookup and 2 got -ve lookup results... so the output queue shud have 3 and rest 2 an exception ?
or two flows. 1. propagates and 2. computation on each item and procced.
As by default its all in one Unit of Work, I mean an item failed in lookup so the entire Message fails.
Working on WBIMB 5.4, UNIX
any thoughts ?? Appreciated.
-RR |
|
Back to top |
|
 |
kirani |
Posted: Wed Dec 29, 2004 3:59 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
What would you like to do when an exception is thrown? Send the propagated message to FAILQ or do you want to reject the original messages? Please explain., _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
RocknRambo |
Posted: Wed Dec 29, 2004 9:53 pm Post subject: |
|
|
Partisan
Joined: 24 Sep 2003 Posts: 355
|
If a Propagated Message is failed in the Look up, I wud like to raise Exception (user Exception) and push to FailQ.
whereas continue to OutputQ for the Lookup Success.
Like If one Propagated message fails...can we continue with other messages rather than failing the whole input message??
thanks
-RR |
|
Back to top |
|
 |
kirani |
Posted: Wed Dec 29, 2004 11:32 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Well, why do you need to raise an exception if the lookup fails? IS is needed to log something?
I'd suggest that you use Filter node after you lookup.
Here is how your message flow will look,
MQInput->Compute1->Filter1(true)->MQOutput(output q).
Filter1(false)->MQOutput(fail q).
In your Compute1 node you can do the propogate. In Filter1 node you can do your lookup. If the lookup is successful you will return TRUE else you will return FALSE.
I guess this is what you wanted. correct? _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
Ramphart |
Posted: Thu Dec 30, 2004 12:23 am Post subject: |
|
|
 Disciple
Joined: 21 Jul 2004 Posts: 150 Location: South Africa, JHB
|
RocknRambo wrote: |
If a Propagated Message is failed in the Look up, I wud like to raise Exception (user Exception) and push to FailQ.
whereas continue to OutputQ for the Lookup Success.
-RR |
I agree with Kirani - you don't really need to raise an exeption.
If you don't want to use a filter node you could use a desination list. Set the destinationlist before your propagate to write the outgoing message to the relevant Queue. If the lookup fails destination list = FailQ, when lookup succeeds destination list = SuccessQ. _________________ Applications Architect |
|
Back to top |
|
 |
fschofer |
Posted: Thu Dec 30, 2004 3:38 am Post subject: |
|
|
 Knight
Joined: 02 Jul 2001 Posts: 524 Location: Mainz, Germany
|
Hi,
you could build something like this
MQInput->Compute_propagate->
TryCatch(try)->Compute_lookup->MQOutput
........................throws ExceptionX
........................if lookup fails
TryCatch(catch)->FilterExceptionX (true)->MQOutput(failq)
........................ ..FilterFilterExceptionX(false)-> Error Handling.
Greetings
Frank |
|
Back to top |
|
 |
RocknRambo |
Posted: Sun Jan 02, 2005 9:59 am Post subject: |
|
|
Partisan
Joined: 24 Sep 2003 Posts: 355
|
Thanks Frank, this did the job.
The reason, behing, raising the exception is part of business req. as this is needed for logging and re-processing.
-RR |
|
Back to top |
|
 |
|