Wait for condition on Approval

nogizaka46_jame
Kilo Contributor

Hi Guys,

Just want to check if some of you encountered this kind of scenerio, basically we have a request form for a specific system, once they submitted the request a ticket will be assigned to our team, our team will generate the approver manually on our end, sometimes we do add multiple approvers in case the user is requesting for a multiple request, now the problem is when one the approver rejected the approval, the workflow broke down, i'm using a wait for task script below but I believe I should setup a separate wait for task for the approvals, just want ask for some help here if you can share some tip on how to resolve It.

qlikviewapproval.jpg

qlikviewworkflow.jpg

Wait for condition script :

var gr = new GlideRecord('sc_task');

gr.parent = current.sys_id;

gr.addQuery('parent', current.sys_id);

gr.addActiveQuery();

gr.query();

if(gr.next()){//if there are any open tasks associated with this requested item

  answer = false;

}else{

    answer = true;  

}

Regards,

3 REPLIES 3

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hello James,



Go to manual approval activity in the workflow and check for the field "wait for". You will have different options there and select the one which best fits for your req.


Manual Approvals workflow activity


Hi Pradeep,



Thanks for the info, I've tried to update It (tried all the selection) but seems like when one of the approval got rejected, the one that got approved didn't push through the next catalog task:



workflow1.jpg



workflow2.jpg


Hello @Pradeep Sharma ,

How do i use the same in the flow desinger ?