if (__log.isDebugEnabled()) {
__log.debug("INPUTMSG: " + routing.correlator.getCorrelatorId() + ": ROUTING to instance "
+ routing.messageRoute.getTargetInstance().getInstanceId());
}
ProcessInstanceDAO instanceDao = routing.messageRoute.getTargetInstance();
// Reload process instance for DAO.
BpelRuntimeContextImpl instance = _process.createRuntimeContext(instanceDao, null, null);
instance.inputMsgMatch(routing.messageRoute.getGroupId(), routing.messageRoute.getIndex(), mex);
// Kill the route so some new message does not get routed to
// same process instance.
routing.correlator.removeRoutes(routing.messageRoute.getGroupId(), instanceDao);
// send process instance event
CorrelationMatchEvent evt = new CorrelationMatchEvent(new QName(_process.getOProcess().targetNamespace,
_process.getOProcess().getName()), _process.getProcessDAO().getProcessId(),
instanceDao.getInstanceId(), routing.matchedKey);
evt.setPortType(mex.getPortType().getQName());
evt.setOperation(operation.getName());
evt.setMexId(mex.getMessageExchangeId());
_process._debugger.onEvent(evt);