Global system script includes not available from scopes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-18-2015 10:02 AM
There are many system provided script includes that are not accessible from custom scopes. Even though they are in the global scope they are blocked because the "accessible from" value is set to "this scope only". This is going to create a huge issue and drive everyone to make a lot of changes to system scripts.
First ones I came across were commonly used, JSUtil and TableUtils.
Changing the "accessible from" resolves the issue. Platform wide system scripts should be set to be available in all scopes or just not have the setting apply if scope is global.
"Illegal access to private script include TableUtils in scope rhino.global being called from scope x_...."
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-23-2015 11:47 AM
Yes, i ran into this as well. Oh, add "JSONParser" to the list.
*edit: added JSONParser*
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-26-2015 04:28 PM
And XMLDocument:
Evaluator: java.lang.SecurityException: Illegal access to private script include XMLDocument in scope rhino.global being called from scope
Caused by error in script at line 35
32: gs.info("Response: " + responseBody);
33: gs.info("HTTP Status: " + status);
34:
==> 35: var xmlResp = new global.XMLDocument( soapResponse );
36: var status = xmlResp.getElementValueByTagName(statusNode);
37: var faultstring = xmlResp.getElementValueByTagName("faultstring");
38:
Evaluator: java.lang.SecurityException: Illegal access to private script include XMLDocument in scope rhino.global being called from scope x_scp_scope
Caused by error in script at line -1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-27-2015 01:06 AM
Travis DePuy have you checked out the Fuji XMLDocument2 API?
http://wiki.servicenow.com/index.php?title=Scoped_XMLDocument2_API_Reference
JSONParser is working for me and looks like it's set for all scopes. Might have changed in a recent build so you should try that again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-27-2015 10:41 AM
Thanks John!