Node echo = workflow.addNode(echoComponent);
echo.setPosition(new Point(40, 40));
// receive
ReceiveNode receive = (ReceiveNode) workflow.addNode(this.receiveComponent);
receive.setPosition(new Point(200, 200));
// Output
OutputNode output1 = (OutputNode) workflow.addNode(this.outputComponent);
output1.setPosition(new Point(350, 40));
OutputNode output2 = (OutputNode) workflow.addNode(this.outputComponent);
output2.setPosition(new Point(350, 200));
// Connect ports
graph.addEdge(receive.getEPRPort(), echo.getInputPort(0));
graph.addEdge(echo.getOutputPort(0), output1.getInputPort(0));
graph.addEdge(receive.getOutputPort(0), output2.getInputPort(0));
graph.addEdge(echo.getControlOutPorts().get(0), receive.getControlInPort());
// Confugure
output1.setConfiguredName("output1");
output1.setConfigured(true);
output2.setConfiguredName("output2");