biztalkrule-enginebiztalk-2010biztalk-2009biztalk-rule-engine

BizTalk rules engine not firing actions despite conditions being met


I have an orchestration in BizTalk that has a CallRules shape in it. The orchestration was not behaving as expected, and I narrowed the issue down to the Business Rules Engine (BRE).

I used the Test Policy functionality in the Business Rules Composer and gave it a message instance. The BRE evaluated the rules, and on examining the output it appeared that one of the rules had been fully satisfied. Each of the conditions in that rule had evaluated to true and yet the actions had not been applied to my message.

I could not figure out why this should be - if the conditions are met, why are the actions not applied?!


Solution

  • It turns out that this required a new registry entry to allow invoking of static .NET class members in the BRE.

    See this MSDN article which describes what the registry entry should be for each scenario. By default it is not present and thus defaults to zero, which requires assertion of a class instance first.

    For a 64-bit installation, the key can be found in HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\BusinessRules\3.0 rather than the path specified on MSDN.

    I'm not sure why the BRE doesn't warn that certain actions could not be applied - that would be very useful.

    You can be sure that your rule has been met and actions applied when you see an entry in the Test Policy output called RULE FIRED.