NodeImpl nodeImpl = nodes.get(i);
List<DataPort> inputPorts = nodeImpl.getInputPorts();
int count = 0;
for (DataPort dataPort : inputPorts) {
if (dataPort.getFromNode() == null) {
Node inputNode = subWorkflow.addNode(new InputComponent());
inputNode.setPosition(new Point(Math.max(0,
nodeImpl.getPosition().x - 200), nodeImpl
.getPosition().y + count * 50));
subWorkflow.getGraph().addEdge(inputNode.getOutputPort(0),
dataPort);