We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

Record query step failing in ATF

khareakshay
Tera Contributor

I am writing ATF test script to validate the lifecycle of service catalog. In this I am using Record query as one of the test step to validate the SCTASK record for a given REQ/RITM. However the test step is failing with the error message as in attached image. I have tried  implementing the scenario manually and it works fine 

The step 9 referenced in the below image is a Record query step which returns the sys_id of REQ created from service catalog and passess . Please suggest , how to resolve this

khareakshay_0-1780929009263.png

Error:

khareakshay_1-1780929134196.png

 

 

7 REPLIES 7

PoonkodiS
Giga Sage

@khareakshay 

 

A Catalog Task (SCTASK)doesn't connect directly to a Request (REQ)—it connects to a Requested Item (RITM)

Because your Step 9 is looking for a Request (REQ), your query in Step 10 is coming up empty.

How to fix it:

 1. Insert a Record Query step before this one to find the Requested Item (sc_req_item) where Request is your Step 9 record.

 2. In your Catalog Task (sc_task) query step, change the condition dropdown from Request to Requested item and point it to that new RITM

step.

Hi @PoonkodiS ,
I already tried to use RITM record but it still gives the same error as below.

khareakshay_0-1780981949530.png

 

Tanushree Maiti
Tera Patron

Hi @khareakshay 

 

  • Use a Record Query step to find the Requested Item record (sc_req_item) where request = Step 9 -> Request.
  • Use a subsequent Record Query step to find the Catalog Task (sc_task) where request_item = [Step containing the RITM] -> First Record.       
Please Accept the solution if it assisted you with your question & Mark this response as Helpful.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti