Biztalk
Xlang

BizTalk: thoughts on Roles, Business Rules, SSO

Xlang

  1. Biz rule composer allows to create a domain specific vocabularies for defining business rules.
  2. SSO allows credentials to be mapped or passed between two target applications. Biztalk internally uses SSO to encrypt sensitive info, such URI of target apps.
  3. Role link defines a business interaction between two partners. Typically interaction involves one partner providing a service, and other partner consuming that service.
  4. Business Rule Framework: is based on facts, vocabulary, definitions and policy.
    – Facts & Vocabularies:facts are entities that your rules consume and manipulate e.g. element in xml doc, column in database etc. Vocabulary is colletion of facts, and provides a meaningful way for versioning of facts. ( Facts don’t actually need to belong to a vocabulary. You are free to add facts via facts explorer windows in a rule without adding them to a vocabulary first.
    – Rules & Policies: Rule is a statement that defines behavior of one aspect of business process. Policy is collection of rules, and provides a meaningful way for versioning them.
    – Actions & Agenda: Actions are the ‘then’ part of rules. Rule engine, by default, determines it’s order of processing from actions, collectively called agenda.
    – Change in rules: As soon as the new version of policy is deployed, biztalk starts using it without any downtime.
  5. Biztalk Rule Engine: is implemented as a standalone .NET component ( it can also be installed separately from biztalk ).
    -Conflict Resolution: is about determining order in whch actions on agenda should be invoked. Ordering of actions is significant because execution of an action can influence subsequent execution of rules engine. One can influence the ordering of rules by changing the priority of rules, which by default is zero.
  6. Fact Creator: When calling rules from an orchestration, we can pass variables as facts to rule engine, but where would these come from, when we are testing the policy from rule composer. To supply our .net components, we need to create a ‘fact creator’, a class implementing IFactCreator interface.
  7. Testing: Testing in business rule composer is peace a cake. Right click, policy to be tested, and click ‘test policy’. Add an instance of fact creator to it, and aloha, it will create cryptic output to the output window.
    After, adding instance of fact creator, don’t wait too long before clicking test button, coz it would unload itself in a minute, and you would get an error. Developer usually confuse it with their logic error.
    When testing, you can enable/disable each rule by modifying it’s activate property.
  8. Call Rule: must be placed in atomic scope or orchestration.
  9. Message interchange between BRE and orchestration: As we know that the msgz in BizTalk are immutable, how does BRE work then ? In reality, BRE actually creates a new message and sends that back to calling orchestration. So, the existing actually gets overwritten, so be aware, if you are changing context properties.
  10. Publishing vs Deploying: A big confusion that arises, when one publishes a policy, rule composer don’t let you modify it, from which one usually perceives that it is now ‘published’ and everybody can use it. But, unfortunately, you still have to do one more redundant step. There are two ways to do this, i) by using deploy feature from BR composer. ii) There is wizard that comes with BizTalk ‘rule engine deployment wizard’. One needs to go and select ‘deploy’ option, and select a published policy, and then deploy, and it will run as expected. Without this extra step, you will get an XLANG error with ‘RuleEnginePolicyRetreivalException’.
  11. Rule set update service: is responsible for listening to policy deployment and undeployment events  and loads latest version of policies deployed, thus saving orchestration from any interruption i.e. any downtime.
  12. Rule Language Converter: is a plug-in component that migrates policies from one rule language to another, by exporting in BRL (business rule schema language).

Author

AlliedConsultants