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
Mega Sage
Mega Sage

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

Laszlo Balla
Mega Sage
Mega Sage

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.

Hello @Laszlo Balla 

created the application cross scope access record. but got the same error

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

 

This is already a step forward, seems like you just need to repeat the process and create a cross-scope access record for the StepResult.setOutputMessage API:

 

  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: StepResult.setOutputMessage
    • Target Type: Scriptable
    • Operation: Execute API
    • Status: Allowed

Srikanth Menava
Kilo Sage

@Laszlo Balla  this ran the steps but was failing at another step with the below result.

Test failed due to JavaScript error executing step:
com.glide.script.fencing.access.ScopeAccessNotGrantedException: read access to change_request not granted

Full logging from step execution:
12:05:56.694 Loading script: jasmine_lib/jasmine31.js
12:05:56.974 Successfully loaded jasmine_lib/jasmine31.js
12:05:57.43 Security restricted: Read operation on table 'change_request' from scope 'PIR Scope Document' was denied. The application 'PIR Scope Document' must declare a cross scope access privilege. Please contact the application author to update their privilege requests.

A few other questions

1) Why this is happenning all of a sudden after cloning?

2)what all should be moved to TEST and PROD to avoid this?

3) will this happen upon every clone?

Please take time to answer this question.