Change Management Need to Modify approval Counts
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2022 09:57 PM
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!!!.
- Labels:
-
Scripting and Coding
-
Team Development

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2022 11:26 PM
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:
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:
- Change Approval Policies (ServiceNow Documentation)
- Create Change Approval Definitions (ServiceNow Documentation)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2023 06:05 PM
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);
}