ATF with REQ -> RITM (W/Approvals) -> SCTASK

John H1
Tera Guru

Our workflow requires the user to submit a catalog item that creates an RITM that is first approved by the department manager,  then approved by the IT manager and then assign the Tasks.

I'm new to ATF and I'm trying to understand how I can move from Catalog Item, to the RITM and finally to the SCTASK.

Any assistance would be greatly appreciated. 

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

@John H 

Steps for you to get started

1) Impersonate user
2) Open a Catalog Item
3) Set Variable Values
4) Order Catalog Item
5) Record Query - sc_request where SysId = Output from Step 4
6) Record Query - sc_req_item where Request = Output from Step 5
7) Record Query - sysapproval_approver where Approval - Output from Step 6; Give some timeout as 10seconds
😎 Open an Existing Record - sysapproval_approver where Sys Id = Output from Step 7; Give some timeout as 5seconds
9) Click UI Action "Approve" so that user approval is done
10) Record Query - sysapproval_approver where Approval - Output from Step 6 AND State is Requested
11) Open an Existing Record - sysapproval_approver where Sys Id = Output from Step 10; Give some timeout as 5seconds
12) Click UI Action "Approve" so that Group approval is done
13) Record Query - sc_task table where Request Item is Output from Step 6
14) Open an Existing Record - sc_task where SysId = Output from step 13
15) Click UI Action "Close Task" to close task
16) Open an Existing Record - sc_req_item where Sys Id = Output from Step 6
17) Field values validation - validate Stage = Completed

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

18 REPLIES 18

Ankur Bawiskar
Tera Patron
Tera Patron

@John H 

Steps for you to get started

1) Impersonate user
2) Open a Catalog Item
3) Set Variable Values
4) Order Catalog Item
5) Record Query - sc_request where SysId = Output from Step 4
6) Record Query - sc_req_item where Request = Output from Step 5
7) Record Query - sysapproval_approver where Approval - Output from Step 6; Give some timeout as 10seconds
😎 Open an Existing Record - sysapproval_approver where Sys Id = Output from Step 7; Give some timeout as 5seconds
9) Click UI Action "Approve" so that user approval is done
10) Record Query - sysapproval_approver where Approval - Output from Step 6 AND State is Requested
11) Open an Existing Record - sysapproval_approver where Sys Id = Output from Step 10; Give some timeout as 5seconds
12) Click UI Action "Approve" so that Group approval is done
13) Record Query - sc_task table where Request Item is Output from Step 6
14) Open an Existing Record - sc_task where SysId = Output from step 13
15) Click UI Action "Close Task" to close task
16) Open an Existing Record - sc_req_item where Sys Id = Output from Step 6
17) Field values validation - validate Stage = Completed

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi @Ankur ,

 

Can you help me on this below case

I have followed all the above steps , but for step 16 above when I am opening the form the state of the RITM is still showing as open hence my step 17 which is validating the stage it is showing as failed step case

when I am testing without ATF the stage of the RITM is successfully updating as completed.

find_real_file.png

 

here my step 8 contains the ritm record, can you suggest me why its not updating the RITM stage as complete

@mounika

Can you post a separate question for this and tag me as this question is quite older

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

You are one of the most talented person in ServiceNow Community and always ready to help. Thank you this really worked.