graph.addEdge(amount.getOutputPort(0), approver.getInputPort(0));
graph.addEdge(amount.getOutputPort(0), doWhileNode.getInputPort(0));
graph.addEdge(doWhileNode.getControlOutPorts().get(0), approver.getControlInPort());
graph.addEdge(doWhileNode.getControlOutPorts().get(1), constYes.getControlInPort());
graph.addEdge(approver.getOutputPort(0), endDoWhile.getInputPort(0));
graph.addEdge(constYes.getOutputPort(0), endDoWhile.getInputPort(1));
graph.addEdge(endDoWhile.getOutputPort(0), output.getInputPort(0));
// Set the default values
// This needs to be after connection.
amount.setDefaultValue("0");