Follow @RoyOsherove on Twitter

.Net user group review: BizTalk rules engine

I met Memi today at the .Net architects user group. I knew Udi from before but Memi was news to me and he's a very nice guy. I think we're getting to that point where having a blogger dinner would not be a sad and pathetic affair :)
As for the meeting, it went well. It was all about using the BizTalk rules engine as a standalone API engine for rule based applications (BizTalk does not even have to be part of this). In the future we might start seeing the Rule engine come bundled in other frameworks (Project? VS.Net?) or maybe even a standalone version, but right now it's part of BizTalk so you need to install it.
The presenter showed using the Engine API to evaluate and execute some rules on XML files and object references.
Some points:
  • The Engine API is not so great. It's pretty cumbersome to add "facts" to the engine via code and some of the naming guidelines are plain "could be better". For example, to add an XML file as a fact for a ruke, you create a TypedXMLDocument and sent it as a parameter to a Policy object (which takes an Object in the constructor). Why not have some global "IFact" interface or a "FactHolder object to send this in? it's less readable.
  • It's hard to create the rules. As a matter of fact, I'd see more usability and business value in actually using scripting in your .Net app rather than use this engine. Would be easier and maybe even more maintainable. Performance and scalability problems can probably be addressed as well if though about enough. It's also more expensive with BizTalk.

The Regulator featured on

[Book] Writing Secure Code, 2nd Edition