Skip to main content
17-Peridot
September 16, 2022
Solved

How do I get ReleaseNotice objects using JAVA?

  • September 16, 2022
  • 2 replies
  • 1322 views

Hello.
We have an object wt.change2.WTChangeOrder2

Please tell me how to get its objects that are in the ReleaseNotice?

VladiSlav_0-1663333075910.png

 

Best answer by avillanueva

ChangeHelper2.service.getChangeablesAfter(wtchangeorder2)

There are more useful methods in this server. Look at the Windchill API JavaDoc.

I searched help docs for "ReleaseNotice", could not find it. Looks that like that is a ChangeNotice unless someone at site renamed it to say ReleaseNotice. Icon is certainly a change notice icon.

2 replies

avillanueva
23-Emerald I
23-Emerald I
September 16, 2022

ChangeHelper2.service.getChangeablesAfter(wtchangeorder2)

There are more useful methods in this server. Look at the Windchill API JavaDoc.

I searched help docs for "ReleaseNotice", could not find it. Looks that like that is a ChangeNotice unless someone at site renamed it to say ReleaseNotice. Icon is certainly a change notice icon.

VladiSlav17-PeridotAuthor
17-Peridot
September 26, 2022

 

avillanueva, thank you very much for you answer
VladiSlav17-PeridotAuthor
17-Peridot
September 26, 2022
public static java.util.ArrayList<wt.part.WTPart> getWTPartFromChangeOrder(wt.change2.WTChangeOrder2 wtChangeOrder2, String possibleStates) throws wt.util.WTException {
 java.util.ArrayList<wt.part.WTPart> wtParts = new java.util.ArrayList<>();
 wt.fc.QueryResult queryResult = wt.change2.ChangeHelper2.service.getChangeablesBefore(wtChangeOrder2);

 while (queryResult.hasMoreElements()) {
 Object obj = queryResult.nextElement();
 String objType = obj.getClass().getName();

 if ("wt.part.WTPart".equals(objType)) {
 wt.part.WTPart part = (wt.part.WTPart) obj;
 if (possibleStates.contains(part.getState().toString())) {
 wtParts.add(part);
 }
 }
 }
 return wtParts;
 }