Business Rule Usage Reports in Dovetail Agent
A few years ago I wrote a post titled Getting the most out of your business rules. Most of the information in that post is still relevant today.
In that post, I discussed how we can analyze the data inside our database to see which rules are firing and how often. We can do this using a Business Rule Usage Report.
This report tells us what business rules are firing along with how often. Perhaps even more importantly, it allows you to see the rules that are not being fired. Perhaps those rules could be removed, or made inactive, therefore simplifying business rule administration. Or maybe they should be firing, and need further investigation.
These reports are now available within Dovetail Agent. Makes sense to have this data available right alongside where you create and edit your business rules.
Business Rule Usage Report
From the Manage Business Rules page, click on the Usage Report link, which takes you to the report.
From the report, we can easily see which rules have fired, and how often, within the defined time period.
By default, the report shows data for the last 30 days. You also have one-click access to filter by other date ranges:
- Last 30 Days
- Last 365 Days
- This Month
- Last Month
- This Year
- Last Year
In addition, you can manually enter whatever start and end dates that you want.
Rules that don’t log their Activity
Within a business rule action, you have the option to specify whether an Activity Log is created when the rule fires or not. If an activity log is not created, then we don’t get the data, and thus we can’t report on it. No bueno.
So, to make it clear when this is happening, we color those rules differently, so that they stand out, and make it obvious that the report data may be inaccurate because of this.
The help text on the page provides this information, in context.
Colored rule action rows have the Create Activity Log option set to ‘No’ so the number of times the rule has fired will always be zero. If you wish the number of rule firings to be accurate for this rule, check the Create Activity Log on Action checkbox for this rule action.
Hopefully this spurs the viewer on to edit the business rule and set the Create Activity Log option to Yes.
Activity Report for a Single Rule
In addition to the Summary Report shown above, we also have access to this information when viewing a specific business rule. On the Business Rule page is an Activity tab.
Here, we access the same basic report, but it’s specific to only this Business Rule, and its Actions.
Notice that this rule has 2 Rule Actions (notice the number 2 in the Actions tab header), and the Activity report shows the number of times that each of those actions has fired within the given time period.
Since each rule action can start at a different time, the # of Times Fired can be different for each action. Here, both actions start at the same time, so that’s why both show the same number.
Summary
This usage report tells us what business rules are firing along with how often. Perhaps even more importantly, it allows you to see the rules that are not being fired. Perhaps those rules could be removed, or made inactive, therefore simplifying business rule administration. Or maybe they should be firing, and need further investigation.
For even more help with Business Rules, check out the Free Collection of Business Rule Recipes. There’s also a Business Rule Template, which is helpful when defining new business rules.
You can access the Business Rule Recipes and Template here.