Approval User Activity being Skipped

KristyS
Kilo Guru

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?

 

find_real_file.png 

2 REPLIES 2

Michael Fry1
Kilo Patron

Try removing or commenting out line 1. You just need to return the answer, not put it in an array.

KristyS
Kilo Guru

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