Solved
add expression robot to get objects in promotion notice
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?

