if (BpelProcess.__log.isTraceEnabled())
BpelProcess.__log.trace(ObjectPrinter.stringifyMethodEnter("select", new Object[] { "pickResponseChannel",
pickResponseChannel, "timeout", timeout, "createInstance", createInstance,
"selectors", selectors }));
ProcessDAO processDao = _dao.getProcess();
// check if this is first pick
if (_dao.getState() == ProcessState.STATE_NEW) {
assert createInstance;
// send event
ProcessInstanceStateChangeEvent evt = new ProcessInstanceStateChangeEvent();
evt.setOldState(ProcessState.STATE_NEW);
_dao.setState(ProcessState.STATE_READY);
evt.setNewState(ProcessState.STATE_READY);
sendEvent(evt);
}
final String pickResponseChannelStr = pickResponseChannel.export();
List<CorrelatorDAO> correlators = new ArrayList<CorrelatorDAO>(selectors.length);
for (Selector selector : selectors) {
String correlatorId = BpelProcess.genCorrelatorId(selector.plinkInstance.partnerLink, selector.opName);
if (BpelProcess.__log.isDebugEnabled()) {
BpelProcess.__log.debug("SELECT: " + pickResponseChannel + ": USING CORRELATOR " + correlatorId);
}
correlators.add(processDao.getCorrelator(correlatorId));
}
// Checking conflicts
int conflict = _imaManager.findConflict(selectors);
if (conflict != -1)