We’ve always wanted to manage our ServiceNow licenses. But sadly, we haven’t been too successful with it with an optimised solution. In this multi-part blog post, I will be walking you through a custom application that helps manage your license reclamation process.
Alright! In a nutshell this is what the application does. It identifies users based on 3 criteria:
- When was the last active login of the user.
- Does he have a task assigned to him in the time window selected
- Is he the customer of a task in the time window selected
If a user matches these criteria, he is selected as a candidate for the license reclamation process. Along with this, we specify the roles that we would like to reclaim.
Now, what would be an ideal place to store these settings?! Hmmmm…You guessed it right! In properties! Let’s create a settings page, that houses all these properties.
It’s pretty simple to achieve this, using Properties Categories. I have a tutorial that accomplishes just that, be sure to check that out in the meantime.
The application start of execution
We all need an initiation point. Since, we need to execute this periodically, what better use of a Scheduled Job.
I am going to setup a scheduled job that executes every Saturday at 12AM.
The script contains calls to Script Includes that initiates the reclamation job runner.
var lrRunner = new LicenseReclamationJobRunner();
lrRunner.runJob();
That’s all for now folks!
Stay tuned for part-2!