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

Community Tip - You can change your system assigned username to something more personal in your community settings. X

Buildrule execution validation via API

handers-2
6-Contributor

Buildrule execution validation via API

I am using Windchill PDMLink Release 12.0 and Datecode with CPS 12.0.2.14

Is there a way to check if the buildrules have been executed on a given WTPart and its linked EPMDocuments?

1 ACCEPTED SOLUTION

Accepted Solutions
handers-2
6-Contributor
(To:handers-2)

Problem solved with this solution:


Map<Persistable, Persistable> paramMap = new HashMap<Persistable, Persistable>();
paramMap.put(part, pers);
EPMBuildHistoryStatusHelper buildHelper = new EPMBuildHistoryStatusHelper();
Map<Persistable, EPMBuildHistoryStatus> resultBuildStatus = buildHelper.getBuildHistoryStatus(paramMap);
for (Persistable partKey : resultBuildStatus.keySet()) {
     EPMBuildHistoryStatus buildStatus = resultBuildStatus.get(partKey); // possible values IN_SYNC, OUT_OF_SYNC, NOT_RELATED, NOT_BUILT;
      logger.debug("buildStatus on "+part.getIdentity() +" and "+pers+" is: "+buildStatus.name());

View solution in original post

3 REPLIES 3
HelesicPetr
22-Sapphire I
(To:handers-2)

Hi @handers-2 

In the system there is definitely that API because it is used in the compare functionHelesicPetr_0-1700573917015.png

but it has not to be just one function it can be a several functions together that compares build status and others information. 

 

You just need to find that API. 

 

PetrH 

handers-2
6-Contributor
(To:HelesicPetr)

Hi  HelesicPetr,
I know this compare, I decompiled already a lot OOTB files. I dont find a way.
com.ptc.windchill.enterprise.dsb.client.controller    DSBController.java -> the result is stored in compareSummaries

I thought this could be an option: BuildHelper.isMarkedAsBuilt((BuildableLink) link))
But the buildable link looks like it has to be a WTPartDescribeLink which for me does not make sense.
EPMDocs are not linked with it. And BuildRule or BinaryLink is not castable to "BuildableLink"


 
handers-2
6-Contributor
(To:handers-2)

Problem solved with this solution:


Map<Persistable, Persistable> paramMap = new HashMap<Persistable, Persistable>();
paramMap.put(part, pers);
EPMBuildHistoryStatusHelper buildHelper = new EPMBuildHistoryStatusHelper();
Map<Persistable, EPMBuildHistoryStatus> resultBuildStatus = buildHelper.getBuildHistoryStatus(paramMap);
for (Persistable partKey : resultBuildStatus.keySet()) {
     EPMBuildHistoryStatus buildStatus = resultBuildStatus.get(partKey); // possible values IN_SYNC, OUT_OF_SYNC, NOT_RELATED, NOT_BUILT;
      logger.debug("buildStatus on "+part.getIdentity() +" and "+pers+" is: "+buildStatus.name());

Top Tags