.getComponentTree().getChildAt(0);
Node cepNode = canvas.addNode(cepComponent.getComponentReference()
.getComponent(), new Point(300, 50));
Graph graph = this.engine.getGUI().getGraphCanvas().getGraph();
List<DataPort> cepOutPorts = cepNode.getOutputPorts();
int count = 0;
InputComponent inputComponent = new InputComponent();
LinkedList<InputNode> inputNodes = getStaticInputNodes(oldWorkflow);
List<DataPort> workflowInPorts = workflowNode.getInputPorts();
for (InputNode inputNode : inputNodes) {
List<Port> streamedInputOutPorts = inputNode.getOutputPort(0)
.getToPorts();
for (Port streamedInputOutPort : streamedInputOutPorts) {
for (DataPort dataPort : workflowInPorts) {
if (dataPort.getName().equals(
((DataPort) streamedInputOutPort).getName())) {
InputNode newNode = (InputNode) canvas.addNode(
inputComponent, new Point(250 + 5 * count,
200 + count * 50));
graph.addEdge(newNode.getOutputPort(0), dataPort);
newNode.setDefaultValue(inputNode.getDefaultValue());
break;
}
}
}
++count;
}
for (DataPort dataPort : workflowInPorts) {
if (dataPort.getFromNode() == null) {
graph.addEdge(cepOutPorts.get(0), dataPort);
}
}
List<DataPort> inputs = cepNode.getInputPorts();
count = 0;
for (DataPort dataPort : inputs) {
Node inputNode = canvas.addNode(inputComponent, new Point(
5 + 5 * count, 5 + count * 50));
graph.addEdge(inputNode.getOutputPort(0), dataPort);
++count;
}
OutputComponent outputComponent = new OutputComponent();
List<DataPort> outputPorts = workflowNode.getOutputPorts();
count = 0;
for (DataPort dataPort : outputPorts) {
Node outNode = canvas.addNode(outputComponent, new Point(
900 + count * 5, 100 + count * 50));
graph.addEdge(dataPort, outNode.getInputPort(0));
++count;
}
}