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

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

add expression robot to get objects in promotion notice

Loic_Badoual
6-Contributor

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?

ACCEPTED SOLUTION

Accepted Solutions

Yes, where do you define what promObjList is? You have to define what type of object that is.

View solution in original post

2 REPLIES 2

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"...

 

2023-12-20 08_49_56-Promotion Request Approval Process.png

Announcements


Top Tags