ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum IndexWebSphere Message Broker (ACE) SupportOutputRoot.Properties.MessageType

Post new topicReply to topic
OutputRoot.Properties.MessageType View previous topic :: View next topic
Author Message
ramki
PostPosted: Fri Jan 25, 2002 3:01 pm Post subject: Reply with quote

Apprentice

Joined: 25 Sep 2001
Posts: 28

I used the "OutputDestinationList" as below in the if conditions as mentioned.
SET OutputDestinationList.Destination.MQDestinationList.DestinationData[1].queueName='xxxx'
Thanks for the Solution. But there is still a problem here......

Actually I am also setting the OutputRoot as below based on the if condition.
IF CONDITION X = 'Y' THEN
SET OutputRoot.Properties.MessageType = 'm_message1';
TRANSFORMATION1
SET OutputDestinationList.Destination.MQDestinationList.DestinationData[1].queueName = 'first.IN';
END IF;

IF CONDITION Z = 'Y' THEN
SET OutputRoot.Properties.MessageType = 'm_message1';
TRANSFORMATION2
SET OutputDestinationList.Destination.MQDestinationList.DestinationData[2].queueName = 'second.IN';
END IF;

In my code i used the if conditions to Set the OutputRoot.Properties.MessageType and OutputDestinationList.Destination.MQDestinationList.DestinationData[1].queueName

The problem is I am getting the messages in the other Else-Queue and also in the target Queue. I mean I am getting extra messages on the second queue.

Please let me know if I shouldn't use this way. Thanks in advance.
Back to top
View user's profile Send private message Yahoo Messenger
mpuetz
PostPosted: Sat Jan 26, 2002 1:21 pm Post subject: Reply with quote

Centurion

Joined: 05 Jul 2001
Posts: 149
Location: IBM/Central WebSphere Services

Hi,

I don't quite get the logic of this, so please elaborate.

Are you trying to say that you do all of this in a single compute
node like this

if condition1 then
transform1
detination1
end if

if condition2 then
transform2
destination2
end if

i.e. are conditions 1 and 2 mutually exclusive, or can both
be true at the same time ?


_________________
Mathias Puetz

IBM/Central WebSphere Services
WebSphere Business Integration Specialist
Back to top
View user's profile Send private message
ramki
PostPosted: Sat Jan 26, 2002 5:46 pm Post subject: Reply with quote

Apprentice

Joined: 25 Sep 2001
Posts: 28

Yes I am trying to do these different transformations on one compute node.
The data Coming in is of the same format, but the data is transformed in the compute node based on If coditions into different Output formts and has to send to different Destination Queues.

IF CONDITION InputBody.elemet1 = 'Y' THEN
SET OutputRoot.Properties.MessageType = 'm_message_type1';
TRANSFORMATION1
SET OutputDestinationList.Destination.MQDestinationList.DestinationData[1].queueName = 'Type1.IN';
END IF;

IF CONDITION InputBody.elemet1 = 'Z' THEN
SET OutputRoot.Properties.MessageType = 'm_message_type2';
TRANSFORMATION2
SET OutputDestinationList.Destination.MQDestinationList.DestinationData[2].queueName = 'Type2.IN';
END IF;

I could solve this problem by sending the data from InputNode to three different
Compute nodes and do the respective transformations in each compute node and then send to OutputNode attached to each computeNode. This meathod makes the data send to 3compute nodes making the data parse 3times.

I really doubt if we can do this in one compute node way. Please let me know if it is possible.
better way.


Thanks In Advance.
Back to top
View user's profile Send private message Yahoo Messenger
mpuetz
PostPosted: Sun Jan 27, 2002 4:36 am Post subject: Reply with quote

Centurion

Joined: 05 Jul 2001
Posts: 149
Location: IBM/Central WebSphere Services

Hi,

ok, so your conditions for transform1 and trandform2
are mutually exclusive. Then you can do it in a single
compute node.

Your mistake is to increment the DestinationData index to 2 in
SET OutputDestinationList.Destination.MQDestinationList.DestinationData[2].queueName = 'Type2.IN';

since the DestinationData[1] has never been created you shouldn't
be able to access element number 2 (i.e. you should have gotten
a runtime error stating that you can't access the second element
of name DestinationData).
Always use DestinationData[1] and it should work. (acutally if you
leave out the index completely defaults to [1] anyway).
Since didn't get the runtime error for accessing the wrong index
I assume you have modified the DestinationData[] list before this
node in your flow and it might still contain some stale entries.
So do a

SET OutputDestinationList.Destination.MQDestinationList = NULL;

first to make sure no stale entries get in the way.



_________________
Mathias Puetz

IBM/Central WebSphere Services
WebSphere Business Integration Specialist
Back to top
View user's profile Send private message
ramki
PostPosted: Mon Jan 28, 2002 8:58 am Post subject: Reply with quote

Apprentice

Joined: 25 Sep 2001
Posts: 28

"mutually exclusive". Can't we have some condition which is not mutually exclusive.
I mean, in the above problem there is one more condition which satisfies both the If conditions and has to go thru the different transformations with different OutputRoots. how can we assign the Destination list with two different formats and to different queues.

Thanks in advance!!


IF CONDITION InputBody.elemet1 = 'Y' THEN
SET OutputRoot.Properties.MessageType = 'm_message_type1';
TRANSFORMATION1
SET OutputDestinationList.Destination.MQDestinationList.DestinationData[1].queueName = 'Type1.IN';
END IF;

IF CONDITION InputBody.elemet1 = 'Z' THEN
SET OutputRoot.Properties.MessageType = 'm_message_type2';
TRANSFORMATION2
SET OutputDestinationList.Destination.MQDestinationList.DestinationData[1].queueName = 'Type2.IN';
END IF;

IF CONDITION InputBody.elemet1 = 'Y' OR 'A' THEN
SET OutputRoot.Properties.MessageType = 'm_message_typecommon';
TRANSFORMATION1
SET OutputDestinationList.Destination.MQDestinationList.DestinationData[2].queueName = 'common.IN';
END IF;

Back to top
View user's profile Send private message Yahoo Messenger
kirani
PostPosted: Mon Jan 28, 2002 12:08 pm Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

Ramki,

Please see the code below for an example of destinationList. Hope this will help you in understanding how destinationlist works.


Lets say, depending on Value of “element1” you want to apply different transformations and the output should goto different queues. Here I am assuming that the conditions are "mutual exclusive".

The code for this is,

IF (condition 1) THEN
--TRANSFORMATION1
SET OutputRoot.Properties.MessageType = 'm_message_type1';
SET OutputDestinationList.Destination.MQDestinationList.DestinationData[1].queueName = 'Type1.IN';
END IF;

IF (condition 2) THEN
--TRANSFORMATION2
SET OutputRoot.Properties.MessageType = 'm_message_type2';
SET OutputDestinationList.Destination.MQDestinationList.DestinationData[1].queueName = 'Type2.IN';
END IF;

IF (condition 3) THEN
--TRANSFORMATION3
SET OutputRoot.Properties.MessageType = 'm_message_type3';
SET OutputDestinationList.Destination.MQDestinationList.DestinationData[1].queueName = 'Type3.IN';
END IF;


You cannot apply different transformations in one compute node, if your conditions are not mutual exclusive. You cannot create 2 different output messages in one compute node. To achieve this kind of requirement you should use multiple compute nodes.

I hope its clear now.

Regards,
Kiran
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexWebSphere Message Broker (ACE) SupportOutputRoot.Properties.MessageType
Jump to:



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
Protected by Anti-Spam ACP


Theme by Dustin Baccetti
Powered by phpBB 2001, 2002 phpBB Group

Copyright MQSeries.net. All rights reserved.