Node subWorkflow = workflow.addNode(subWorkflowComponent);
subWorkflow.setPosition(new Point(350, 150));
// Output
OutputComponent outputComponent = new OutputComponent();
OutputNode outParamNode = (OutputNode) workflow
.addNode(outputComponent);
outParamNode.setPosition(new Point(800, 150));
// Connect ports
graph.addEdge(input1.getOutputPort(0), adder.getInputPort(0));
graph.addEdge(input2.getOutputPort(0), adder.getInputPort(1));
graph.addEdge(adder.getOutputPort(0), subWorkflow.getInputPort(0));
graph.addEdge(input3.getOutputPort(0), subWorkflow.getInputPort(1));
graph.addEdge(subWorkflow.getOutputPort(0), outParamNode
.getInputPort(0));
// Set the default values
// This needs to be after connection.
input1.setDefaultValue("2");