Change Management Need to Modify approval Counts

Balamurugan S3
Tera Contributor

In change management,

  • when it changes the state from Assess  --->   Authorize
  • After Clicking Request Approval.
  • it requires Atleast 2-approval from a group.
  • normal workflow Any one User can approved it will automatically Moved Authorize State But My Requirement  is  i need 2-User Approvals Is  there a way to do it with flow designer?  Anyone plz Guide Me!!!.
2 REPLIES 2

Jason Nichols
ServiceNow Employee
ServiceNow Employee

Hi Balamurugan,

If you are using the latest version of Change Approval Policies, Change Flows and Change Models (that together form the process logic for Change Management OOTB), then you could get close to implementing your requirement in a Change Approval Policy, specifically, an Approval Definition as part of it:

find_real_file.png 

The choices for Wait for are:

  • First response (the first user to approve/reject)
  • All responses (all users must approve)
  • Percentage of users (the minimum percentage of users that must approve)

So while there is not x number of users choice, the Percentage option above may suffice for you.

(There is an OOTB flow called Change - Normal - Authorize, that references the Normal Change Policy. This in turn contains Decisions that reference which Change Approval Definition to use.)

See also:

KLee19
Tera Contributor

I created a scheduled job that calculates the % daily and sets it on the definition.
This will allow the group to change its member count and the % update.

Also I created a system property to store the group sys id.

 

Script for scheduled job

var ApprPerc= 100;
var apprGroup = gs.getProperty('CABApprovalgroup');
var EncQuery = "group=" + apprGroup + "^user.active=true";
var gr = new GlideRecord('sys_user_grmember');
gr.addEncodedQuery(EncQuery);
gr.query();
if(gr.getRowCount() >=2 ){
ApprPerc= 2 / gr.getRowCount() *100;
}

var grApprDef = new GlideRecord('chg_approval_def');
grApprDef.addQuery('sys_id','cead70dedb116d102694e8abd39619d0');
grApprDef.query();
if(grApprDef.next() && grApprDef.percentage !=ApprPerc){
grApprDef.percentage = ApprPerc;
grApprDef.update();
gs.log("Approval percentage updated on change approval definition - Requires Ecab approval : " + ApprPerc);
}