Connection connection = new TeeConnection();
nodeA.connectOutput("out1", 0, connection);
nodeB.connectInput("in1", 0, connection);
Connection out = new TeeConnection();
nodeB.connectOutput("out2", 0, out);
CompositeProcessingElement nodeC = new CompositeProcessingElement(
"Composite",
Arrays.<RequestNode>asList(nodeA, nodeB));
Map<String, Map<Integer, Connection>> inputs = new HashMap<String, Map<Integer, Connection>>();
nodeC.setInputs(inputs);
Map<String, Map<Integer, Connection>> outputs = new HashMap<String, Map<Integer, Connection>>();
Map<Integer, Connection> map = new HashMap<Integer, Connection>();
map.put(0, out);
outputs.put("out2", map);
nodeC.setOutputs(outputs);
graph.add(nodeC);
ProcessingElementNode nodeD = new ProcessingElementNode("uk.org.ogsadai.DeliverToRequestStatus");
graph.add(nodeD);
nodeD.connectInput("data", 0, out);
String dot = DotGenerator.generate(graph);