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 Index » WebSphere Message Broker (ACE) Support » How to use JavaCompute node with RouteToLabel, Label nodes?

Post new topic  Reply to topic
 How to use JavaCompute node with RouteToLabel, Label nodes? « View previous topic :: View next topic » 
Author Message
kevin.shen
PostPosted: Fri Nov 09, 2007 8:34 am    Post subject: How to use JavaCompute node with RouteToLabel, Label nodes? Reply with quote

Novice

Joined: 05 Sep 2007
Posts: 18

I designed a message flow using JavaCompute, RouteToLabel, Label nodes to route messages to subflows based on the content of the message, see diagram below


JavaCompute ---> RouteToLabel ---> Labels --> Subflows

and here is my code segment in JavaCompute:

String label = (String) assembly.getMessage().evaluateXPath("string(/PROCESS_PATH/DOWNLOAD)");
MbMessage localEnv = new MbMessage(assembly.getLocalEnvironment());

localEnv.getRootElement().
createElementAsLastChild (MbElement.TYPE_NAME, "Destination", null).
createElementAsLastChild(MbElement.TYPE_NAME, "RouterList", null).
createElementAsLastChild(MbElement.TYPE_NAME, "DestinationData", null).
createElementAsLastChild(MbElement.TYPE_NAME_VALUE, "labelname", label);

MbOutputTerminal out = getOutputTerminal("out");
out.propagate(new MbMessageAssembly(assembly, localEnv));

I got "Invalid label name" error, can anyone tell me anything wrong?

Thanks a lot!
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Fri Nov 09, 2007 8:52 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Are you sure your labelname field is holding a valid label name?

Also, for reference: http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r0m0/index.jsp?topic=/com.ibm.etools.mft.doc/ac30470_.htm

You may not be using the right constructor for your MessageAssembly.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
kevin.shen
PostPosted: Fri Nov 09, 2007 9:20 am    Post subject: Reply with quote

Novice

Joined: 05 Sep 2007
Posts: 18

jefflowrey wrote:
Are you sure your labelname field is holding a valid label name?

Also, for reference: http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r0m0/index.jsp?topic=/com.ibm.etools.mft.doc/ac30470_.htm

You may not be using the right constructor for your MessageAssembly.


You are right, something wrong with the constructor, now it is working
However, this constructor is deprecated
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » How to use JavaCompute node with RouteToLabel, Label nodes?
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.