While I'm a big fan of the Microsoft Business Rules Engine (BRE), our ruleset design and management story isn't as robust as many other solutions in this space. This is where ISVs like RuleBurst can now step in and fill the gap. Here I walk through the RuleBurst suite by demonstrating the solution I built for the SOA and BPM Conference last week in Redmond. I am FAR from an expert with the software, but at this point, I know enough to be dangerous.
So what is the BRE missing that RuleBurst provides? Let's start with an easy to use management interface where I can see the various rule "projects." The main management interface, called RuleBurst Studio is shown below.
One of the first things that jumps out when reviewing this tool is the ability to author the rulesets in common Microsoft Office applications. You can build rules in Word, Excel and Visio.
After you create the Word document in RuleBurst Studio, you can open it up and start building your ruleset. RuleBurst uses a series of format styles to identify the various components which make up a rule. For instance, the top section (in the diagram below) contains data elements used in the rules (i.e. variables). Then, each rule starts off with a "conclusion" and is followed by all the conditions that make that conclusion true. These conditions can be written in regular English, and get interpreted when this Word document is compiled. What I built into the little animation below is the basic ruleset (as authored by the user) and the markup that gets added after compilation.
Once you're happy with the ruleset, you come back into RuleBurst Studio and compile it. Now you are able to view all of the rules contained in the Word document without opening it back up. You can see below how I can browse all the rules in my project in the RuleBurst Studio. If I click the "edit" link, RuleBurst Studio opens the source document (e.g. Word file) and jumps right to the rule I wish to edit. Nice.
Now one thing I've always wished for in the BRE is a basic Ctrl+F ("find") capability so that I could find a particular rule or fact. Lucky for me, this functionality sits within RuleBurst Studio. If I perform a "find", I can type in text and it will look for both rules and facts that meet the criteria. However, it ALSO looks like the "description" text gets searched since by query for "age" pulled up a rule where the description contained the word "manager"!
Another functionality request I often hear from customers centers around dependency checking and impact analysis. One way you can get some of this capability with RuleBurst is through Visualizations. Here I can add conditions to the pallette, and see which rules influence it, and, which rules it influences. In my animation below, you can see that after dropping the "maximum term length", I can right click and have all related nodes added to the screen as well. Now I can see that multiple values drive this condition, and the result impacts another rule higher up. This is very key functionality for even the smallest ruleset.
You've got a compiled ruleset, so what's next? Something all developers avoid like the plague ... testing! Unlike testing in the BRE, RuleBurst Studio's testing interface does NOT require a degree in advanced physics. The first aspect of testing, unit testing, is shown below. Using the Interactive Test Utility, I can enter values for a specific condition/variable, and instantly see the impact on the broader ruleset. For instance, below you'll see that when I fill in the value "purchase" for the "LoanPurpose" variable, I'm immediately shown that the value of "MaxTermLength" gets set to "50" and the "IsLendingPurposeAcceptable" gets set to "true." Very intuitive way to see how various combinations of values affect the rulesets.
Now let's say you have a very complex ruleset that you'd like to test here, and you can't keep track of what values caused the final result. In that case, you can view the Decision Report window which identifies exactly which criteria led to a particular outcome. Nice.
Unit testing is all well and good, but most shops insist on using a series of automated tests to validate their logic. RuleBurst includes the ability to build Test Scripts. You can export out data values and put those into files for bulk testing. In my case, I created a few different files containing data that would result in both true and false responses.
Once I choose to Execute Script all the test cases get evaluated and I'm left with a report validating that the response I expected matches the response reached by evaluation engine. In the report below, you can see that the data for each test case matched my expected result. This is a powerful way to regression test changes to a particular ruleset using the previously defined scripts. It's a quick and easy way to ensure that you didn't break anything you weren't supposed to!
Whew! So we've built, compiled and tested the rule, which means NOW it's ready for BizTalk. In this latest release of RuleBurst Studio, you can select Compile Microsoft BizTalk Policy which generates the BRL that the BRE can then import in.
What's great is that you can control the result of the export. In this window below you can see that we can provide a description, version information, and, specific data bindings. What are those? By default RuleBurst will generate an XSD schema containing all our elements used in the ruleset. But, you may already have a schema needed for the rules processing. No problem, set up a custom data bindings file which maps to your schema ( or database tables). I haven't played around with this much, but have seen examples of it working.
Finally, you can import the BRL data into the BRE and see your BizTalk-friendly ruleset. You can't automatically hook a vocabulary in here (I'd like to see this functionality added), but in reality, you'd be doing all your management in RuleBurst Studio, so BRE vocabularies are a bit less important.
So what do you all think? I definitely didn't demonstrate the whole product, but hopefully gave you an idea of what this can do. This is such a wonderful, complimentary piece of the Microsoft BPM story that really adds SIGNIFICANT value whether you have 50 rules or 5000. Is there additional functionality you'd like to see? What's on YOUR wish list?
Technorati Tags: BizTalk