|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
How to send msg from compute node to 2 different nodes?? |
« View previous topic :: View next topic » |
Author |
Message
|
Fuzzy_mq |
Posted: Mon Sep 20, 2004 12:59 am Post subject: How to send msg from compute node to 2 different nodes?? |
|
|
Apprentice
Joined: 27 May 2004 Posts: 31 Location: US
|
Hai folks,
My req. goes like this:
I have CWF coming in the messag flow. Now in the compute node I have to do some validations and split the message into two strings(Both are fixed length). Now the each string is to be routed to different subflows from the same compute node.
e.g I have details of 4 orders coming in a message. If 3rd order has errors, then only 3rd order details will go in say exception flow and the remaining 3 orders should go thru the mail flow.
Is there any node that can help me to do this? Or Which is the best way to accomplish this?
Regards,
Suchit |
|
Back to top |
|
 |
mgk |
Posted: Mon Sep 20, 2004 1:15 am Post subject: |
|
|
 Padawan
Joined: 31 Jul 2003 Posts: 1642
|
Hi,
If I understand your correctly, I would route each string as seperate message from the Compute node with PROPOGATE into a Filter node, where I would filter on some value (maybe you place a flag in the LocalEnvironment,?) then route the message from the filter into your subflows based on your filter test.
Cheers, _________________ MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions. |
|
Back to top |
|
 |
Fuzzy_mq |
Posted: Mon Sep 20, 2004 2:03 am Post subject: |
|
|
Apprentice
Joined: 27 May 2004 Posts: 31 Location: US
|
Thanks mgk for the response.
I will test this out and let you know if it worked fine for me!
Regards,
Suchit |
|
Back to top |
|
 |
Fuzzy_mq |
Posted: Mon Sep 20, 2004 3:31 am Post subject: |
|
|
Apprentice
Joined: 27 May 2004 Posts: 31 Location: US
|
Okey, I put the logic that you said in my flow, but am facing a issue.
The message goes thru the first flow fine, but when it processes the second flow it throw me out!!
I am convertion a CWF into XML. After the filter node I have ResetContentDescriptor which coverts blob into MRM. It works fine for the first case when ExceptionFlag=0 but it gives exception "Message has no properties folder" when ExceptionFlag=1.
My ESQL in the compute node is like this:
------------------------------
DECLARE C INTEGER;
SET C = CARDINALITY(InputRoot.*[]);
DECLARE I INTEGER;
SET I = 1;
WHILE I < C DO
SET OutputRoot.*[I] = InputRoot.*[I];
SET I=I+1;
END WHILE;
-- Enter SQL below this line. SQL above this line might be regenerated, causing any modifications to be lost.
DECLARE OUTPUTMESSAGE CHAR;
DECLARE INPUTMESSAGE CHAR;
SET INPUTMESSAGE = CAST (InputRoot."BLOB"."BLOB" AS CHAR CCSID InputRoot.MQMD.CodedCharSetId);
SET OUTPUTMESSAGE = SUBSTRING(INPUTMESSAGE FROM 1 FOR 56);
SET OutputRoot."BLOB"."BLOB" = CAST(OUTPUTMESSAGE as BLOB CCSID InputRoot.MQMD.CodedCharSetId);
SET OutputLocalEnvironment.Destination.MQ.Routing.ExceptionFlag=0;
PROPAGATE;
SET OUTPUTMESSAGE = '';
SET OUTPUTMESSAGE = SUBSTRING (INPUTMESSAGE FROM 57);
SET OutputRoot."BLOB"."BLOB" = CAST(OUTPUTMESSAGE as BLOB CCSID InputRoot.MQMD.CodedCharSetId);
SET OutputLocalEnvironment.Destination.MQ.Routing.ExceptionFlag=1;
PROPAGATE;
RETURN FALSE;
-------------------------------------------------------
Where am I going wrong here???
Regards,
Suchit |
|
Back to top |
|
 |
mgk |
Posted: Mon Sep 20, 2004 4:12 am Post subject: |
|
|
 Padawan
Joined: 31 Jul 2003 Posts: 1642
|
Hi,
You have forgotten to copy the headers from InputRoot to OutputRoot after the first propogage call. Propagate clears the Output trees when it returns, so you need to set them all up again for each call.
Cheers, _________________ MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions. |
|
Back to top |
|
 |
Fuzzy_mq |
Posted: Mon Sep 20, 2004 4:37 am Post subject: |
|
|
Apprentice
Joined: 27 May 2004 Posts: 31 Location: US
|
Thanks a log MGK.
This worked perfect for my requirements.
Very much appreciated.
Thanks and Regards,
Suchit |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|