Why Business Rules Framework?
Meet the time requirements demanded by an agile business .
Create Business Policies that one can develop, deploy and dynamically execute quickly without bringing one’s BizTalk process down.
Facts ExplorerThe facts explorer has four tabs
VocabulariesXML Schemas Databases .NET Assemblies
Business Policy Business Policy is a container in which
business rules are defined, versioned, tested, deployed and executed.
The policy may contain one or more rules for deployment
There are three states of a business policy,EditablePublishedDeployed
Sample Application We need to create and test a simple business rule that a business process can
use. The business process needs to validate a document and receive the result.
We have an xml instance of the schema ‘NewHireList’. Here according to the Age populated in the input instance the Applicant’s Role is decided as a ‘ValidApplicant’ or an ‘InvalidApplicant’
The policy deciding the above mentioned condition is as
If Age < Minimum Age then
Role changes to INVALIDAPPLICANT
where the minimum age will be set as 18 years inside the Business Rules Composer
XML instance of the schema<ns0:NewHireList
xmlns:ns0="http://RuleenginePro.NewHireList">
<DateTime>DateTime_0</DateTime> <Person> <Id>Id_0</Id> <Name>Name_0</Name> <Role>Role_0</Role> <Age>10</Age> </Person></ns0:NewHireList>
Preparation of schema
On schema validation
Creating the output instance
Generate instance of schema
Open Business Rule Composer
Add a new Vocabulary
Add a new definition in Vocabulary
Setting a constant value for MinimumAge
Definition for MinimumAge is created
Creating definition for ApplicantAge
Browse for the required schema i.e. NewHireList
Binding ApplicantAge defintion with Age element of schema
Select the required operation
Creating Definition for ApplicantRole
View of Vocabulary_RoleValidation
Publish vocabulary for creating Rule
Add a new Policy: SampleRule
Add a new Rule: Rule_Role
Defining the Rule condition. Select appropriate predicate
Place ApplicantAge on argument1 and MinimumAge on argument2
Define the Action as shown
Test Policy
Add the instance for the schema
Set a value for Age element
Click on Test Button
Role changes to INVALID APPLICANT