+ " have different number of inputs");
}
// First, build the group edges
for (int i = 0; i < sjv.getNumberOfForwardConnections(); ++i) {
final JobEdge edge = sjv.getForwardConnection(i);
final AbstractJobVertex tjv = edge.getConnectedVertex();
final ExecutionVertex tev = vertexMap.get(tjv);
final ExecutionGroupVertex tgv = tev.getGroupVertex();
// Use NETWORK as default channel type if nothing else is defined by the user
ChannelType channelType = edge.getChannelType();
boolean userDefinedChannelType = true;
if (channelType == null) {
userDefinedChannelType = false;
channelType = ChannelType.NETWORK;
}
final DistributionPattern distributionPattern = edge.getDistributionPattern();
// Connect the corresponding group vertices and copy the user settings from the job edge
final ExecutionGroupEdge groupEdge = sgv.wireTo(tgv, edge.getIndexOfInputGate(), i, channelType,
userDefinedChannelType,distributionPattern);
final ExecutionGate outputGate = new ExecutionGate(new GateID(), sev, groupEdge, false);
sev.insertOutputGate(i, outputGate);
final ExecutionGate inputGate = new ExecutionGate(new GateID(), tev, groupEdge, true);
tev.insertInputGate(edge.getIndexOfInputGate(), inputGate);
}
}
}