ATF Catalog Item Multi Approval Issues

someone_passing
Kilo Contributor

Hello everybody,

This is pretty much a follow up post from this post

I am using Kingston and I was running into problem with getting the RITM number and having it approved. Now, it is working but not completely the way I want it. Below is a screenshot, so take a look at it and focus on Stage and I am explaining the problem below.

find_real_file.png

So, it is a Catalog Item, and both the records you see is exactly the same. The only difference is, the bottom entry approval was done manually and approval process is working the way it's supposed to be. The top entry was done using ATF and for some reason, after going through Approver 1, it terminates and does not go to Approver 2. I then split the test into 2 parts and then I see an error saying "Security constraints prevent access to requested page" as a screenshot. How do you fix this issue?

I tried server side approval by following this tutorial and modifying a little bit by following my previous post. I still run into the same issue but with a different error saying "No records matching query | Approval for = (empty)" when it goes to Approver 2. I did make the reference to use the same RITM number from Approver 1 but it does not exist for Approver 2.

Here are my steps and more screenshots regarding few other concerns.

  1. Impersonate (as User 1)
  2. Open Catalog Item
  3. Set Variable Values
  4. Order Catalog Item *1(see below)
  5. Impersonate (as Approver 1)
  6. Record Query (Table: sc_req_item, Request:  Step 4: Order Catalog Item > Request)
  7. Record Query (Table: sysapproval_approver, Approval for | is | Step 6: Record Query > First record)
  8. Open an Existing Record (Table: sysapproval_approver, Record: Step 7: Record Query > First record)
  9. Click a UI Action (Table: sysapproval_approver, UI action: Approve) *2(see below)
  10. Impersonate (as Approver 2)
  11. Open an Existing Record (take query reference from Step 7)
  12. Click a UI Action [Failure: Failed to find UI Action 'Approve' on 'sysapproval_approver' form. See screenshot]

*1

This is not a problem but even when I do it, I see this page

find_real_file.png

*2

But why am I seeing it here again

find_real_file.png

And when I split the test into 2, when UI Action clicks on Approve, I see "Security constraints prevent access to requested page". Any suggestion how to fix this would be greatly appreciated.

 

Thank you

1 ACCEPTED SOLUTION

hmmm.... will need to investigate deeper.

When I review the list steps you mentioned,

It is possible you was doing wrong on Step #7 and you didn't do another record query for a second approval.

Try this way,

Step #7 Record Query - Table: sysapproval_approver.

     Conditions: Approval for is Step #6. Approver is Approver 1.

 

Add new step #10 after step #9

New step #10 Record Query - Table: sysapproval_Approver.

      Conditions: Approval for is Step #6. Approver is Approver 2.

Step #11 Impersonate Approver 2

Step #12 Open Existing Record (from new Step #10 record query)

Step #13 Click UI Action (approve)

If the above doesn't work, do you have a screenshot for step #9 (screenshot should show approval form) and also another screenshot for validation on first approval to make sure it actually approved before doing second approval? Having a screenshot help a lot for narrow down to find the root cause.

View solution in original post

13 REPLIES 13

Hey bbf3562,

 

Thanks for responding I have posted a question it is under: 

ATF: Catalog Item with multiple Approvals failing due to UI Action

 

Thanks!

https://community.servicenow.com/community?id=community_question&sys_id=80d61596db20738013b5fb24399619b0

Hey DefinitelyNotTheMan,

I am glad that bbf3562 was able to help you out with your problem

nvinod
Kilo Contributor

Hi bbf3562,

I do have a query regarding the same approving the RITM at first level but i would like to share you the screen shot in that at step 8 its failing to get the record, could you please help me in that.