Removing a node
Use the IBM Integration API when developing message flow applications to remove a node from a message flow.
To remove a node, you must first get the required node from the message flow
object. In the following example, the getNodeByName() method is used
to get the required node from message flow object mf1. The node is
then removed by using the removeNode() method. When a node is
removed, any connections to or from the node are also
removed.
File msgFlow = new File("main.msgflow");
MessageFlow mf1 = FlowRendererMSGFLOW.read(msgFlow);
Node mqinNode = mf1.getNodeByName("My Input Node");
mf1.removeNode(mqinNode);
Pattern authoring
The following example is the same as the previous, but for pattern authoring:
MessageFlow mf1 = patternInstanceManager.getMessageFlow("MyFlowProject", "main.msgflow");
Node mqinNode = mf1.getNodeByName("My Input Node");
mf1.removeNode(mqinNode);