Module 11: Integrating Business Rules. Overview Lesson 1: Introduction to Business Rules Lesson 2: Integrating Business Rules.
Post on 31-Mar-2015
237 Views
Preview:
Transcript
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
Business Rules Orchestration Scenarios
Identifying Business Rule Personas
Business Rule Engine:Business Rule Engine:
What Are Business Rules?
Enables policy changes inreal time
Enables policy changeswithout recoding orrebuilding the orchestration
Enables policy changes inreal time
Enables policy changeswithout recoding orrebuilding the orchestration
Use business rules to:Use business rules to:
Trigger notifications
Automate approvals
Reroute documents
Trigger notifications
Automate approvals
Reroute documents
Business Event Business Decisions Rules
ReceivePurchase Order
Is customer known? If customer ID exists, then customer is known
Is product known? If product ID exists, then product is known
Is product available and in inventory?
If quantity on hand < reorder quantity, then reorder product
What Are Rules, Policies, and Vocabularies?
Term Description
RulesSet of conditions and one or moreconsequent actionsReturn either True or False
PolicyContains a logical grouping of rulesPublished and deployed to aproduction environment
VocabularyCollection of definitions for rule conditionsand actionsAssigns a friendly name to the definition
Facts derived from:Facts derived from:
XML schemasSQL databases.NET classesPredefined andcustom vocabularies
XML schemasSQL databases.NET classesPredefined andcustom vocabularies
How Rules and Facts Work
RulesRules
Conditions: true/false expressionwith predicatesActions: initiated when rule condition is metFacts: data upon which rules operate
Conditions: true/false expressionwith predicatesActions: initiated when rule condition is metFacts: data upon which rules operate
PolicyPolicy
Rule Set
Rules
Business Rule Execution
Facts are assertedFacts are asserted
All rules are evaluatedAll rules are evaluated
If a rule evaluates to true, then its action is added to the agendaIf a rule evaluates to true, then its action is added to the agenda
Agenda actions are executed in order of their priorityAgenda actions are executed in order of their priority
Facts are retractedFacts are retracted
11
33
44
55
22
If an action changes a fact that is part of the condition of another rule, then the affected rule will be re-evaluated.If an action changes a fact that is part of the condition of another rule, then the affected rule will be re-evaluated.
Post-Processing Post-Processing
Preprocessing Preprocessing
Business Rules Orchestration Scenarios
Call rule engine for dynamic orvariable delays
Call rule engine for dynamic orvariable delays
Call rule engine and determine pathCall rule engine and determine path
Call rule engine to dynamically determine which orchestration to process the next step
Call rule engine to dynamically determine which orchestration to process the next step
Decision Branch Decision Branch
RuleRule ElseElse
LogicALogicA LogicBLogicB
Post-Processing Post-Processing
Post-Processing Post-Processing
Preprocessing Preprocessing
Rule-Based DelayRule-Based Delay
{ }{ }
Call RulesCall RulesCall RulesCall RulesCall RulesCall Rules
Rule-Based SendRule-Based Send
AdministratorsAdministrators
Secure, deploy, and migrate policies
Track policy execution
Secure, deploy, and migrate policies
Track policy execution
DevelopersDevelopers
Integrate policies within an orchestration
Define policiesand vocabularies
Integrate policies within an orchestration
Define policiesand vocabularies
Identifying Business Rule Personas
Information WorkersInformation Workers
Use business vocabularies to design and test policies
Use business vocabularies to design and test policies
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 representedIdentify the business logic to be represented
Identify data sources for rule elementsIdentify data sources for rule elements
Create rules from vocabulary definitionsCreate rules from vocabulary definitions
Test and debug with sample factsTest and debug with sample facts
Publish and deploy the policyPublish and deploy the policy
Call the policy from within the orchestrationCall the policy from within the orchestration
11
33
44
55
66
22
Composing Business Rules
Create versionsof vocabularies
Create vocabulary definitions
Compose policies
Publish vocabulariesand policies
Create versionsof vocabularies
Create vocabulary definitions
Compose policies
Publish vocabulariesand policies
Rule ComposerRule Composer
PoliciesPolicies
DefinitionsDefinitions
VocabulariesVocabularies
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 vocabulariesDeploy policies and publish vocabulariesUndeploy policies and remove vocabularies
Export policies or vocabularies Import policies and vocabulariesDeploy policies and publish vocabulariesUndeploy policies and remove vocabularies
Add a Call Rule shape insidethe orchestrationAdd a Call Rule shape insidethe orchestration
Configure the policy and parameters on the Call Rules shapeConfigure the policy and parameters on the Call Rules shape
Process the results from the rulesProcess the results from the rules
11
33
22
Integrating Business Rules into an Orchestration
Item in stock?
Construct Order
MsgOrder
Call Order LevelCall Order Level
ReceivePO
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 RulesTracking Business Rules
Use BizTalk Administration ConsoleMonitor rule activitiesTrack the progress of an orchestration that calls rules
Use BizTalk Administration ConsoleMonitor rule activitiesTrack the progress of an orchestration that calls rules
Lab: Integrating Business Rules
Exercise 1: Creating a Business Rule Engine Vocabulary
Exercise 2: Composing a BusinessRule Policy
Exercise 3: Integrating a Business Rule Policy into an Orchestration
top related