Approval User Activity being Skipped

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2018 09:33 AM
I have a user approval activity configured with an advanced script to set my approver based on a variable. The approval activity is not creating and the workflow passes through the activity with an approved status.
I am getting my sys_id or my Name field from the referenced variable but neither are working.
Has anyone else experienced this issue? Is this an issue with the latest release since I've had this working previously in another workflow?
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2018 09:38 AM
Try removing or commenting out line 1. You just need to return the answer, not put it in an array.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2018 10:45 AM
If you dot walk the variable to get the sys_id then the approval activity will be triggered.
Corrected script
var answer = [];
answer.push(current.variables.business_owner.sys_id);
gs.log(answer);
I found a known error on the HI Portal for this issue and its not expected to be corrected until London. https://hi.service-now.com/kb_view.do?sysparm_article=KB0681137