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

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

How do I get ReleaseNotice objects using JAVA?

VladiSlav
17-Peridot

How do I get ReleaseNotice objects using JAVA?

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

 

1 ACCEPTED SOLUTION

Accepted Solutions
avillanueva
22-Sapphire I
(To:VladiSlav)

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.

View solution in original post

3 REPLIES 3
avillanueva
22-Sapphire I
(To:VladiSlav)

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.

 

avillanueva, thank you very much for you answer

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;
    }
Top Tags