EObject container = eObject ;
while (container != null) {
PartnerLinks partnerLinks = null;
if (container instanceof Process) {
partnerLinks = ((Process)container).getPartnerLinks();
} else if (container instanceof Scope) {
partnerLinks = ((Scope)container).getPartnerLinks();
}
if (partnerLinks != null) {
Iterator<?> it = partnerLinks.getChildren().iterator();
while (it.hasNext()) {
PartnerLink pl = (PartnerLink)it.next();
if (pl.getName().equals(partnerLinkName))
return pl;
}