Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
If you are working on a component with two outputs, I am assuming that you have got to the stage where your component is outputting the same thing via the 2 outputs. If that is the case, then why do you not just implement some sort of procedure to switch the output you are sending data to for every row? I am assuming that you want to achieve the following....
Input Data
1
2
3
4
Output1
1
3
Output2
2
4
<%
CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument;
INode node = (INode) codeGenArgument.getArgument();
NodeConnectionsHelper connsHelper=new NodeConnectionsHelper(node, true);
String cid = node.getUniqueName();
IConnection inputConn = connsHelper.getInputConn();
if(inputConn == null)
{
return "";//not generate any code if no input connection.
}
IConnection connResponse = connsHelper.getOutputConnResponse();
IConnection connFault = connsHelper.getOutputConnFault();
%>
if (<%=inputConn.getName()%>.InputColumn == "toto")
{
<%=connResponse.getName()%>.Result = <%=inputConn.getName()%>.InputColumn;
java.util.List<String> responseList_<%=cid%> = null;
responseList_<%=cid%> = new java.util.ArrayList<String>();
responseList_<%=cid%>.add(<%=inputConn.getName()%>.InputColumn);
responseList_<%=cid%>.add(<%=inputConn.getName()%>.InputColumn);
responseList_<%=cid%>.add(<%=inputConn.getName()%>.InputColumn);
<%=connResponse.getName()%>.OutputColumn = responseList_<%=cid%>;
}
else if (<%=inputConn.getName()%>.InputColumn != "toto") {
<%=connFault.getName()%>.error_id = <%=inputConn.getName()%>.InputColumn;
<%=connFault.getName()%>.error_message = <%=inputConn.getName()%>.InputColumn;
}