ATF Catalog Item Approval Issues

someone_passing
Kilo Contributor

Hello,

I am trying to update the record and approve it but I am running into couple problems. I followed this tutorial from servicenow, but it is not working. I am using Kingston btw.

The TL;DR version is, how do you approve a catalog item record. What are the steps for it? The tutorial I linked did not help me.

The long version is below.

What I am trying to do:

In ATF, I want to open a catalog item, set the values, submit it and go through the multiple approval process of the record.

 

What I did:

First Approach

I created a test file, say Test 1. What I first tried to do in Test 1 is:

  1. Impersonate (as User 1)
  2. Open a Catalog Item
  3. Set Variable Values
  4. Order Catalog Item <-- Successful up to this point
  5. Impersonate (as User 2)
  6. Record Query <-- Failing here saying (1** see below)
  7. Record Update

 

Second Approach

I created two test files. One is Test 1 and Test 2.

In Test 1:

  1. Impersonate (as User 1)
  2. Open a Catalog Item
  3. Set Variable Values
  4. Order Catalog Item

In Test 2:

Before I start Test 2, I go to the table where the record was created from Test 1 and paste into the Replay Request Item as shown in the tutorial in Test 2. It defeats the purpose of Automation if I have to do something manually, but I just want to pass the test, but it still doesn't work.

  1. Replay Request Item (paste the RITM number I got from the record)
  2. Impersonate (as User 2)
  3. Record Query <-- Again, failing here (2** see below)
  4. Record Update

I have more approvals I need to go through, but for now, I just want only one approval working before I proceed.

 

Problems I am running into:

1** On my first approach, I am trying to get it approved from sysapproval_approver table. I am trying to find the record using the RITM number, but I get an error saying it couldn't find the record but it shows it was looking using the REQ number and not the RITM number. The condition I put was Approval for | is | Step 4: Order Catalog Item > Request

 

2** On my second approach, the problem I am running into the same problem as above. The table is same but the condition is a little different. The condition is Approval for | is | Step 1: Replay Request Item > Replayed Request Item > Request and instead of searching the record using the RITM number, it is looking it up using the REQ number.

 

I did more testing and I was running into more weird problems, but if I mention all that, the post will get really long and I doubt anybody will read it. So my question is, how do you get the record to approve in ATF?

 

Thanks

 

Update: Follow up post to this with more questions is here.

1 ACCEPTED SOLUTION

bbf3562
Kilo Guru

Here is what I would suggest as it working on my side for approval,

  1. Impersonate (as User 1)
  2. Open a Catalog Item
  3. Set Variable Values
  4. Order Catalog Item
  5. Record Query -> To get RITM record using Req ID from #4
  6. Record Validation - > to ensure that RITM exist and the stage is approval
  7. Record Query - > To get Approval(sys_approval) record using RITM ID from #5
  8. Impersonate -> impersonate approver to validate
  9. Open exist form -> To open approval form using Approval ID from #7
  10. Set Variable Values -> You can select option to Approved.
  11. UI action/button -> Click Save button to save the form.

View solution in original post

10 REPLIES 10

Hey bbf3562,

I opened a follow up post here where I have more questions. It would be greatly appreciated if you can help me out on that.

Thanks