One of the challenges of using a business rule engine (BRE) is the disconnect between the actual application code base and the source implementation of rules as resources of the application. The difficulty of debugging business rules is an issue in such instances, but this is no longer the case!
In a recent release (v5.3), we have introduced a new capability that removes this barrier and makes it easy for developers to see the actual linking and debug the rules in a more efficient way.
How it Works
When you install FlexRule Runtime in the samples folder, there is a project named “Airline Discount Program”, for which we posted a blog here.
In this example, there is a validation rule that makes sure input data coming from the user is in a valid state. This rule looks like the one in the picture below:
As you can see, on line 6 of the rule we added an attribute called debug=”true”. This acts like a break point. When you execute the rule, it will be paused at this point in your debugger (i.e., Visual Studio) as shown in the picture below:
You can see all the internal states of the rules by putting FlexRule.Diagnostics.Debugger.Current into your watch window.
You can even see the exact line number (6,6) which corresponds to the line into which you put the debug attribute.
It’s as simple as that!
For more information please refer to https://resource.flexrule.com/knowledge-base/debugging-in-visual-studio/
Last updated September 22nd, 2020 at 11:32 am, Published June 12th, 2015 at 11:32 am
CEO and the founder of FlexRule – He is an expert in architecture, design, and implementation of operational decisions, business rules, and process automation. Created Decision-Centric Approach, a methodology that brings People, Data, Rules, and Processes together to automate operational business decisions.
This approach is recognized by Gartner as the missing link to provide business value to organizations.
Leave A Comment
You must be logged in to post a comment.