|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
How to use JavaCompute node with RouteToLabel, Label nodes? |
« View previous topic :: View next topic » |
Author |
Message
|
kevin.shen |
Posted: Fri Nov 09, 2007 8:34 am Post subject: How to use JavaCompute node with RouteToLabel, Label nodes? |
|
|
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 |
|
 |
jefflowrey |
Posted: Fri Nov 09, 2007 8:52 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
|
Back to top |
|
 |
kevin.shen |
Posted: Fri Nov 09, 2007 9:20 am Post subject: |
|
|
Novice
Joined: 05 Sep 2007 Posts: 18
|
You are right, something wrong with the constructor, now it is working
However, this constructor is deprecated |
|
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
|
|
|
|