Author |
Message
|
kiestrada |
Posted: Wed Jul 17, 2002 7:17 pm Post subject: Message Routing |
|
|
Novice
Joined: 19 Jun 2002 Posts: 12
|
I have the following situation:
If field1 = A then send to queue A
If filed1 = B then send to queue B
I plan to use MQInput node ==> Compute node ==> MQOutput node.
I am still new to WMQI, Could anyone provide detail information?
Thanks. |
|
Back to top |
|
 |
kirani |
Posted: Wed Jul 17, 2002 7:24 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Sure ... Depending on your condition, you could setup queuename in DestinationList in your compute node. Don't forget to pass DestinationList also in your Compute mode.
In MQOutput node, under Advanced tab, you should select DestinationList instead of queueName. _________________ 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 |
|
 |
kiestrada |
Posted: Wed Jul 17, 2002 7:34 pm Post subject: |
|
|
Novice
Joined: 19 Jun 2002 Posts: 12
|
Thanks for your immediate reply.
Could you please further enlighten me on the ESQL in compute node. |
|
Back to top |
|
 |
kirani |
Posted: Wed Jul 17, 2002 7:41 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
In your compute node, ESQL code will look similar to this:
Code: |
If ( field1 = 'A' ) THEN
SET OutputLocalEnvironment.Destination.MQ.DestinationData[1].queueName = 'queueA';
ELSE IF ( field1 = 'B') THEN
SET OutputLocalEnvironment.Destination.MQ.DestinationData[1].queueName = 'queueB';
END IF;
END IF;
|
Above ESQL will work in WMQI 2.1. If you are using lower version of MQSI then above code needs to be changed to use DestinationList instead. DestinationList has little different structure.
Let me know how it goes. _________________ 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 |
|
 |
kiestrada |
Posted: Fri Jul 19, 2002 6:09 pm Post subject: |
|
|
Novice
Joined: 19 Jun 2002 Posts: 12
|
Hi Kiran,
I am using 2.0.1. I have replaced the destinationData with detinationList. It can't be deployed. The error message is 'OutputLocalEnvironment' is not valid.
Subsequently I changed OutputLocalEnvironment to OutputRoot, all messages went to failure queue.
Thanks |
|
Back to top |
|
 |
kirani |
Posted: Fri Jul 19, 2002 9:42 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Hi,
In lower version of MQSI you will have to use following code instead:
Code: |
If ( field1 = 'A' ) THEN
SET OutputDestinationList.Destination.MQDestinationList.DestinationData[1].queueName = 'queueA';
ELSE IF ( field1 = 'B') THEN
SET OutputDestinationList.Destination.MQDestinationList.DestinationData[1].queueName = 'queueB';
END IF;
END IF;
|
_________________ 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 |
|
 |
kiestrada |
Posted: Mon Jul 22, 2002 4:11 pm Post subject: |
|
|
Novice
Joined: 19 Jun 2002 Posts: 12
|
Thanks Kiran. I tried a simple scenario as follow:-
field1 (string 1)
field2 (string 3)
Well the message end up in the failure queue. Below is the trace:
1) for Input message = A123
BIP2619E: Output node 'queue B' expected a distribution list but one did not exist.
2) If my input message is B123, then the error is BIP2619E: Output node 'queue A' expected a distribution list but did not exist.
I have the output node configure as follows:
Basic tab: Queue A
Advanced tab: Destination List
Thanks for your help. |
|
Back to top |
|
 |
kirani |
Posted: Mon Jul 22, 2002 4:36 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
What about your Compute node?? What do you have in Compute mode, under Advanced Tab? Depending on your processing, you should have "DestinationList" as a part of Compute mode. _________________ 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 |
|
 |
kiestrada |
Posted: Mon Jul 22, 2002 6:05 pm Post subject: |
|
|
Novice
Joined: 19 Jun 2002 Posts: 12
|
Compute Node: Destination (Advanced Tab)
The options in the Advanced Tab are:
Message, Destination, Destination and message, Exception, Exception and Messagve, Exceptiona and Destination, All |
|
Back to top |
|
 |
kirani |
Posted: Mon Jul 22, 2002 6:29 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
If you are modifying your message in the compute node then you should set the destination mode to "Message and DestinationList". _________________ 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 |
|
 |
kiestrada |
Posted: Mon Jul 22, 2002 6:36 pm Post subject: |
|
|
Novice
Joined: 19 Jun 2002 Posts: 12
|
I have changed to Message and Destination.
Well the message now stays at input queue. Is there anything that I should check? typo??
Thanks |
|
Back to top |
|
 |
kirani |
Posted: Mon Jul 22, 2002 6:41 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Can you post your ESQL code here? Also pl explain your Message flow here.
MQInput(xml)->Compute1->MQOutput. _________________ 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 |
|
 |
kiestrada |
Posted: Mon Jul 22, 2002 7:01 pm Post subject: |
|
|
Novice
Joined: 19 Jun 2002 Posts: 12
|
Input Node --> Compute Node --> Output Node
Input Node => MRM, message set, message type, message format=CWF
Field1 (String 1)
Filed2 (String 2)
Failure => Output Node (Failure)
Out => Compute Node
Compute Node => Destination and Message (Advanced tab)
If ('Field1' = 'A') THEN
SET OutputDestinationList.Destination.MQDestinationList.DestinationData[1].queueName = 'QueueA';
ELSE IF ('Field1' = 'B') THEN
SET OutputDestinationList.Destination.MQDestinationList.DestinationData[1].queueName = 'QueueB';
END IF;
END IF;
Output Node:
Queue Name: QueueA
Advanced: Destination List
Output Node:
Queue Name: QueueB
Advanced: Destination List
Thanks. |
|
Back to top |
|
 |
kirani |
Posted: Mon Jul 22, 2002 7:10 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Compute node:
If you don't select "Copy Message Headers" or "Copy entire Message". Your Compute mode should be set to "Destination" only.
If you select Copy entire message then set destination Mode to "Message and DestinationList".
Your ESQL remains same in the compute node.
There should be only one MQOutput node.
Queue Name: should be set to nothing.
Advanced: DestinationList.
Have a trace node in between Compute node and MQOutput node and print the trace to file. Print ${DestinationList} in it and see if the list is getting set properly. _________________ 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 |
|
 |
kiestrada |
Posted: Wed Jul 24, 2002 6:38 pm Post subject: |
|
|
Novice
Joined: 19 Jun 2002 Posts: 12
|
Hi Kiran,
Below was my latest trial:
Compute node:
Didn't select "Copy Message Headers" or "Copy entire Message". And the Compute mode set to "Destination".
ESQL remained same in the compute node.
one MQOutput node.
Queue Name: set to nothing.
Advanced: Destination.
[Case 1]Add a trace node in between Compute node and MQOutput node and print the trace to file. Print ${DestinationList}
Outcome --> message sent to failure queue(@ input node, i.e. before compute node). Nothing appeared in the trace node
[Case 2]Add additional trace node in between input node and Compute node and print the trace to file. Print ${DestinationList}. Also tried Print${ExceptionList}
Outcome --> message sent to failure queue(@ input node, i.e. before compute node). Nothing appeared in the trace node.
Thanks |
|
Back to top |
|
 |
|