.toString());
// Check for ambiguous receive
for (int i = 0; i < selectors.length; ++i) {
CorrelatorDAO correlator = correlators.get(i);
Selector selector = selectors[i];
if (!correlator.checkRoute(selector.correlationKeySet)) {
throw new FaultException(_bpelProcess.getOProcess().constants.qnAmbiguousReceive(), selector.toString());
}
}
//Registering
_imaManager.register(pickResponseChannelStr, selectors);
// First check if we match to a new instance.
if (_instantiatingMessageExchange != null && _dao.getState() == ProcessState.STATE_READY) {
if (BpelProcess.__log.isDebugEnabled()) {
BpelProcess.__log.debug("SELECT: " + pickResponseChannel + ": CHECKING for NEW INSTANCE match");
}
for (int i = 0; i < correlators.size(); ++i) {
CorrelatorDAO ci = correlators.get(i);
if (ci.equals(_dao.getInstantiatingCorrelator())) {
inputMsgMatch(pickResponseChannelStr, i, _instantiatingMessageExchange);
if (BpelProcess.__log.isDebugEnabled()) {
BpelProcess.__log.debug("SELECT: " + pickResponseChannel
+ ": FOUND match for NEW instance mexRef=" + _instantiatingMessageExchange);
}
return;
}
}
}
if (timeout != null) {
registerTimer(pickResponseChannel, timeout);
if (BpelProcess.__log.isDebugEnabled()) {
BpelProcess.__log.debug("SELECT: " + pickResponseChannel + "REGISTERED TIMEOUT for " + timeout);
}
}
for (int i = 0; i < selectors.length; ++i) {
CorrelatorDAO correlator = correlators.get(i);
Selector selector = selectors[i];
correlator.addRoute(ProcessUtil.exportChannel(pickResponseChannel), _dao, i, selector.correlationKeySet, selector.route);
scheduleCorrelatorMatcher(correlator.getCorrelatorId(), selector.correlationKeySet);
if (BpelProcess.__log.isDebugEnabled()) {