Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X
I have WTPart associated with EPMDocument with Owner link. I want to navigate from EPMDocument to the WTPart via the EPMBuildRule link using following code.
QueryResult result2 = PersistenceHelper.manager.navigate(epmDoc, EPMBuildRule.BUILD_TARGET_ROLE, EPMBuildRule.class, true);
But the query results is always empty.
Tried different values for the second parameter but no result.
Windchill version - 11.2.1
would you try this :
ObjectIdentifier oid = ObjectIdentifier.newObjectIdentifier("wt.epm.EPMDocument:xxxx");
EPMDocument epmdoc= (EPMDocument) PersistenceHelper.manager.refresh(oid);
//EPM and Part have association like: Owner, Contributing Image , Content etc..
//Other association is define in EPMBuildRule. So the demo API:
QueryResult br_qr = PersistenceHelper.manager.navigate(epmdoc,EPMBuildRule.BUILD_TARGET_ROLE, EPMBuildRule.class, true);
while(br_qr.hasMoreElements()) {
parts.add((WTPart)br_qr.nextElement());
}
//The Content association is define in EPMDescribeLink. So the demo API:
QueryResult dl_qr = PersistenceHelper.manager.navigate(epmdoc,EPMDescribeLink.DESCRIBES_ROLE, EPMDescribeLink.class, true);
while(dl_qr.hasMoreElements()) {
parts.add(dl_qr.nextElement());