Pipe pipeLower = new Each( new Pipe( "lower", pipe ), new Fields( "line" ), splitter );
Pipe pipeUpper = new Each( new Pipe( "upper", pipe ), new Fields( "line" ), splitter );
Pipe pipeOffset = new Each( new Pipe( "offset", pipe ), new Fields( "line" ), splitter );
Pipe splice = new Merge( "merge", pipeLower, pipeUpper );
//put group before merge to test path counts
splice = new GroupBy( splice, new Fields( "num" ) );
splice = new Merge( splice, pipeOffset );
// this group has its incoming paths counted, gated by the previous group
splice = new GroupBy( splice, new Fields( "num" ) );
Flow flow = getPlatform().getFlowConnector().connect( sources, sink, splice );