Metric for approval (sysapproval_approver) table to record state duration

Arlen
Mega Expert

We need to capture how long each approval remained in any particular state. Sounds like a metric right? Well, creating the metric is easy enough, however, no metric instances are created even after logging demo incidents or change requests each with multiple approvals.
Here's the process:
1) Create a metric and from the table drop down choose Approval (sysapproval_approver)
2) Choose State from the field drop down and save the metric
3) Create a change or an incident record and add few approvers
4) Go back to the metric you created and observe that no instances have been added (there should be some)
5) Go to the approvers tab on the change or incident and approve or reject the approvals
6) Again, check the metric that you created and observe that there are no instances

Just wondering if we're missing something?

Any help is greatly appreciated 🙂

1 ACCEPTED SOLUTION

Chris_Hann
ServiceNow Employee
ServiceNow Employee

Hi,

I believe the reason your metrics aren't being captured is because the business rule which fires the


metric.update
event runs on the Task table, which

sysapproval_approver
does not extend.

Follow the steps below to setup a similar rule on

sysapproval_approver
:
  • Go to Metrics...Business Rules and open the

    metrics events
    Business Rule
  • Change the Name to

    metric events (sysapproval_approver)
    and the Table to

    Approval [sysapproval_approver]
  • Right-click on the form header and select Insert



Chris


View solution in original post

6 REPLIES 6

Chris_Hann
ServiceNow Employee
ServiceNow Employee

Hi,

I believe the reason your metrics aren't being captured is because the business rule which fires the


metric.update
event runs on the Task table, which

sysapproval_approver
does not extend.

Follow the steps below to setup a similar rule on

sysapproval_approver
:
  • Go to Metrics...Business Rules and open the

    metrics events
    Business Rule
  • Change the Name to

    metric events (sysapproval_approver)
    and the Table to

    Approval [sysapproval_approver]
  • Right-click on the form header and select Insert



Chris



Chris.Hann


That is exactly what I ended up doing Chris. I was curious to know if this was supposed to be an OOB functionality but obviously not 🙂

Thanks for the reply.


Hi Arlen,



I performed the above steps and got the metrics but my problem is instead of showing Approval for value in the field of id , it is showing me the sys_id.



any help would be much appreciated.



Best Regards,


Namrata Jain


Hello Namrata,


Just added the business rule to my Eureka instance and it appears to display the columns as expected.   See below:


2014-08-28_2134.png