Custom Business Rules
The BizTalk Rule Engine (BRE) is often looked at as an ideal option for building out business rules in BizTalk Server. However, the actual use, maintenance, and deployment of the BRE is lacking in several aspects – and when you really want to have complete control over your business rules, with the added ability to easily modify, maintain, and test these rules – the best approach is to go with a custom rules engine solution, ideally based within SQL Server. The solution outlined in Chapter 6 “Solution: Receiving 834 Data” shows the inbound 834 data being sent to a business rules stored procedure. This chapter will outline the details behind this type of implementation, and will show how to work directly with the 834 XML data to apply business rule checks. The end result of the approach outlined in this chapter is a solution that is extremely easy to test (you can do all of your work from a SQL query window) and to maintain, especially post-production (modification of a stored procedure is all that is required – no updates to DLLs, BizTalk components, schemas, etc.).