ProcessingElementInputDescriptor inp = new ProcessingElementInputDescriptor("input");
TupleSType t = new TupleSType();
t.addElement("a", new PrimitiveSType("String"));
inp.setSType(t);
ProcessingElementDescriptor desc =
new SimpleProcessingElementDescriptor(
Arrays.asList(inp),
Collections.<ProcessingElementOutputDescriptor>emptyList(),
null);
a.setDescriptor(desc);
ProcessingElementOutputDescriptor outp = new ProcessingElementOutputDescriptor("output");
t = new TupleSType();
t.addElement("b", new PrimitiveSType("String"));
outp.setSType(t);
desc = new SimpleProcessingElementDescriptor(
Collections.<ProcessingElementInputDescriptor>emptyList(),
Arrays.asList(outp),
null);
b.setDescriptor(desc);
b.connectOutput("output", 0, a.getInput("input", 0));