The Now Platform® Washington DC release is live. Watch now!
Several customers have asked me about the odd-looking "Packages..." invocations they see sometimes in server-side JavaScript (like business rules or script includes). For instance, you might find a piece of code like this:
var a = getCITypes();
JSUtil.logObject(a);
function getCITypes() {
var hs = new Packages.java.util.HashSet();
var gr = new GlideRecord('cmdb_ci');
gr.query();
while (gr.next())
hs.add('' + gr.sys_class_name);
var it = hs.iterator();
var answer = [];
while (it.hasNext())
answer.push('' + it.next());
return answer;
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.