Please explain the role of EPMVariantLink
Hello,
I want to know the use of EPMVariantLink and in which scenario should we use it ?
In my team they are using the below API to fetch the EPMDocument and then fetching the EPMDocumentMaster. Why can't I use the below mentioned alternate way, please explain the difference between them.
As-Is logic:
private static EPMDocumentMaster getParentsByEPM(List<EPMDocument> parentsrList, EPMDocument instanceEpm)throws WTException{
parentsrList.add(instanceEpm);
QueryResult ft_qr2 = EPMStructureHelper.service.navigateGenericToIteration( instanceEpm, null, true, null);
if(ft_qr2 != null && ft_qr2.size() > 0) {
while(ft_qr2.hasMoreElements()) {
EPMDocument epm = (EPMDocument) ft_qr2.nextElement();
parentsrList.add(epm);
getParentsByEPM(parentsrList, epm);
}
}
return (EPMDocumentMaster)parentsrList.get(parentsrList.size() - 1).getMaster();
}
Alternative Way:
EPMDocumentMaster testMaster=(EPMDocumentMaster) instanceEpm.getMaster();
Thanks and Regards,
Hari R

