How to get Decision point result element in ATF test step?

mfhaciahmetoglu
Mega Sage

Hi all,

 

I am trying to create a test for a service catalog item. There is a decision table step in the flow and I am trying to automate that as well via impersonating the user record that comes from Decision table (so that I can impersonate that user to approve). I found the table that contains the result elements: sys_decision_multi_result. I put a Record Query step to get query this table for the decision table I call. But it is not possible to dot.walk in the next step (impersonate) to move to result elements from the query that returns.

 

Anyone found a way?

 

Best,

Firat  

8 REPLIES 8

Chidanand_VK
Tera Expert

@mfhaciahmetoglu ,

So, you are trying to Impersonate the User, present on the record in 'sys_decision_multi_result' table which is the result of your Record query step. Am I correct?

 

Regards,
Chidanand Kalmani

Yes.

You can use the below script in Run server side script step. and use this step to Impersonate directly in Impersonation step.
 
var gr = new GlideRecord("sys_decision_multi_result");
gr.addQuery('decision_table', '{SYS ID of the Decision Table}'); 
gr.query();
while (gr.next()) {
    outputs.record_id = gr.{Backend name of the Field resulting the User}.sys_id; //Gives the User record as Output of this step.
}
 
If my answer helped you in any way, please mark it as helpful or correct.
Regards,
Chidanand

@mfhaciahmetoglu ,

This can also be performed by using Parameterization.

In the screenshots of ATF Test, the Decision record ('Test Decision_Created by Me') is having User field.

I am impersonating the Manager of that User record.

 

Chidanand_VK_1-1739723669628.pngChidanand_VK_2-1739723682391.pngChidanand_VK_3-1739723692013.png

 

If my answer helped you in any way, please mark it as helpful or correct.
Regards,
Chidanand