// Input node 4
InputNode inputNode4 = (InputNode) workflow.addNode(this.inputComponent);
inputNode4.setPosition(new Point(20, 240));
// Output
OutputNode outputNode = (OutputNode) workflow.addNode(this.outputComponent);
outputNode.setPosition(new Point(500, 130));
// Connect ports
graph.addEdge(inputNode1.getOutputPort(0), adderNode1.getInputPort(0));
graph.addEdge(inputNode2.getOutputPort(0), adderNode1.getInputPort(1));
graph.addEdge(inputNode3.getOutputPort(0), adderNode2.getInputPort(0));
graph.addEdge(inputNode4.getOutputPort(0), adderNode2.getInputPort(1));
graph.addEdge(adderNode1.getOutputPort(0), multiNode.getInputPort(0));
graph.addEdge(adderNode2.getOutputPort(0), multiNode.getInputPort(1));
graph.addEdge(multiNode.getOutputPort(0), outputNode.getInputPort(0));
// Set the default values
// This needs to be after connection.
inputNode1.setConfiguredName("a");
inputNode2.setConfiguredName("b");
inputNode3.setConfiguredName("c");
inputNode4.setConfiguredName("d");
inputNode1.setDescription("This is the first input.");
inputNode2.setDescription("This is the second input.");
inputNode3.setDescription("This is the third input.");
inputNode4.setDescription("This is the fourth input.");
inputNode1.setConfigured(true);
inputNode2.setConfigured(true);
inputNode3.setConfigured(true);
inputNode4.setConfigured(true);
inputNode1.setDefaultValue("2");
inputNode2.setDefaultValue("3");
inputNode3.setDefaultValue("4");
inputNode4.setDefaultValue("5");
outputNode.setConfiguredName("z");
outputNode.setConfigured(true);
return workflow;
}