API to create Link between WTPart and EPMDocument
Hi All,
I am trying to create a Link between WTPart and EPMDocument objects by using below code,
it's executed without error but it not create any kind of link in between these two objects.
is any one tried to create Link between WTPart and EPMDoc.
Please review below code and suggest the correct way to create this type of links.
======================
- System.out.println("Getting the epmdocument");
EPMDocument source = getEPMDocument(); //getEPMDocument method returns me object of EPMDoc type
System.out.println("Getting the WTPart");
WTPart target = getWTPart(); // getWTpart method returns me object of WTPart type
System.out.println("Creating the link between wtpart and epmdocument");
int buildType = 1;
source = (EPMDocument) WorkInProgressHelper.service.checkout(source,WorkInProgressHelper.service.getCheckoutFolder(),"").getWorkingCopy();
EPMBuildRule link = EPMBuildRule.newEPMBuildRule(source, target);
PersistenceServerHelper.manager.insert(link);
System.out.println("Link has been created");
WorkInProgressHelper.service.checkin(source,null);
System.out.println("Done...");
================
Thanks,
Vivek

