I'm attempting to use a JS script from Maximo 76 Scripting Features (PDF download).
importPackage(java.util)
importPackage(Packages.psdi.server)
var ctx = new HashMap();
ctx.put("url","http://localhost:7001/maximo/oslc/script/countryapi?_lid=wilson&_lpwd=wilson");
service.invokeScript("LIB_HTTPCLIENT",ctx);
var jsonResp = ctx.get("response");
var countries = JSON.parse(jsonResp);
When I execute the script I get this error:
ReferenceError: "importPackage" is not defined in <eval> at line number 1
Why am I getting this error?