Author |
Message
|
prakusi |
Posted: Wed Feb 14, 2007 6:25 am Post subject: MB aborting flow in runtime |
|
|
Novice
Joined: 14 Feb 2007 Posts: 10
|
I have a MQinput, a Java compute node, and a MQoutput node.
i put some XML message in the queue of MQinput node and because of that flow gets triggred.
i want the flow to be executed after java compute node only if the message satisfes some condition, otherwise not.
How can i do this. |
|
Back to top |
|
 |
gregop |
Posted: Wed Feb 14, 2007 6:35 am Post subject: |
|
|
Voyager
Joined: 24 Nov 2006 Posts: 81
|
Message is propagated by:
out.propagate(assembly);
So condition that statement in your java. |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Feb 14, 2007 6:37 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Use a Filter node.
 _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
prakusi |
Posted: Wed Feb 14, 2007 10:05 pm Post subject: |
|
|
Novice
Joined: 14 Feb 2007 Posts: 10
|
I already tried out.propagate(assembly)
but error is coming.
"unhandeled exception in plugin method" |
|
Back to top |
|
 |
prakusi |
Posted: Wed Feb 14, 2007 10:08 pm Post subject: |
|
|
Novice
Joined: 14 Feb 2007 Posts: 10
|
i have to do this in java compute node.
i can't use ESQL code. and in filter node we use ESQL. so i cant use Filter node. |
|
Back to top |
|
 |
prakusi |
Posted: Wed Feb 14, 2007 10:11 pm Post subject: |
|
|
Novice
Joined: 14 Feb 2007 Posts: 10
|
I already tried conditioning out.propagate(assembly)
but when condition is not satisfied its giving error
"unhandeled exception in plugin method" |
|
Back to top |
|
 |
Spidyctf |
Posted: Wed Feb 14, 2007 10:17 pm Post subject: |
|
|
Newbie
Joined: 09 Dec 2006 Posts: 8
|
hey
U can use Java Compute Node as a filter Node...
In JCN there are two terminals.. Out and alt....
just propagate thru 'out' when condition is met ,otherwise thru 'alt' ...
hope this is what u want.........
cheers
 |
|
Back to top |
|
 |
prakusi |
Posted: Wed Feb 14, 2007 10:31 pm Post subject: |
|
|
Novice
Joined: 14 Feb 2007 Posts: 10
|
i dont want to propagate if condition is not satisfied.
if condition is satisfied i want to propagate to out otherwise stop the flow. |
|
Back to top |
|
 |
au@kosa |
Posted: Wed Feb 14, 2007 10:32 pm Post subject: conditional propogate in JCN |
|
|
 Centurion
Joined: 04 Jan 2007 Posts: 103 Location: pune
|
Spidy,
What pravin meant from his question is
if the condition met he want to extract and propagate the message in JCN else he does not want to do nothing. Am i right pravin.
In ESQL there is option
Propagate NOWHERE. _________________ Regards,
au@kosa
IBM Certified SOA Solution Designer/Associate |
|
Back to top |
|
 |
prakusi |
Posted: Wed Feb 14, 2007 10:37 pm Post subject: |
|
|
Novice
Joined: 14 Feb 2007 Posts: 10
|
yes you are right!!!
i want do the same as you mentioned. |
|
Back to top |
|
 |
elvis_gn |
Posted: Wed Feb 14, 2007 10:48 pm Post subject: Re: conditional propogate in JCN |
|
|
 Padawan
Joined: 08 Oct 2004 Posts: 1905 Location: Dubai
|
Hi prakusi,
au@kosa wrote: |
Propagate NOWHERE. |
In that case, do an out.propagate(assembly)(to whichever terminal) and don't connect that terminal in the flow
Regards. |
|
Back to top |
|
 |
prakusi |
Posted: Wed Feb 14, 2007 11:03 pm Post subject: |
|
|
Novice
Joined: 14 Feb 2007 Posts: 10
|
thanks elvis_gn
its working fine now. |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Feb 15, 2007 2:39 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
or simply do not do out.propagate(assembly).
 _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
elvis_gn |
Posted: Thu Feb 15, 2007 4:19 am Post subject: |
|
|
 Padawan
Joined: 08 Oct 2004 Posts: 1905 Location: Dubai
|
Hi jeff,
jefflowrey wrote: |
or simply do not do out.propagate(assembly).
 |
I thought of that after I posted the reply Didn't want to take the pain of editing, plus wouldn't it be better that, if tomorrow prakusi decides to take the "false" of the filter, he wouldn't have to change code.. Do u think performance difference will be noticable ?
Regards. |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Feb 15, 2007 4:39 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Performance difference? Between calling an undefined subroutine, and not calling an undefined subroutine?
I suppose someone *could* measure a difference. I don't know why they'd bother. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
|