Discussion

Pegasystems Inc.
PL
Last activity: 11 Aug 2022 2:52 EDT
Tracking rules usage
This product feedback is raised based on a request from Pega customer CJEU and partner NetService.
Partner and customer are in a build phase of a large and complex case management solution. Delivery of an application has been sliced into MLPs. According to Scrum, it is all fine to develop a product that is later changed or enhanced. Changes and refactoring to already developed solution results in a lot of orphaned rules that are no longer used and often developer miss to withdraw them. Unfortunately, there is no automatic tool that helps identify which rules are obsolete and no longer used in runtime.
There are two approaches that can be taken but neither of them gives 100% correctness:
- In design time – identify rules that are not referenced by other rules, meaning probably there are not used
- Use Rule references tools
- Use full-text search with the option “contains”
- In runtime – identify rules that are not executed
- Block rules and perform full regression testing – time-consuming and works only for executable rules
- Check records in caching tables – if a rule is cached that means it was used
- Investigate Log-RuleUsage class instances
As mentioned neither of those solutions works with enough accuracy so the request is to introduce a platform-level tool that logs rule usages:
- Logs all rules usage – not only executable rules
- Produces easy-to-read output, that can be exported to XLS
- The feature can be turned off or on to minimize performance impact
Unfortunately, there is no way to implement such a solution in an implementation project, that needs to be built into the platform.