I have not worked a lot with the Business Rule Engine (BRE) from BizTalk, but today I had to show a customer how it worked. I demoed a BRE solution, where a rule was applied to message taken by an sample orchestration (see picture below, click to enlarge).
Then customer asked if BRE could be used to validate messages received from a third party by applying rules. I said that it was possible, but validation could also take place for instance in pipeline (schema validation). From that point we had a discussion how to implement validation of messages provided by third parties. In the end we came figured out the following pattern, implemented as a validation kind of orchestration (see picture below, click to enlarge).
Message from a random third party is received. A new message with a similar schema is created. Both messages are presented to a call rules shape, where a policy will be applied. This policy contain rules like picture below, click to enlarge.
This concept delivers a way to apply custom validation rules to message provided. The message without error could be processed by for instance another orchestration or application. Wrong original messages can be send elsewhere together with message containing the error’s. Messages could be corrected accordingly to be presented again to validation orchestration in this case. This very conceptual and likely will not be implemented at all or there is a better way easier, maintainable way of validating messages from third parties. I just like to share this pattern.
If you like to know more just give a shout.