180 likes | 325 Vues
Module 11: Integrating Business Rules. Overview. Lesson 1: Introduction to Business Rules Lesson 2: Integrating Business Rules. Lesson 1: Introduction to Business Rules. What Are Business Rules? What Are Rules, Policies, and Vocabularies? How Rules and Facts Work
E N D
Overview • Lesson 1: Introduction to Business Rules • Lesson 2: Integrating Business Rules
Lesson 1: Introduction to Business Rules • What Are Business Rules? • What Are Rules, Policies, and Vocabularies? • How Rules and Facts Work • Business Rules Orchestration Scenarios • Identifying Business Rule Personas
What Are Business Rules? Business Rule Engine: Use business rules to: Enables policy changes inreal time Enables policy changeswithout recoding orrebuilding the orchestration Trigger notifications Automate approvals Reroute documents
How Rules and Facts Work Policy Rules Rule Set Conditions: true/false expressionwith predicates Actions: initiated when rule condition is met Facts: data upon which rules operate Rules Facts derived from: XML schemas SQL databases .NET classes Predefined andcustom vocabularies
Business Rule Execution Facts are asserted 1 All rules are evaluated 2 If a rule evaluates to true, then its action is added to the agenda 3 Agenda actions are executed in order of their priority 4 Facts are retracted 5 If an action changes a fact that is part of the condition of another rule, then the affected rule will be re-evaluated.
Business Rules Orchestration Scenarios LogicA LogicB Call Rules Call Rules Call Rules { } { } Preprocessing Preprocessing Decision Branch Rule-Based Send Rule-Based Delay Rule Else Post-Processing Post-Processing Post-Processing Call rule engine to dynamically determine which orchestration to process the next step Call rule engine for dynamic orvariable delays Call rule engine and determine path
Identifying Business Rule Personas Information Workers Developers Use business vocabularies to design and test policies Integrate policies within an orchestration Define policiesand vocabularies Administrators Secure, deploy, and migrate policies Track policy execution
Lesson 2: Integrating Business Rules • Steps for Integrating Business Rules • Composing Business Rules • Demonstration: Using the Business Rule Composer • Deploying Business Rules • Integrating Business Rules into an Orchestration • Demonstration: Integrating Business Rules intoan Orchestration • Tracking Business Rule Policy Execution
Steps for Integrating Business Rules Identify the business logic to be represented 1 Identify data sources for rule elements 2 Create rules from vocabulary definitions 3 Test and debug with sample facts 4 Publish and deploy the policy 5 Call the policy from within the orchestration 6
Composing Business Rules Create versionsof vocabularies Create vocabulary definitions Compose policies Publish vocabulariesand policies Policies Vocabularies Definitions Rule Composer
Demonstration: Using the Business Rule Composer In this demonstration, you will see how to: Examine an existing business rule policy Test a business rule policy
Deploying Business Rules Export policies or vocabularies Import policies and vocabularies Deploy policies and publish vocabularies Undeploy policies and remove vocabularies
Integrating Business Rules into an Orchestration Call Order Level Add a Call Rule shape insidethe orchestration 1 ReceivePO Configure the policy and parameters on the Call Rules shape 2 Construct Order Process the results from the rules 3 MsgOrder Item in stock? Yes Else
Demonstration: Integrating Business Rules into an Orchestration In this demonstration, you will see how to configure the Call Rules orchestration shape
Tracking Business Rules Policy Execution Tracking Business Rules Use BizTalk Administration Console Monitor rule activities Track the progress of an orchestration that calls rules
Lab: Integrating Business Rules • Exercise 1: Creating a Business Rule Engine Vocabulary • Exercise 2: Composing a Business Rule Policy • Exercise 3: Integrating a Business Rule Policy into an Orchestration