好的我是初学者,我必须修复这个java表达式语言代码才能在我的系统中运行(Windchill),但看起来我在语法中缺少一些东西:
LWCNormalizedObject lwc = new LWCNormalizedObject(cr, null, null, null);
lwc.load(wt.change2.WTChangeRequest2.theCategory);
Object bUnit = lwc.get(wt.change2.WTChangeRequest2.theCategory);
If ((bUnit.toString()).equals("PRODUCT_IMPROVEMENT")) {
wt.team.Team team = (wt.team.Team) ( (wt.workflow.engine.WfProcess) self.getObject() ).getTeamId().getObject();
java.util.Enumeration principals = team.getPrincipalTarget(wt.project.Role.toRole("Product Manager"));
while(principals.hasMoreElements())
{
wt.org.WTPrincipal wtprincipal = ((wt.org.WTPrincipalReference)principals.nextElement()).getPrincipal();
System.out.println("principal = " + wtprincipal.getPrincipalDisplayIdentifier());
wt.team.TeamHelper.service.addRolePrincipalMap(wt.project.Role.toRole("Change Admin II "),wtprincipal, team );
}
}
我在第4行遇到错误:
If ((bUnit.toString()).equals("PRODUCT_IMPROVEMENT")) {
任何帮助都将受到高度赞赏= D
答案 0 :(得分:5)
If
应为小写。
if ((bUnit.toString()).equals("PRODUCT_IMPROVEMENT")) {