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 |
protected static java.lang.String |
sccsid
Build information (for tracing)
|
dynamicInputTerminals, dynamicOutputTerminals, nodePropertyTables, udpSupport
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
|
addAdditionalProperty, addMonitorEvent, addNsmapping, clone, createNewInputTerminal, createNewInputTerminal, createNewOutputTerminal, createNewOutputTerminal, getAllNodeProperties, getInstanceNodeProperties, getLocation, getLongDescription, getMandatoryPropertyNames, getMonitorEvents, getNodeId, getNodeName, getNodePropertyTables, getNsmappingtables, getPropertyDefaultValue, getPropertyNames, getPropertyValue, getRotate, getShortDescription, getUUID, isUdpSupport, removeMonitorEvent, removeNsmapping, setLocation, setLocation, setLongDescription, setMonitorEvents, setNodeId, setNodeName, setNsmappingtables, setRotate, setShortDescription, toString
public static final java.lang.String copyright
protected static final java.lang.String sccsid
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)
subFlow
- MessageFlow ; 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
terminalName
- String; the internal terminal namepublic OutputTerminal getOutputTerminal(java.lang.String terminalName, boolean dynamic)
getOutputTerminal
in class Node
public InputTerminal getInputTerminal(java.lang.String terminalName)
Node
getInputTerminal
in class Node
terminalName
- String; the internal terminal namepublic InputTerminal getInputTerminal(java.lang.String terminalName, boolean dynamic)
getInputTerminal
in class Node
public NodeProperty[] getNodeProperties()
Node
getNodeProperties
in class Node
public SubFlowNode addNodeProperty(NodeProperty nodeProperty)
public SubFlowNode setProperty(java.lang.String propertyName, java.lang.String propertyValue)
Node
setProperty
in class Node
propertyName
- String; A given node propertypropertyValue
- String; A given node valuepublic NodeProperty findPropertyByName(java.lang.String propertyName)
Node
findPropertyByName
in class Node
propertyName
- String; the property name