Sunday, May 20, 2007

BizTalk 2006: Rules engine objects must be retracted

Something new I have discovered with the rules engine in BizTalk 2006 that did not exist in BizTalk 2004, you must explicitly retract an asserted object.

I was getting a strange behavior where older rules calls were appearing over and over again in my DebugView window and couldn't understand why. In 2004 rules were retracted automatically so I dismissed the problem as being a retraction problem out of hand.

Turns out I was wrong. When you have to assert, for example a .NET object in memory, remember to retract it and also to set the priority of the rules to be first and last respectively.

Labels: