Neal Walters - Mostly Biztalk Blogs

Thursday, November 10, 2005

XPATH in Business Rule Composer

I suppose everybody has already hit this problem with the Business Rule Composer, but I would like to put it in my own words for newbies.

I see how the schema works now. When you add a scshema to the "Facts Explorer", you browse and attach a schema for purposes of simply dragging elements to your rules. It’s the xpath in the rules that have to be fully qualified. You can of course manually type in the Xpath expressions, but it is much easier to drag and drop from the schema. Thus when you close and open Business Rule Composer, the schema is gone and you have to browse and attach it again (if you need to drag and drop again). When you deploy your policy, it uses the Xpath in the rules, not the schema in the “fact explorer”.

So, you do need to overlay the “Document Type” property in the properties windows (of the schema) of the schema in the “fact explorer”, BEFORE you drag/drop the element into the rule. What do you overlay it with? Go to your Visual Studio solution explorer, click on your xsd file, then look at the file properties. Copy what is in the “FullyQualifiedName” property, then paste into the Business Rule Composer (“DocumentType” property of the schema). It seems a big oversight that the Business Rule Composer doesn’t pick up this namespace. If you ever change your namespace in your schema, remember to also update the fully qualified names in your rules!

I'm hoping to make some new video training on how to use the Business Rule Engine.