ATF Failure in scoped applications.

Srikanth Menava
Kilo Sage

Hello All,

 I've created an ATF for a scoped application in my dev environment, It was running fine and I moved it to test. TI cloned back Dev from TEST. Then 'run server side' step in the test giving me an error.

Basically, I am submitting a record producer and it will create a record in a table and also creates an RITM, I am trying to open the record submitted and open a field having "i" icon. Below is the error code.

 

Test failed due to JavaScript error executing step:
JavaException: com.glide.script.fencing.CrossScopeAccessNotAllowedException: Access to Step.sibling from scope x_gdot_pir_scope not allowed
at:21


Full logging from step execution:
15:52:37.534 Loading script: jasmine_lib/jasmine31.js
15:52:37.737 Successfully loaded jasmine_lib/jasmine31.js
15:54:07.738 Security restricted: Execute operation on API 'Step.sibling' from scope 'PIR Scope Document' was denied. The application 'PIR Scope Document' must declare 

 

SrikanthMenava_0-1684153627649.png

my run script test has the below code in it.

SrikanthMenava_1-1684153786455.png

did anyone faced this?

1 ACCEPTED SOLUTION

Laszlo Balla
ServiceNow Employee
ServiceNow Employee

As a result of the cloning, your cross-scope privileges got revoked / removed. Try this:

  1. Switch to the 'x_gdot_pir_scope' appliation (scope)
  2. Go to 'Application Cross-Scope Access' menu (or sys_scope_privilege.list)
  3. Create a new record:
    • Source Scope: should be set automatically to PIR Scope
    • Target Scope: Global
    • Target Name: Step.sibling
    • Target Type: Scriptable
    • Operation: Execute API
    • Status: Allowed

Run the test again. If any other APIs fail, repeat the process above for those too.

View solution in original post

10 REPLIES 10