User approval being skipped if second in line

raulron
Kilo Expert

Hi,

We have a requested item workflow with 2 sequential user approvals. The first is the direct manager of the requested for, and the second uses a script to pull out the right approver from a table we setup, considering some entries filled in the catalog item variable.

For some reason, if the first approver is found, when he approves, the second approval is always skipped.

If I remove the first approval from the WF, or if a direct manager is not found, than the second approval is triggered and work just fine. So there is no problem with the script itself not finding the right approver.

It is as if the WF is satisfied with only one of the first approvals and skipps the second one. Even though, they are on different user approval activities, and chained in order in the WF.

Has anyone ever encountered such a behaviour? Any ideas how to make the WF not skip the second approval?

Thanks in advance.

10 REPLIES 10

Sai Anna
ServiceNow Employee
ServiceNow Employee

Sorry for late response, I have fixed this by having separate variable for approver



  answer = [];


  answer.push('id1');


  answer.push('id2');



new code:


var MyAns =[];


MyAns.push('id1');


MyAns.push('id2');


answer=MyAns;