måndag 28 mars 2016

Inactivity Monitor.... What is that?

I ran into this by accident. I was looking at a Priority 1 incident and couldn't understand why it had an updated date when no one had done anything. It turned out it might be the work of the inactivity monitor...

You can find the inactivity monitor here: System Policy -> Inactivity monitor
By default there is one record OOB at the Inactivity monitor and that is "Priority One Inactivity". and it looks like this:

ServiceNow inactivity monitor

So what does this do....

An Inactivity monitor does exactly what is sound like. When the defined interval is hit, it checks if the conditions is set and if it does, it creates an event which is tablename.inactivity. So in this case it creates an event named incident.inactivity. And then you can for example have a notification fired on that event.
You can read more about that here:Set an inactivity monitor

Here is an event that has been created through the inactivity monitor.


Looking at the data here:

The instance value is the table record that has been the target of the inactivity, in this case the incident.
Parm1 is the sys ID of the inactivity record monitor.

Now, There is a bit more in the background that is happening. The Inactivity monitor is using schedule jobs to make things happen.

This is my current list in the dev instance:


As you can see that when I have updated a record and it matches conditions on the inactivity monitor. It then creates a scheduled job for it and set the "next action" to be match the "wait" value in the inactivity monitor record.

And if I go in an update a record on the list and save. it will remove the current scheduled job and if the conditions still meet at the inactivity monitor it will create a new record.

Now, here is what is bothering me.

If I don't do anything with the record, the schedule job runs and an event is created. This is fine, but it also does something with the incident record, the record gets a new "updated" and the "updated by" sets to "system".
Like this:



So if you got lists/homepages etc. that should show records that hasn't been modified/updated within a specific time frame, you might miss a few because of this.

Now, I've asked HI about this specific inactivity monitor and why it's there OOB and they couldn't really explain that, but if I didn't use it, I was free to delete it. These records doesn't have a "active" flag, så either you delete it or set some conditions that will never be met.



1 kommentar:

  1. It's because it updates the 'activity due' field in the incident record.

    SvaraRadera