BRE

What is the Rules Engine?
Rules are used to provide highly efficient, easily changeable business rules evaluation to Business Processes.  This allows rules to be changed without rebuilding and redeploying .net assemblies. The Business Rules Engine (BRE) can also be called from any .net component through the API’s.

The Run-Time Rule Engine performs the following functions:
  • Processes rules created as declarative statements without procedural instructions
  • Groups all the rules that apply to a business process together (a policy) without having to arrange them in order of, or define them in terms of, relationships, contingencies, or dependencies
  • Resolves rule conflicts arising from the simultaneous presence of multiple facts and conditions
  • Supports forward chaining of rules that involves re-evaluating rules in the executing policy based on changes to the fact base (addition/removal of facts or changes in state/data of existing facts). Forward chaining does not inherently span policies
Rules are
  • Declarative statements for capturing changing business policies
  • Represented as: IF <Condition(s)> THEN <Action(s)>
  • Logically grouped into policies
Rules allow users to
  • Define & own business policies without coding
  • Change business policies in real time without rebuilding/redeploying applications

What are Engine Control functions in BRE?
Engine Control Functions are
Assert
  -- Add facts to working memory
Retracts
  -- Remove facts from working memory
RetractByType
  -- Remove all instances of the specified type
Update
  -- Instruct engine to re-evaluate relevant facts/conditions
Halt
  -- Stop engine processing
Clear
  -- Clear facts from memory
  -- Clear actions from agenda



What is the tool that I need to use to create Business Rules?
You need to use the Business Rules Composer. This is a graphical tool used for authoring, versioning, and deploying policies and vocabularies.

What is a Business Rule Language?
It is a rule markup language in XML format for declarative rule definitions.

How can I execute a Business Rule in my orchestration?
Using the Call Rules Shape. See more here This link is external to TechNet Wiki. It will open in a new window. .

What is used to create new vocabulary definition?
The Vocabulary Definition Wizard is used to create vocabulary definitions.

What is a Policy?
A policy is a logical grouping of rules. You compose a version of a policy, save it, test it by applying it to the facts, and, when you are satisfied with the results, publish it and deploy it to a production environment. See more here This link is external to TechNet Wiki. It will open in a new window.

Is it possible to change Business Rule policy after it was published?
No. After policies are published it can't be edited. But if there is a need to have a change in policy then new version of policy is to be created.

Does rule composer have provision of adding ELSE logic?
No, there is no provision of adding ELSE but else logic can implemented with extra IF.

What is Long term fact and Short Term fact?
The fact is the user data to which rule conditions are applied. At design time a fact is a reference to that data.
Facts have two categoriesShort Term Facts and Long Term Facts. Consider a loaning process of any Bank. We can think a “loan application” as short term fact. Short team facts are business information which changes per occurrence. On the contrary, “interest rates” do not change very regularly. This business information is steady and we can consider it a long term fact. See more here This link is external to TechNet Wiki. It will open in a new window. . 

What is the difference between Publishing and Deploying the Rule?
Rule alone cannot be published or deployed, it has to be wrapped under Policy and then published and deployed. When a policy is deployed it is ready to use and can't be edited whereas when published, policy aren't ready for use.

Can we call policies from .Net code?
Yes. Firstly it needs to be declared (policy name which is to be called), passed in the fact instance and finally executed. 

Can we call a specific version of Policy using Call rule shape in Orchestration?
No, as the call rules shape calls the latest version of the policy deployed.

What is purpose of BizTalkRuleEngineDb?
This database is a repository for:
Policies, which are sets of related rules
Vocabularies, which are collections of user-friendly, domain-specific names for data references in rules.

Is there limit for versions of policies? 
No.

What is Rete Algorithm, does it have any relation with BRE?
Rete Algorithm is an efficient pattern matching algorithm for implementing production rule systems. BRE's inner working is based on the Rete algorithm.

How does it differ, calling the policy in Call Rules Shape and in Expression?
The Call Rules shape in the Orchestration calls only the latest version of the policy. To call an older (specific) version from within an orchestration, the Business Rules Framework APIs is used, which can be called from within an expression.

No comments:

Post a Comment