WebSphere Message Broker, Version 8.0.0.7
Operating Systems: AIX, HP-Itanium, Linux, Solaris, Windows, z/OS
See information about the latest product version
See information about the latest product version
Copying a node
Use the Message Broker Java™ API to modify a pattern instance to copy a node or subflow node to a message flow.
You can copy a built-in or subflow node by using the clone() method.
In the following example, a new MQInput node mqinNode is
created and properties on the node are set. A new MQInput node mqinNode1 is
then created by copying mqinNode by using the clone() method.
When the node is copied, the node properties are also copied:
MessageFlow mf1 = patternInstanceManager.getMessageFlow("MyFlowProject", "main.msgflow");
MQInputNode mqinNode = new MQInputNode();
mqinNode.setNodeName("My Input Node");
mqinNode.setQueueName("INPUTQ");
MQInputNode mqinNode1 = (MQInputNode) mqinNode.clone();
mqinNode1.setNodeName("Copy of My Input Node");
mf1.addNode(mqinNode1);