public void addRoute(String routeGroupId, ProcessInstanceDAO target, int idx, CorrelationKey correlationKey) {
String hdr = "addRoute(" + routeGroupId + ", iid=" + target.getInstanceId() + ", idx=" + idx + ", ckey="
+ correlationKey + "): ";
__log.debug(hdr);
HCorrelatorSelector hsel = new HCorrelatorSelector();
hsel.setGroupId(routeGroupId);
hsel.setIndex(idx);
hsel.setLock(0);
hsel.setCorrelationKey(correlationKey.toCanonicalString());
hsel.setInstance((HProcessInstance) ((ProcessInstanceDaoImpl) target).getHibernateObj());
hsel.setProcessType(target.getProcess().getType().toString());
hsel.setCorrelator(_hobj);
hsel.setCreated(new Date());
// _hobj.addSelector(hsel);
getSession().save(hsel);
__log.debug(hdr + "saved " + hsel);
}