Review Activity Approval Rating
In the last post I showed how to “move along” users who are slacking at doing their approvals. This post I take the concept a bit further and make users even more accountable by having an approval rating based on how many reviews aren't completed on time. Note that this is overkill but still fun – and we can make use of management pack authoring, Orchestrator and Reporting Services so it covers a few topics.
The idea behind this is that when an already generated incident for not approving an activity is escalated – I modify an overall approval rating for the users attached to the review activity. We can then track this rating and report on it using Reporting Services. At this stage it only works one way – i.e. the rating only goes down – maybe later I can look at some security around the new object and only allow certain people access to manually fix the rating.
So a quick new management pack – I extend the Active Directory user class and add a new field called Approval Rating – I set the default value to 100. There are heaps of examples including some on this blog of how to extend a class.
Here is my extended class and the new property with details – I have set it’s type to an integer so I can do some calculations later.
So simple – just import it into Service Manager and I can check a user object and see the new approval rating field.
For the Orchestrator part I have extended the Runbook from my previous post. When an incident is escalated it now calls another Runbook to lower the reviewer's approval rating.
Let’s have a look at the new Runbook. I pass in the Incident SC Object GUID as a starting point.
The next 3 activities are all the same – Get Relationship. I use them to navigate through the class structure and obtain the AD User object associated with the review activity. It works like this:
Activity Name | Source Class | Target Class |
IR –> RA | Incident | Review Activity |
RA –> Reviewer | Review Activity | Reviewer |
Reviewer –> AD User | Reviewer |
Active Directory User |
The Get Approval Rating activity is just a Get Object activity – I now target the User Approval Rating class and use the SC Object GUID from the last relationship activity to get the object. If I used just the Active Directory User class I would not have been able to access my extended class property.
Just a little bit of PowerShell to adjust the user’s approval rating – and I update the object with the new value. It is then reflected in the console. Bad user – Approve Your Changes!!
As an extension to this I also created a report in Reporting Services to display the user approval ratings. Note that this was done using a reporting services database connecting the Service Manager database and not the data warehouse. Going to have some users in trouble soon!