// TODO: Perhaps we should define a checked exception for this
// condition.
throw new BpelEngineException(errmsg);
}
{
OPartnerLink plink = (OPartnerLink) process.getOProcess().getChild(mexdao.getPartnerLinkModelId());
PortType ptype = plink.partnerRolePortType;
Operation op = plink.getPartnerRoleOperation(mexdao.getOperation());
// TODO: recover Partner's EPR
mex = createPartnerRoleMessageExchangeImpl(mexdao, ptype, op, plink, process);
}
break;
case MessageExchangeDAO.DIR_PARTNER_INVOKES_MYROLE:
mex = new MyRoleMessageExchangeImpl(process, this, mexdao);
if (process != null) {
Object child = process.getOProcess().getChild(mexdao.getPartnerLinkModelId());
if (child instanceof OPartnerLink) {
OPartnerLink plink = (OPartnerLink) child;
// the partner link might not be hydrated
if (plink != null) {
PortType ptype = plink.myRolePortType;
Operation op = plink.getMyRoleOperation(mexdao.getOperation());
mex.setPortOp(ptype, op);
}
}
}
break;