// task vertex 1
final JobTaskVertex t1 = new JobTaskVertex("Task with two Inputs", jg);
t1.setTaskClass(DoubleTargetTask.class);
// output vertex
JobFileOutputVertex o1 = new JobFileOutputVertex("Output 1", jg);
o1.setFileOutputClass(FileLineWriter.class);
o1.setFilePath(new Path(outputFile.toURI()));
t1.setVertexToShareInstancesWith(i1);
o1.setVertexToShareInstancesWith(i1);
// connect vertices
i1.connectTo(t1, ChannelType.IN_MEMORY, DistributionPattern.POINTWISE);
i1.connectTo(t1, ChannelType.NETWORK, DistributionPattern.BIPARTITE);
t1.connectTo(o1, ChannelType.IN_MEMORY);