Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X
Initially posted in this topic
I tried to do the same thing with Windchill 12.0.2.0, but I get the following error with the code in order to add expression robot to get objects in promotion notice :
Expression :
wt.fc.QueryResult promotables = wt.maturity.MaturityHelper.service.getPromotionTargets((wt.maturity.PromotionNotice)primaryBusinessObject);
promObjList = new ArrayList<String>();
while(promotables.hasMoreElements()){
wt.fc.WTObject promotable = (wt.fc.WTObject) promotables.nextElement();
promObjList.add(promotable.getDisplayIdentity());
}
error :
Checking Syntax...
WfExpression_158100.java:55: error: cannot find symbol
promObjList = new ArrayList<String>();
^
symbol: variable promObjList
location: class WfExpression_158100
WfExpression_158100.java:59: error: cannot find symbol
promObjList.add(promotable.getDisplayIdentity());
^
symbol: variable promObjList
location: class WfExpression_158100
Note: WfExpression_158100.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: WfExpression_158100.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
2 errors
Syntax check complete.
does anyone know how to fix the problem?
Solved! Go to Solution.
Yes, where do you define what promObjList is? You have to define what type of object that is.
Yes, where do you define what promObjList is? You have to define what type of object that is.
Thank you for your support ! This helped me to solve the issue : it was just a typing error : I have define the variable "promObjlist" instead of "promObjList"...