How to troubleshoot error "com.glide.script.RhinoEcmaError: "xml_baseline_string" is not defined." in a Scheduled Script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2022 12:59 AM
I have created below Scheduled Script which will insert automated CI Relationships for DNS CI Records into the CMDB Relationship Table ( cmdb_rel_ci).
However I am receiving below error:-
com.glide.script.RhinoEcmaError: "xml_baseline_string" is not defined. <refname> : Line(1) column(0) ==> 1: xml_baseline_string.
Please find the Scheduled Script below:-
cmdbUtil = new SWB_cmdbAutomationUtils();
var rel_type = "Depends on::Used by";
var targetDN;
var current_fqdn = current.fqdn.toString();
var dns_rec = new GlideRecord('u_cmdb_ci_dns_record');
dns_rec.addQuery('install_status', '!=',7);
dns_rec.addQuery('fqdn','!=','');
// //dns_rec.addEncodedQuery('install_statusNOT IN7^fqdnISNOTEMPTY');
dns_rec.addQuery('u_managed_by_service_offering','!=','')
.addOrCondition('u_contract_number','!=','');
dns_rec.query();
while (dns_rec.next())
{
if (!gs.nil(current_fqdn)){
try {targetDN = cmdbUtil.resolveDNSDomainFromFQDN(current_fqdn);}
catch(e){gs.error("SWB_rel_DNSRecordToDomainName: "+e.message);}
}
if (targetDN.isValidRecord()){
try {cmdbUtil.maintainCMDBRel(targetDN,rel_type,current);}
catch(e){gs.error("SWB_rel_DNSRecordToDomainName: "+e.message);}
}
Do you have any insight on how to troubleshoot this error. Any help would be highly appreciated.
- Labels:
-
Data Acquisition

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2022 02:41 AM
Hi Sandip,
Try running the script from Script Background.
Try logging variables to make sure they are assigned to expected values.
Try commenting lines of code to determine the exact statement causing the error. Can't say too much because the script seems to be querying a custom table and calling custom script.
I'll probably use .addNotNullQuery() instead of checking for ''.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2022 03:29 AM
Many thanks Ozawa for your inputs here!! We have reached an inch closer to our expected result. 🙂