Learn how to quickly diagnose rules problems with Corticon rule trace viewer.
Recently, I was working with a customer on a very complex rule project. In a very specific case, the decision service was returning the correct result data except for one attribute we didn’t expect. We were having a hard time understanding why.
We imported the project in the latest release of Corticon and ran the rule trace viewer and immediately saw which rulesheet and specific rule was setting the unexpected attribute. From there it was immediately obvious what was wrong. The rule trace viewer had saved us many hours of work, difficult troubleshooting and headache.
In the rest of this blog, you will see what the rule trace viewer is and how we leveraged it to solve a complex problem and find the root cause of the problem in just minutes.
The rule trace is a new function in Corticon studio that you can access when running rule tests. Essentially, you can run rules tests with rule tracing enabled.You simply use the button highlighted below:
When you run your tests with rule tracing enabled you get an additional view indicating which elements were changed, what was the value before and after any rules changed any attributes. You can sort any columns to quickly focus on specific areas.
Here is an example of the rule trace view and its content.
This is all very nice, but the key feature is to be able to double click on any attribute changes (any row) to find the root cause, that is the exact rule that changed the attribute. This is what enabled us to troubleshoot our problem in no time.
Now let’s look at how we solved a complex problem. The issue was that a specific attribute (UI.done) was set to true in the result payload. The problem was hard to find as there are 15 ruleflows (including subflows) and more than 60 rulesheets. We didn’t want to browse through all of them to discover which one was potentially setting the attribute and guess which ones were executing in the path with the issue.
We simply did this:
Now in our case, it was simple to discover that this rulesheet was executing because we had set a filter incorrectly. So, it was not that the rule at line F was wrong, it was simply that the entire rulesheet should not have executed. We fixed the filter to execute this rulesheet on the proper stage value.
All in all, it only took a few minutes to understand what the issue was and fix it.
Give it a spin; we are confident you will find it very useful not only for troubleshooting issues as described in this blog, but also when creating and maintaining your rules.
This capability is available in all the latest releases of Corticon (V6.3 or greater) and Corticon.js (V1.4 and greater).
Let our experts teach you how to use Sitefinity's best-in-class features to deliver compelling digital experiences.Learn More
Subscribe to get all the news, info and tutorials you need to build better business apps and sites
You have the right to request deletion of your Personal Information at any time.
You can also ask us not to pass your Personal Information to third parties here: Do Not Sell My Info
We see that you have already chosen to receive marketing materials from us. If you wish to change this at any time you may do so by clicking here.
Thank you for your continued interest in Progress. Based on either your previous activity on our websites or our ongoing relationship, we will keep you updated on our products, solutions, services, company news and events. If you decide that you want to be removed from our mailing lists at any time, you can change your contact preferences by clicking here.