public class SubFlowNode extends Node implements java.lang.Cloneable
Each SubFlowNode instance represents a SubFlowNode within a message flow.
Use the following to create connections from this SubFlowNodes Input and Output Nodes to other nodes:
File msgFlow1 = new File("Test.msgflow"); MessageFlow mf = FlowRendererMSGFLOW.read(msgFlow1); File msgFlow1 = new File("SubFlowTest.msgflow"); MessageFlow subMf = FlowRendererMSGFLOW.read(msgFlow1); SubFlowNode subNode = new SubFlowNode(); subNode.setNodeName("MySubFlow"); subNode.setSubFlow(subMf); // Important as the terminal label names are not available unless we have a reference to the sub flow // You can still access the terminals in raw form via the getInputTerminals and getOutputTerminals. mf.addNode(subNode); InputTerminal subFlowInputTerminal = subNode.getInputTerminal("Message In"); OutputTerminal[] terminals = subNode.getOutputTerminals(); OutputTerminal subFlowOutTerminal = terminals[0]; mf.connect(mqin.OUTPUT_TERMINAL_FAILURE, subFlowInputTerminal);
If you are altering an existing SubFlowNode in a message flow then you need to remember to set the SubFlow before getting the terminals:
SubFlowNode subNode = (SubFlowNode)mf.getNodeByName("MySubFlow"); subNode.setSubFlow(subMf);
Change Activity: -------- ----------- ------------- ------------------------------------ Reason: Date: Originator: Comments: -------- ----------- ------------- ------------------------------------ xxxxx.x 2010-08-10 dstorey v7.0.0.2 Release xxxxx.x 2011-07-06 dstorey v8.0.0.0 Release
Node.RotationKind
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
copyright |
Constructor and Description |
---|
SubFlowNode()
Create a new SubFlowNode.
|
Modifier and Type | Method and Description |
---|---|
SubFlowNode |
addNodeProperty(NodeProperty nodeProperty) |
NodeProperty |
findPropertyByName(java.lang.String propertyName)
Finds the NodeProperty on the node of the given node property name
|
InputTerminal |
getInputTerminal(java.lang.String terminalName)
Gets the input terminal for the node.
|
InputTerminal |
getInputTerminal(java.lang.String terminalName,
boolean dynamic) |
InputTerminal[] |
getInputTerminals()
Gets the full list of available InputTerminals for this Node
|
NodeProperty[] |
getNodeProperties()
Returns the list of simple properties which are available to set on this node
No instance values are set here.
|
OutputTerminal |
getOutputTerminal(java.lang.String terminalName)
Gets the output terminal for the node.
|
OutputTerminal |
getOutputTerminal(java.lang.String terminalName,
boolean dynamic) |
OutputTerminal[] |
getOutputTerminals()
Gets the full list of available OutputTerminals for this Node
|
java.lang.String |
getTypeName()
Gets the node type of this node
|
SubFlowNode |
setProperty(java.lang.String propertyName,
java.lang.String propertyValue)
Allows the setting a node property directly by name and value
|
SubFlowNode |
setSubFlow(MessageFlow subFlow)
This needs to be set if you want to get access to the label terminals of this subflow node
|
addNsmapping, clone, getInstanceNodeProperties, getLocation, getLongDescription, getMandatoryPropertyNames, getNodeName, getNodePropertyTables, getNsmappingtables, getPropertyDefaultValue, getPropertyNames, getPropertyValue, getRotate, getShortDescription, isUdpSupport, removeNsmapping, setLocation, setLocation, setLongDescription, setNodeName, setNsmappingtables, setRotate, setShortDescription, toString
public static final java.lang.String copyright
public SubFlowNode()
MessageFlow mf = patternInstanceManager.getMessageFlow("MyFlowProject", "mf1.msgflow"); MessageFlow subMf = patternInstanceManager.getMessageFlow("MyFlowProject", "subFlow.msgflow"); SubFlowNode subNode = new SubFlowNode(); subNode.setNodeName("MySubFlow"); subNode.setSubFlow(subMf); // Important as the terminal label names are not available unless we have a reference to the sub flow You can still access the terminals in raw form via the getInputTerminals and getOutputTerminals. mf.addNode(subNode); InputTerminal subFlowInputTerminal = getInputTerminal("Message In"); OutputTerminal[] terminals = subNode.getOutputTerminals(); OutputTerminal subFlowOutTerminal = terminals[0]; mf.connect(mqin.OUTPUT_TERMINAL_FAILURE, subFlowInputTerminal);
public SubFlowNode setSubFlow(MessageFlow subFlow)
MessageFlow
- subflow; the subflow message flow this subflow node is pointing toopublic java.lang.String getTypeName()
Node
getTypeName
in class Node
public InputTerminal[] getInputTerminals()
Node
getInputTerminals
in class Node
public OutputTerminal[] getOutputTerminals()
Node
getOutputTerminals
in class Node
public OutputTerminal getOutputTerminal(java.lang.String terminalName)
Node
getOutputTerminal
in class Node
public OutputTerminal getOutputTerminal(java.lang.String terminalName, boolean dynamic)
getOutputTerminal
in class Node
public InputTerminal getInputTerminal(java.lang.String terminalName)
Node
getInputTerminal
in class Node
public InputTerminal getInputTerminal(java.lang.String terminalName, boolean dynamic)
getInputTerminal
in class Node
public NodeProperty[] getNodeProperties()
Node
public SubFlowNode addNodeProperty(NodeProperty nodeProperty)
public SubFlowNode setProperty(java.lang.String propertyName, java.lang.String propertyValue)
Node
setProperty
in class Node
public NodeProperty findPropertyByName(java.lang.String propertyName)
Node
findPropertyByName
in class Node