Run Server Side Script step in ATF is not filling the output value.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-21-2020 08:48 AM
Hello, I am running a server side script step in ATF and test result is returning success but the issue is that the output variable is empty although i am filling it in the script and the result is not empty.
Can anyone tell me what's the issue?
NB: the response variable is declared in the configuration
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-22-2020 09:00 AM
Hi,
this line should be removed
outputs.u_response
why this is required?
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-22-2020 09:02 AM
i need to know the response i am getting.
The thing is that i am trying to call an outbound api that will get data from a third party tool. so the result is the body message returned by the api and i need to put it in a response so i know the body message and check if the call returned the right data.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-22-2020 10:26 PM
Hi Michel,
if you want to see the result in logs of ATF then use this
outputs.table = 'table name'; // such as incident
outputs.record_id = 'record sys_id'; // such as incident record sys_id
stepResult.setOutputMessage('Script include response'+result);
stepResult.setSuccess();
return true;
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-23-2020 08:47 AM
Hi Ankur,
I really appreciate your help, but i need to fill the variables in the step result,
so the variable response needs to be filled the result in the step result.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-24-2020 10:16 PM
Hi Michel,
you should be able to see the output of the step when you use this line
stepResult.setOutputMessage('Script include response'+result);
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader