Using the Microsoft business rules engine
description
Transcript of Using the Microsoft business rules engine
![Page 1: Using the Microsoft business rules engine](https://reader035.fdocuments.us/reader035/viewer/2022062218/56815efd550346895dcdbabe/html5/thumbnails/1.jpg)
USING THE MICROSOFT BUSINESS RULES ENGINEEd JonesMCT, MCPD, MCTS
![Page 2: Using the Microsoft business rules engine](https://reader035.fdocuments.us/reader035/viewer/2022062218/56815efd550346895dcdbabe/html5/thumbnails/2.jpg)
OVERVIEW
What to ExpectToday’s DemoBizTalk in a FlashThe case for business rules enginesOverview of the Microsoft Business Rules Engine– BRE Concepts– How to make a rule– How to call a rule
![Page 3: Using the Microsoft business rules engine](https://reader035.fdocuments.us/reader035/viewer/2022062218/56815efd550346895dcdbabe/html5/thumbnails/3.jpg)
WHAT TO EXPECT
A basic understanding of the Business Rules Engine (BRE) and how to use itNo previous BRE experience required!
P:3
![Page 4: Using the Microsoft business rules engine](https://reader035.fdocuments.us/reader035/viewer/2022062218/56815efd550346895dcdbabe/html5/thumbnails/4.jpg)
TODAY’S DEMO: WHAT’S FOR DINNER?
I’m hungry!
Let’s build a system that can tell us what to have for dinner based on our mood and how much time we have.
![Page 5: Using the Microsoft business rules engine](https://reader035.fdocuments.us/reader035/viewer/2022062218/56815efd550346895dcdbabe/html5/thumbnails/5.jpg)
WHAT IS BIZTALK?
![Page 6: Using the Microsoft business rules engine](https://reader035.fdocuments.us/reader035/viewer/2022062218/56815efd550346895dcdbabe/html5/thumbnails/6.jpg)
![Page 7: Using the Microsoft business rules engine](https://reader035.fdocuments.us/reader035/viewer/2022062218/56815efd550346895dcdbabe/html5/thumbnails/7.jpg)
BIZTALK SERVER CAPABILITIES
MessagingOrchestrationB2B IntegrationsBusiness Rules EngineRFID & Sensor PlatformBusiness Activity MonitoringTools & Application Life cycle ManagementScale-Out ConfigurationVirtualizationWindows Azure– IaaS– PaaS
![Page 8: Using the Microsoft business rules engine](https://reader035.fdocuments.us/reader035/viewer/2022062218/56815efd550346895dcdbabe/html5/thumbnails/8.jpg)
P:8
BIZTALK RUNTIME ARCHITECTURE
![Page 9: Using the Microsoft business rules engine](https://reader035.fdocuments.us/reader035/viewer/2022062218/56815efd550346895dcdbabe/html5/thumbnails/9.jpg)
IMPLEMENTING BUSINESS RULES
![Page 10: Using the Microsoft business rules engine](https://reader035.fdocuments.us/reader035/viewer/2022062218/56815efd550346895dcdbabe/html5/thumbnails/10.jpg)
WHY USE A BUSINESS RULES ENGINE?
Lower human error in decision makingRules can be applied more consistentlyPeople have trouble memorizing complex rulesSaves timeSeparation of ConcernsSystems are insulated from rules changesCentralize rules to ease maintenance
![Page 11: Using the Microsoft business rules engine](https://reader035.fdocuments.us/reader035/viewer/2022062218/56815efd550346895dcdbabe/html5/thumbnails/11.jpg)
BRE CONCEPTS
Policy:– A collection of business rules that are to be executed
as a unit.– Policies can be versioned so that multiple versions of
the same policy can exist in the engine simultaneously.Rules:– The actual representation of the business rules within a
policy. – They are essentially statements that are evaluated and
if true, cause some action to happen.– A rule is made up of Facts, Conditions, and Actions
![Page 12: Using the Microsoft business rules engine](https://reader035.fdocuments.us/reader035/viewer/2022062218/56815efd550346895dcdbabe/html5/thumbnails/12.jpg)
BRE CONCEPTS
Fact:– Some piece of information that a rule may evaluate or act upon.Conditions:– A set of predicates, simple or complex, used to define when a
rule may “fire”, or attempt to apply its actionsActions:– Change a value or call a function– Assertion: apply a new fact– Retraction: remove a fact from memory– Update: forces a fact to be re-evaluated, as well as all rules that
use the factVocabularies:– Business or user-friendly terminology applied to Facts
P:12
![Page 13: Using the Microsoft business rules engine](https://reader035.fdocuments.us/reader035/viewer/2022062218/56815efd550346895dcdbabe/html5/thumbnails/13.jpg)
HOW TO IMPLEMENT A RULE
1. Build the items that the rule will evaluate or act upon (the facts). These can be objects, XML documents, database queries, etc. If they are . objects, they must be in the GAC.
2. Construct the Rule using the Business Rule Composer
3. Test the rule in the Business Rule Composer. If there are .NET objects to be included in the facts, you will need to build FactCreators.
4. Deploy the rule through the Composer or using the BRE Deployment Utility
![Page 14: Using the Microsoft business rules engine](https://reader035.fdocuments.us/reader035/viewer/2022062218/56815efd550346895dcdbabe/html5/thumbnails/14.jpg)
THE BUSINESS RULE COMPOSER
P:14
![Page 15: Using the Microsoft business rules engine](https://reader035.fdocuments.us/reader035/viewer/2022062218/56815efd550346895dcdbabe/html5/thumbnails/15.jpg)
HOW TO USE A RULE
Create a reference to Microsoft.RulesEngineInitialize any facts and add them to an object arrayCreate a Policy objectsApply the factsExecute the policyMake use of the results
P:15
![Page 16: Using the Microsoft business rules engine](https://reader035.fdocuments.us/reader035/viewer/2022062218/56815efd550346895dcdbabe/html5/thumbnails/16.jpg)
DEMO: WHAT’S FOR DINNER?
![Page 17: Using the Microsoft business rules engine](https://reader035.fdocuments.us/reader035/viewer/2022062218/56815efd550346895dcdbabe/html5/thumbnails/17.jpg)
THE “WHAT’S FOR DINNER” RULE SCENARIO
Whenever I’m happy, I want to grill a steak.Steaks can be grilled very quickly.Whenever I’m sad, I want comfort food, like Fried Chicken.Fried Chicken takes a long time to cook.When I’m ambivalent or don’t care, I’ll eat Pizza.Pizza can be picked up or delivered quickly.Pizza’s always good.
P:17
![Page 18: Using the Microsoft business rules engine](https://reader035.fdocuments.us/reader035/viewer/2022062218/56815efd550346895dcdbabe/html5/thumbnails/18.jpg)
Email: [email protected]: http://www.linkedin.com/in/edjjones/ Twitter: @TalentedMonkeyBlog: http://talentedmonkeys.wordpress.com
THANK YOU!