What type should be the variable obj ?
Hello, please tell me what type should be the variable obj ? I found an example of editing a template https://www.ptc.com/en/support/article?n=CS150777 , but there was a problem with the type of variable, tried everything I knew and everything that was recommended, it did not work to pass the test.
CODE:
wt.maturity.PromotionNotice notice = (wt.maturity.PromotionNotice)primaryBusinessObject;
wt.fc.QueryResult results = wt.maturity.MaturityHelper.service.getPromotionTargets(notice);
while (results.hasMoreElements())
{
obj = results.nextElement();
if (obj instanceof wt.doc.WTDocument)
{
var += obj.getName ()+“,”; // var is a global variable
}
}
TESTING:
Checking Syntax...
warning: Supported source version 'RELEASE_7' from annotation processor 'com.microsoft.azure.management.apigeneration.LangDefinitionProcessor' less than -source '1.8'
WfExpression_11.java:57: error: incompatible types: Object cannot be converted to Persistable
obj = results.nextElement();
^
Note: WfExpression_11.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
1 warning
Syntax check complete.

