Approval Rejection is not working

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2023 07:08 AM
Hi All,
Having a requirement triggering a multiple approval and after approvals task provision.
for that we tried using flow designer and workflow in flow designer we were using common subflow for manager approval after that tried to use the workflow for multiple approvals after approvals finally task provision.
But in the rejection case the workflow is not working as expected(if all the approvals are rejected it should return reject value. but its getting approved value and triggering task.
Wait Condition :
checkApproval();
function checkApproval() {
var grTask = new GlideRecord('sysapproval_approver');
grTask.addQuery('sysapproval', current.sys_id);
grTask.addQuery('state','requested');
grTask.query();
if(grTask.hasNext()){
answer = false;
}
else{
answer = true;
}
}
If condition :
answer = ifScript();
function ifScript() {
var app_count = 0;
var approval = new GlideRecord("sysapproval_approver");
approval.addQuery('sysapproval='+ current.sys_id +'^state=rejected');
approval.query();
var app_count = approval.getRowCount();
if(app_count == 😎 {
return 'yes';
}
else {
return 'no';
}
}
Need suggestion.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2025 02:15 AM
Hi @Community Alums ,
I am facing same issue. Approval is getting approved after rejection