module 11: integrating business rules. overview lesson 1: introduction to business rules lesson 2:...

18
Module 11: Integrating Business Rules

Upload: peyton-gillion

Post on 31-Mar-2015

241 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Module 11: Integrating Business Rules. Overview Lesson 1: Introduction to Business Rules Lesson 2: Integrating Business Rules

Module 11:Integrating Business Rules

Page 2: Module 11: Integrating Business Rules. Overview Lesson 1: Introduction to Business Rules Lesson 2: Integrating Business Rules

Overview

Lesson 1: Introduction to Business Rules

Lesson 2: Integrating Business Rules

Page 3: 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

Page 4: Module 11: Integrating Business Rules. Overview Lesson 1: Introduction to Business Rules Lesson 2: Integrating Business Rules

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

Page 5: Module 11: Integrating Business Rules. Overview Lesson 1: Introduction to Business Rules Lesson 2: Integrating Business Rules

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

Page 6: Module 11: Integrating Business Rules. Overview Lesson 1: Introduction to Business Rules Lesson 2: Integrating Business Rules

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

Page 7: Module 11: Integrating Business Rules. Overview Lesson 1: Introduction to Business Rules Lesson 2: Integrating Business 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.

Page 8: Module 11: Integrating Business Rules. Overview Lesson 1: Introduction to Business Rules Lesson 2: Integrating Business Rules

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

Page 9: Module 11: Integrating Business Rules. Overview Lesson 1: Introduction to Business Rules Lesson 2: Integrating Business Rules

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

Page 10: Module 11: Integrating Business Rules. Overview Lesson 1: Introduction to Business Rules Lesson 2: Integrating Business Rules

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

Page 11: Module 11: Integrating Business Rules. Overview Lesson 1: Introduction to Business Rules Lesson 2: Integrating Business Rules

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

Page 12: Module 11: Integrating Business Rules. Overview Lesson 1: Introduction to Business Rules Lesson 2: Integrating Business Rules

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

Page 13: Module 11: Integrating Business Rules. Overview Lesson 1: Introduction to Business Rules Lesson 2: Integrating Business Rules

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

Page 14: Module 11: Integrating Business Rules. Overview Lesson 1: Introduction to Business Rules Lesson 2: Integrating Business Rules

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

Page 15: Module 11: Integrating Business Rules. Overview Lesson 1: Introduction to Business Rules Lesson 2: Integrating Business Rules

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

Page 16: Module 11: Integrating Business Rules. Overview Lesson 1: Introduction to Business Rules Lesson 2: Integrating Business Rules

Demonstration: Integrating Business Rules into an Orchestration

In this demonstration, you will see how to configure the Call Rules orchestration shape

Page 17: Module 11: Integrating Business Rules. Overview Lesson 1: Introduction to Business Rules Lesson 2: Integrating Business Rules

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

Page 18: Module 11: Integrating Business Rules. Overview Lesson 1: Introduction to Business Rules Lesson 2: Integrating Business 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