1 / 17

Exposing the Business Rules Service

Exposing the Business Rules Service. Auckland Connected Systems User Group November 19th 2009. Jeffrey Chilberto BizTalk Consultant http://bloggingabout.net/blogs/chilberto. Business Rules Engine. The Business Rules Framework is a Microsoft .NET-compliant class library.

dougal
Download Presentation

Exposing the Business Rules Service

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Exposing the Business Rules Service Auckland Connected Systems User Group November 19th 2009 Jeffrey Chilberto BizTalk Consultant http://bloggingabout.net/blogs/chilberto

  2. Business Rules Engine The Business Rules Framework is a Microsoft .NET-compliant class library. It provides an efficient inference engine that can link highly readable, declarative, semantically rich rules to any business objects (.NET components), XML documents, or database tables. Application developers can build business rules by constructing rules from small building blocks of business logic (small rule sets) that operate on information (facts) contained in .NET objects, database tables, and XML documents. Reference: http://msdn.microsoft.com/en-us/library/aa561216(BTS.10).aspx Business Rules Service

  3. Jeff’s Definition The Business Rules Engine is a .Net framework designed to inject functionality at runtime. Solution Process Host Application Business Rules Engine Facts • The BRE is comprised of a utilities to create and manage Rules, • Business Rules Composer • BizTalk Management Console • a repository for storing Rules, • Rule Store • Policy Update Service • and a mechanism for executing rules • BizTalk Call Rules Shape from within an Orchestration • Microsoft.RuleEngine Library Business Rules Service

  4. Why BRE? Separation of business logic from application allowing for more opportunities to leverage the logic elsewhere Can lead to lower maintenance costs Can lead to greater understanding of the business requirements When to use BRE? Application involves significant decision making Rules change frequently Application is relatively stable Business Rules Service

  5. Facts • .Net objects (methods, properties and fields) • XML documents (elements, attributes) • Database rowsets Facts can be short term • A short-term fact is specific to a single execution cycle of the rule engine. and long term facts • A long-term fact is loaded into the working memory of the rule engine for use over an arbitrary number of execution cycles. Business Rules Service

  6. Policies A policy is a versioned logical grouping of rules. Rules A rule consists of a condition and actions. The condition is evaluated, and if it evaluates to true, the rule engine initiates one or more actions. Business Rules Service

  7. Vocabulary A collection of values, references to .Net class members, xpath statements and database objects used to make the creation of Rules simpler and more intuitive. Business Rules Service

  8. ACSUG Order Management System An order: Business Rules Service

  9. Vocabulary Examples Constant Value Set of Values Business Rules Service

  10. Vocabulary Examples XPath Get XPath Set Business Rules Service

  11. Vocabulary Examples The XPath Selector is used to define and select a 'fact‘ while the XPath field determines what aspect of the fact is to be selected. Business Rules Service

  12. Rules Examples Promotion based on product id • multiple facts can be asserted • Forward Chaining • Priority Business Rules Service

  13. Calling From Orchestration Business Rules Service

  14. Common Orchestration Scenarios • Manipulation of business objects • Configuration storage • Default values • Routing • Document Validation http://seroter.wordpress.com/2009/11/11/validating-incoming-data-using-the-biztalk-business-rules-engine/ Business Rules Service

  15. WCF Service Loosely tied service with contract definitions • Facts are sent in and returned as un-typed objects • ServiceKnownTypeAttribute is used for serialization of messages and contract metadata without requiring a service rebuild Business Rules Service

  16. WCF Service Reference to Microsoft.RuleEngine library Policy policy = new Policy(“ACSUG.ApplyPromotion”); policy.Execute(facts.ToArray(), interceptor); IRuleSetTrackingInterceptor can be used to track activity of BRE Business Rules Service

  17. References MSDN Documentation http://msdn.microsoft.com/en-us/library/aa561216(BTS.10).aspx BizTalk Hotrod – Exposing Business Rules Engine as a WCF Service (Issue 4) http://biztalkhotrod.com/Issues.aspx Configuration http://www.biztalkgurus.com/newsletter/TheBizTalker-Volume-07.html Static Methods Feature http://blogs.msdn.com/richardbpi/archive/2005/11/14/492489.aspx Lengthy walk-through http://msdn.microsoft.com/en-us/library/ms942178(BTS.10).aspx Business Rules Service

More Related