Author |
Message
|
manojsu |
Posted: Tue Jul 25, 2006 9:10 pm Post subject: How to use RouteTolabel Node |
|
|
Centurion
Joined: 19 Jul 2006 Posts: 147 Location: Bangalore
|
Hello,
I have newly strated on the MB6, I would like to use multiple conditions. and the route the message flow. The only solution is Filter but it allows one condition.
The other choice is routetolable node.
Can some one help me on how to route the mesages based on the input messages.. to the corresponding lables, at the earliest.
Best Regards
S.Manoj |
|
Back to top |
|
 |
elvis_gn |
Posted: Tue Jul 25, 2006 9:51 pm Post subject: Re: How to use RouteTolabel Node |
|
|
 Padawan
Joined: 08 Oct 2004 Posts: 1905 Location: Dubai
|
Hi manojsu,
manojsu wrote: |
I have newly strated on the MB6, I would like to use multiple conditions. and the route the message flow. The only solution is Filter but it allows one condition.
The other choice is routetolable node.
Can some one help me on how to route the mesages based on the input messages.. to the corresponding lables, at the earliest. |
If you have to implement different kinds of logic on the input message based on the content, then we understand ur sending it to different sub-flows using Label nodes.
You'll have to use something like this
Code: |
IF InputRoot.XML.PassengerQuery.ReservationNumber<>'' THEN
SET OutputLocalEnvironment.Destination.RouterList.DestinationData[1].labelname = 'SinglePassenger';
ELSE
SET OutputLocalEnvironment.Destination.RouterList.DestinationData[1].labelname = 'AllReservations';
END IF; |
Where, SinglePassenger and AllReservations are two Labels for the Label Nodes.
If you simply want to put it into different queues then use destinationList with an MQOutput Node.
Regards. |
|
Back to top |
|
 |
manojsu |
Posted: Wed Jul 26, 2006 12:24 am Post subject: |
|
|
Centurion
Joined: 19 Jul 2006 Posts: 147 Location: Bangalore
|
Hello Elvis,
Many Thanks for the reply, is it a must that the label be in another subflow..
basically I want tp use something like and hence using first a compute node, followed by route to label node, then label. (please do suggest better alternatives too).
IF
THEN label
ELSE IF
THEN label
ELSE IF
THEN label
ELSE IF
THEN label
END IF;
Best Regards
S.Manoj |
|
Back to top |
|
 |
wschutz |
Posted: Wed Jul 26, 2006 2:03 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
|
Back to top |
|
 |
manojsu |
Posted: Wed Jul 26, 2006 2:33 am Post subject: |
|
|
Centurion
Joined: 19 Jul 2006 Posts: 147 Location: Bangalore
|
I did mean that(mistake in the label names),
I wanted to route based on the inflow messages, |
|
Back to top |
|
 |
wschutz |
Posted: Wed Jul 26, 2006 2:40 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
Quote: |
is it a must that the label be in another subflow.. |
The label can be anywhere in the same flow as the RouteToLabel node, including subflows.
Remember that at deploy time, all subflows are resolved into the "main flow" anyways. The Broker doesn't know what a subflow is.
And, if you are using Broker V6, you can use "PROPAGATE to LABEL" directly in your ESQL and skip the RouteToLabel node all together. _________________ -wayne |
|
Back to top |
|
 |
|