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

Query Attribute of Object Attached to Promotion Request

RE: Query Attribute of Object Attached to Promotion Request

I tried putting your code into mine, but I get errors when checking the syntax. Here is the error I get:


public static boolean checkEvent (Object _event, Object [] _values)
D:\ptc\Windchill_10.0\Windchill\temp\WfExpression493019533.java:79: illegal start of expression
^
public static boolean checkEvent (Object _event, Object [] _values)
D:\ptc\Windchill_10.0\Windchill\temp\WfExpression493019533.java:79: ')' expected
^
public static boolean checkEvent (Object _event, Object [] _values)
D:\ptc\Windchill_10.0\Windchill\temp\WfExpression493019533.java:79: ';' expected
^
public static boolean checkEvent (Object _event, Object [] _values)
D:\ptc\Windchill_10.0\Windchill\temp\WfExpression493019533.java:79: ';' expected
^
throws Exception {
D:\ptc\Windchill_10.0\Windchill\temp\WfExpression493019533.java:80: ';' expected
^
I think it may have to do with the attribute that I am trying to access. It is a boolean attribute. Is there anything special that I have to do to access a boolean vs. a string?


Thanks,


Benjamin Wilcox - IntelliServ<sup>™</sup>


PPM & PDM Administrator


IntelliServ provides broadband networking and along-string
evaluation services for high-definit...




In Reply to Shreyas Atre:



I have LWCNormalized Object API in your code to retrieve the IBA value. Check if it works for you




wt.maturity.PromotionNotice pn = (wt.maturity.PromotionNotice) primaryBusinessObject;


promotionDescription = pn.getDescription().toString(); // store the text found in the promotion request description attribute



wt.maturity.StandardMaturityService p = new wt.maturity.StandardMaturityService();


wt.fc.QueryResult pn_targets = (wt.fc.QueryResult) p.getBaselineItems(pn);



while (pn_targets.hasMoreElements()) {


Object myObject = pn_targets.nextElement();


String objType = myObject.getClass().getName(); // get the internal name of the parent object type




if (objType.equals("wt.epm.EPMDocument")) {


isCAD = true;


epmObjType = objType.toString();



com.ptc.core.lwc.server.LWCNormalizedObject obj = new com.ptc.core.lwc.server.LWCNormalizedObject((Persistable) myObject, null, Locale.ENGLISH, null);







}


if (objType.equals("wt.doc.WTDocument")) {


isDocument = true;


docObjType = objType.toString();


}


}



Hope this helps !!!!



Thanks,
Shreyas



RE: Query Attribute of Object Attached to Promotion Request

I found an error in my code -- had forgotten a close }. Now, though, I get a different error:


D:\ptc\Windchill_10.0\Windchill\temp\WfExpression493019533.java:48: cannot find symbol
location: class wt.workflow.expr.WfExpression493019533
^
Syntax check complete.


Any ideas?


Thanks,


Benjamin Wilcox – IntelliServ<sup>™</sup>


PPM & PDM Administrator


IntelliServ provides broadband networking and along-string
evaluation services for high-definition do...

RE: Query Attribute of Object Attached to Promotion Request

Add complet class path for Persistable and local


com.ptc.core.lwc.server.LWCNormalizedObject obj = new com.ptc.core.lwc.server.LWCNormalizedObject((wt.fc.Persistable) myObject, null, java.util.Locale.ENGLISH, null);



Thanks,


Shreyas

RE: Query Attribute of Object Attached to Promotion Request

Thank you. That is what I needed. My code is working very nicely, now. Thank you to all for your help!


Benjamin Wilcox – IntelliServ<sup>™</sup>


PPM & PDM Administrator


IntelliServ provides broadband networking and along-string
evaluation services for high-definition do...

Announcements
LiveWorx Call For Papers Happening Now!