cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

Translate the entire conversation x

How to get Non Latest Linked Upstream WTPart via API when the Equivalence Link is not updated

Rohaan
14-Alexandrite

How to get Non Latest Linked Upstream WTPart via API when the Equivalence Link is not updated

I have a scenario where I need to traverse to to the Upstream eBOM part using following API -> wt.fc.PersistenceHelper.manager.navigate(mfg_Part,
wt.associativity.EquivalenceLink.UPSTREAM_ROLE, wt.associativity.EquivalenceLink.class);

 

Above API returns QueryResult for all iterations of upstream WTPart which had equivalent link between them and mBOM part. 

However if the user iterates eBOM part but does not update equivalent link manually, I would still need to be able to traverse to previously linked upstream part 

 

Need assistance with finding link to previous Non -Latest eBOM wtPart to fetch further associated documents from it

 

 

QueryResult upstreamResult = wt.fc.PersistenceHelper.manager.navigate(parentPart,
wt.associativity.EquivalenceLink.UPSTREAM_ROLE, wt.associativity.EquivalenceLink.class);
LOGGER.debug(">>>>> upstreamResult : " + upstreamResult.size());
while (upstreamResult.hasMoreElements()) {
Object partObj = (WTPart) upstreamResult.nextElement();
upstreamPart = (WTPart) partObj;
LOGGER.debug(">>>>> Upstream Part Iteration :" + upstreamPart.getIdentity()
+ upstreamPart.getIterationDisplayIdentifier());
 
boolean isLatestUpstreamPart = VersionControlHelper.isLatestIteration(upstreamPart);
 
LOGGER.debug(">>>>> Is Latest Upstream Part? : " + isLatestUpstreamPart);
if (isLatestUpstreamPart) {
flag = true;
LOGGER.debug(">>> Inside Is LatestUpstreamPart True : " + flag);
descByResult = PersistenceHelper.manager.navigate(upstreamPart,
EPMDescribeLink.DESCRIBED_BY_ROLE, epmDescribeCriteria, true);
 
IF NOT LATEST  -> Need to fetch previous linked object with Equivalence link
}

Thanks in advance!

 

1 REPLY 1
Catalina
Moderator
(To:Rohaan)

Hi @Rohaan 

Thank you for your question. 

Your post appears well documented but has not yet received any response. I am replying to raise awareness. Hopefully, another community member will be able to help.

Also, feel free to add any additional information you think might be relevant. It sometimes helps to have screenshots to better understand what you are trying to do.

 

Best regards,


Catalina
PTC Community Moderator
PTC
Announcements
Top Tags