Jason Occhialin
ServiceNow Employee

As mentioned in the first blog in this series, we include one change approval policy for the Normal change request type and one for the Emergency change type and this is how we expect these policies to be applied. Both of these policies include Decisions and Answers which replicate the OOTB approval configuration that were in both the Kingston and London releases and generated by Workflow Group Approval activities.

 find_real_file.png

 

The Normal Change Policy will generate an approval to the members of the assignment group in the Assess state and members of the of the $cab_approval group when the Risk is either Moderate or High in the Authorize state. We will discuss what happens when a Normal change’s Risk value is low in just a moment.

The Emergency Change Policy generates approvals to members of the $cab_approval group in the Authorize state.

We also include an example of how you can use an approval policy to trigger an approval for the Standard change type, which is pre-approved by definition. Maybe the submission violates a policy your organization has defined. We picked the example if a standard change was being logged for more than 1000 CI’s. It is just an example and isn’t tied into the Standard Change Workflow in any way.

 

find_real_file.png

Using the Normal Change Policy as our example, we see two Policy Inputs have been defined in the base system. The first is the change_request input we referenced in Change Approval Policies and provides a reference to the current Change Request and anything the change_request table references. The manager_approved input shows how additional variable inputs can be introduced to your policy, this one in the form of a Boolean or true or false.

Our Normal Change Policy has three decisions that can apply and each specifies a condition that is based on the state of the Change Request. As an example, the “Assess Technical Approvals” decision applies when the state is Assess. 

find_real_file.pngIt is worth noting that the condition states, “Change Request.State” and “Change Request.Risk”. This is because the condition builder refers to the Change Request Input Policy, meaning that we must select the input and then the related field to reference it.

find_real_file.png

Looking at the “Low Risk Manager approval” decision, you can see an example with the Manager approved policy input; this is Boolean based, so the operators are limited to the operators relevant to a true/false. The manager_approved policy input and this decision help to enable a popular feature intended to reduce approval friction for low risk change activity we added in the Kingston release. This allows the assignment group manager to provide final authorization for a Normal change when the risk is low. If the manager provides approval to those changes in the Assess state, no further approval is needed. 

The other key aspect of Decisions is the associated Answer record (Change Approval Definition). This record tells the policy what to do in the event that the Decision’s condition matches. The Change Approval Definition states the action to take, source of the approver, and whether that approval is mandatory.

find_real_file.png

 

Approval actions can

  • Approve (automatically as user $user_name)
  • Reject (automatically as user $user_name)
  • Generate User approval to user $user_name
  • Generate Group approval to group $assignment_group
    • Group approvals can be considered approved/rejected based on the first response OR all responses

In any of those four use cases, you retain full audit capability, as we’ll show later. Users or groups can be derived dynamically or defined statically.

Why may you want to approve something like a Normal change request automatically? Perhaps one of your DevOps teams has met criteria you’ve agreed to and defined for test suite coverage. Automatically approve and tie that back to their product owner who approved the work.

Why may you want to automatically reject? Perhaps an established quality threshold hasn’t been met.

The Approver source lets the definition know how to derive the approver when it attaches an approval. If the Change Request Approver source is specified, then a group or user field picker can be used to point to a column derived from a Change Request record, dynamically defining the user or group to generate approval for.

If the Approver source Approval Definition is selected, then a reference field displays allowing you to pick a specific group or user to trigger approval to.

Finally, the wait for field is available for group approvals only, it specifies whether the first approval is enough to pass the approval gate or if the entire group must respond.

The Mandatory field is used to require a response from the approval audience. 

find_real_file.png

 

The workflow pictured above is an example of the workflow that supports the Normal change type and the Change Approval Policy activities have been highlighted to indicate how they are used to apply the Normal Change Policy at different points in the flow.

Both Change Approval Policy workflow activities have the Approval Policy field set to the Normal Change Policy and include a Policy Input field which allows additional policy inputs to be defined. The Policy Input field requires the answer object to be populated with any additional policy inputs you want to configure and here we define manager_approved Policy Input with script, allowing the assignment_group manager to approve low risk Normal change requests. 

 

find_real_file.png

 

 

Now that we know what they are, the key components and content, and how the components interact, how does it manifest itself in the application during runtime? For ServiceNow veterans, it's going to seem every bit the same. The big change here is in how approval configuration occurs. When approval is requested in a change request, we still generate a standard platform approval record. When the approval gate is met according to the policy we transition to the next approval state. You still have the Approver related list to identify who approved or rejected a change, but we have also added a new related list that can be exposed called Applied Change Policies (table name = chg_policy_applied). This table acts as a log of the policies that have been applied to Change Requests. It will log the Change Request, change policy, Decision (matched outcome), and the date it occurred. It will prove useful period, but especially for any policy and decision that triggers an automatic approval or rejection. 

 

find_real_file.png

How do you adopt Change Approval Policies?

Customers new to ServiceNow in the Madrid release will have workflows for the Normal and Emergency Change Requests types that use the Change Approval Policy activities, by default. You can create your own policies or tune the policies we supply to align to your approval requirements by adding or modifying additional Policy Inputs and Decisions. Don’t forget, the policies we provide in the base system replicate the same approval configuration prior releases generated using Workflow Group Approval Activities.

Upgrading to the Madrid release (Newer state models and types)

Instances upgrading to the Madrid release will have to introduce the Change Approval Policy activities to their Change Request workflows to make use of this feature.

The same policies will be seeded and available to use as is or modified to align to your business requirements, but won't be used until your workflows have been modified to reference the Change Approval Policy activities.

Upgrading to the Madrid release (Legacy state models and types)

If your instance started with a release older than Geneva, there is a chance you haven’t adopted the new Change Request types and states that were introduced in the Geneva release.

If you are still using the legacy state model and types, the Change Approval Policy foundation data needs to be reviewed and updated to reflect your change types and the state values valid for your instance. You will note our policies have been named to align to the change types we offer. We recommend you do the same. You will also need to modify your workflows to include the Change Approval Policy actions.

Ok so we know what they are and how to use them. But, wait - there's more. How about applying Change Approval Policies to your DevOps teams? 

10 Comments
warren_chan
ServiceNow Employee

Jason,

What's the official "best practice" guidance when it comes mixing approval policies with user and group approval blocks in a workflow? Should a customer strive towards converting everything to an approval policy, or is it acceptable to convert some and leave some in the existing user/group approval form?

Also, is it "best practice" to have a single approval policy stand for a single change type, or can you have multiple approval policies for a single change type.

In Madrid, I have a requirement where I'm trying to do three approvals for a Normal Change Request:

First Level Approval (Assess state)
Assignment group's Manager can approve or reject
Required for all Risk levels

Second Level Approval (Authorize state)
Applications CAB can approve (single vote) or reject (single vote)
Required if Risk is 1 to 4 AND Configuration Item is an Application

Third Level Approval (Authorize state)
Enterprise CAB can approve (single vote) or reject (single vote)
Required if (Risk is 1 to 2) OR if (Risk is 3 and CAB Required is true)

I can see the value of using Approval policies for the first approval as there is a state change of "Assess" to key off of to fire the first approval. For the second and third approvals, they are spawned together because I have no state change between the second and third approvals. If I want second level approval to be completed before the third level approval is fired, then I don't see a way to accomplish this without splitting up my approval policy into two elements.

Thoughts?

Warren

 

Niclas
Tera Guru

I think having a Approval Policy engine is a great idea. I like the approach to have it configurable via Decision Tables, so you do not need to customize the workflow itself.

But one question remains: How can we build dynamic approval policies? For Instance, a change may impact multiple Services (which the Change Requester can select via the Related List). So we might want to get the approval from each service owner, it does not seem to be configurable yet right? Because I can't see a way to iterate over the Impacted Services in the Change Approval Policy definition?

Johnny Stone
Tera Contributor

Does anyone have any best practice recommendations?

OOB policy workflows are for Normal, Change and Emergency, with decisions within.

Does it make more sense to do:

Normal - Low Risk

Normal - Moderate Risk

Normal - High Risk

Normal - Very High Risk

Change

Emergency

My situation is that soon we will be going to more of an ITIL approach. ITIL state that typically Low and Moderate DO NOT need Change Management approvals.

I would think that splitting them out more would also allow for easier, on the fly modifications. Too many split into one makes it hard to map out.

Any thoughts are appreciated!

 

Cathy W
Kilo Contributor

Hi Warren,

Did you ever get an answer on how this might be done? I have exactly the same situation where I want 2 levels of approvals when the state is 'Authorize', but both of the policies for that state create the groups as soon as the state is 'Authorize'. I'm looking for the first to fire and then have it wait for the approval before having the second policy fire.

If you found a way could you please share?

Thank you,

Cathy Wentworth

warren_chan
ServiceNow Employee

Cathy,

I did not. I ended up not using the approval policies for this particular use case as it wasn't worth working around anymore. I suppose if you insisted, what you could do is add some field change (example here as a custom field "Approval Level") as an additional condition in the approval policy to split the levels up, so something like:

 

Approval 1:

State = Authorize

Approval Level = 1

 

Approval 2:

State = Authorize

Approval Level = 2

 

Then you could have your separate approvals be fired by approval policies for the same state.

Warren

Janel
Kilo Sage

I'm on that same adventure right now.  From what I can tell, sending out approvals using references to things that are not available directly on "current" is not possible.  We'd like to pull some approvers off of the Impacted Services as well and so far I cannot find anything.

I think what we're going to do is let change management do as many approval decisions as they possibly can and we'll just stick with a workflow to have all of the "Advanced" approvals generated.

Unfortunately I can't figure out a way to combine them without doing repetitive look ups (and even then I won't really know "who" should be approving without statically adding something).

Sebas Di Loreto
Kilo Sage

I tried the exact same thing. I need to bring "approval groups" from impacted services of the change but the code "under the hood" does not allow you to reference the 1:Many table (task_cmdb_ci_service).

It is incredible to me that ServiceNow didn't account for this and stuck to the super simple example of just a CAB group in AUTHORIZE.

The funny part is that the hint for the "approval group" on a service CIs literally says "The group used to approve changes to the CI", which is not possible with change policies.

The change will have some component under the service CI as the change CI, then you can only use the change.assignment_group or the change.cmdb_ci.support_group.

ServiceNow should look into this capability since it is forcing us to leave the group approval activity on the workflow and not fully embrace the change approval policies.

Wes22
Tera Contributor

I am using 7 Group approvals within an Approval Policy. Our Customer does NOT want the Change Request to Approve or Reject until all groups have responded to the approval. The Approval/Reject threshold should then be 50% (4 or more groups needed for Approval or Rejection). Does anyone have a clue how to go about this?

Sebas Di Loreto
Kilo Sage

Uh.... I feel it for you. That is not easy and will require customization.

The out of the box reasoning is:

  • Approval: ALL groups need to approve
  • Rejection: ONE group rejects, then the change is rejected and goes back to NEW state

You are asking:

  • Approval: 50% of the GROUPS need to approve 
  • Rejection: 50% of the GROUPS need to reject

If the assumption is right, you will have to manipulate the GROUP approval records. 

The group approval record (sysapproval_group table, extends the task table) controls all individual approvals (sysapproval_approver table). In reality what happens is that when a user approves their individual approval (state=approved), the group approval record changes the approval field (not state) to approved. And vice versa, as an example, if you change the approval field on an group approval record from requested to canceled, all individual approvals will turn to "no longer required".

You are asking to monitor these GROUP approval records and perform the actions you want through business rules in the sysapproval_group table.

 

Add the group field to understand this interaction game between the group approval record and the individual approval. 

 

SebastianDL_0-1667563833481.png

 

surya271
Mega Explorer

Hi all,
I have a question related to the order/sequence of the approvals getting generated. If we configure two decisions in authorize state, it generates all approvals together (in parallel). Is there a way to generate the second set of approval only when the first one is approved or rejected ?
Regards,
Surya