250 likes | 637 Views
Building Solutions Using the BizTalk Rules Engine. Scott Woodgate Lead Product Manager BizTalk Server Microsoft Corporation. Agenda. Overview of BizTalk Rules Enabling Agile Processes Core Concepts & Scenarios Key Personas Demo Rules Engine Architecture Rules in BizTalk Server 2004
E N D
Building Solutions Using the BizTalk Rules Engine Scott Woodgate Lead Product Manager BizTalk Server Microsoft Corporation
Agenda • Overview of BizTalk Rules • Enabling Agile Processes • Core Concepts & Scenarios • Key Personas • Demo • Rules Engine Architecture • Rules in BizTalk Server 2004 • Integration with Orchestration • Common Design Patterns • Q & A
Policies Agile Business Process Automation Orchestration Rules Tracking Enabling Agile Processes • Connected Automation • Process externalized; Policies in code; Change is STILL hard • Formal & Ad-hoc processes still disconnected • Better Visibility for users; Poor Control • Process & People connected • Process & Policies externalized; Change is feasible thru flexible processes • Formal & Ad-hoc processes unified • Total visibility & control of process/ policy for business users • Localized Automation; Process Silos • Process & Policies in app code/data; Change is hard • Ad-hoc processes (exceptions/variations) mostly manual • Poor Visibility for business users • No Automation & Process Repeatability • Subjective Policy Enforcements • Org-silos manifested into process/policy silos • Business Users are active participants • Challenges for Agile Processes • Accessibility • Flexibility • Manageability Agile Processes Connected Processes Automated Process Islands Manual Processes
What are Rules? • Rules are • Declarative statements for capturing changing business policies • Represented as: IF<Condition(s)>THEN <Action(s)> • Logically grouped into policies • Complementary to procedural process models • Rules allow business users to • Define & own business policies without coding • Change business policies in real time without rebuilding/redeploying applications • Connect formal & ad-hoc (human-oriented) processes
Ad-hoc Collaborations Dynamic Business Processes A valid credit card number must be provided If Customer is a Gold Customer Then Apply 10% discount Custom order needs expediting; Need approval/review. • Policy management • Validations/Constraints • Decision support Agile Business Process Automation • Workflow customization • Policy-based Routing • Smart-Task Assignments Orchestration Rules Tracking Service Service Service Business Analytics BAM • KPI Reasoning • Closed loop analytics If order is for Product A, send it directly to factory; For all others send it to Corporate Message Routing OLAP • Intelligent Routing • Intelligent Notification If purchase order amount is more than $1000 Then notify sales manager ‘On-Hold Orders’ Rule: When outstanding invoices over allowed credit limit, then suspend all ongoing orders Rules for the Agile Enterprise
BizTalk Rules in a Nutshell • Lightweight .NET Engine • Integrated with BizTalk Server • Host-agnostic for In-proc scenarios • Powerful Tools & Framework • Supports IW, Developers & IT Admin • Complete API for Design & Execution • Rich Modeling Capabilities • Logical Expressions (AND/OR/NOT/Custom) • Data Sources: .NET Objects, XML, DB • Enterprise-Ready • Security, Performance, Versioning
Rules Personas • Information Worker • Design & Test Policies • Use business vocabularies • Developer • Integrate Policies & Process • Bind vocabularies • IT Pro • Security, Deployment and Migration of policies • Track Policy execution • Composer : Stand-alone App • Use Policies through InfoPath • Inside Visual Studio .NET • Composer : For Policy Bindings • Inside HAT (Health & Activity Tracking)
Information Worker • Build & Modify Policies • Using vocabularies or directly from data source • Test policies • Version Policies • Use Policies through InfoPath
Developer • Build Vocabularies • From database, XML, .NET elements • Integrate Policies in Orchestration • Policy shape in Orchestration Designer • Implement Policies • .NET API • XML-based Meta Data Format
Deploy and Migrate Policies Deploy published policy versions Import / Export Policies Track Rule execution Unified process / rules tracking using HAT Monitor Performance Counters for rule activity Administer and Manage security IT Pro
demo Loan Processing Demo
Loan Processing Policy Income Status Rule IF Basic Salary and Other Income > 0 THEN Set Income Status in the loan to be “Valid” Commitments Status Rule IF The Loan ID is equal to a Valid ID AND Credit Card Balance > 500 THEN Set Commitments Status in the loan to "Compute " Employment Status Rule Residency Status Rule Negation Rules
Framework Architecture • Policy Updates • Authorization updates
Design time features • Rules in XML or via API’s • Rich built-in library that includes: • Temporal, relational predicates • Support for ranges and regular expressions • Arithmetic operations • Engine execution control functions • Support for complex logical expressions (AND / OR / NOT) and user defined constructs • Multiple rule stores (XML / SQL / OleDB)
LoanData.CreditBalanceLimit Design time features • Vocabulary elements to associate technical implementation to business terms IF The Loan IDis equal to a valid ID in customer database AND Credit Card Balance is greater than Maximum Limit THEN Set Commitments Status in the loan to "Compute "
Run time features • Forward Chaining Inference Mechanism • Finds all true statements given knowledge base and a new set of facts • Efficient Pattern Matching • Eager (tuple oriented) Match • Lazy (collection oriented) Match • Database Optimizations • Delayed Query and Virtual Working Memory • Plug-in components that are extensible and customizable • Application integration via Policy object
Enterprise Ready Framework • Authorization • Role based access to the policies/vocabularies via logical Authorization Groups • Versioning • ‘Latest-Version’ or ‘Specific-Version ’with Roll-back • Rule Engine Update Service • Dynamic Updates with configurable caching • Performance and scalability • Optimized eager-match algorithm for smaller rule sets & MS algorithm for larger rule sets • Scales to large rule-sets and fact bases
Integration with Orchestration • Tools integration • Visual Studio .NET-based Orchestration Designer with Policy Object • “Call Rules” Shape • Runtime integration • In-process execution • Works with orchestration dehydration and re-hydration model • Integrated with HAT (Health & Activity Tracking)
Call Rules Engine to dynamically determine which orchestration to call in the next step Call Rules Engine and determine path Use the Rules Engine for dynamic or variable delays Call Rules Engine to execute logic, instead of burying it in code Patterns Illustrated
Use Rules for: Discrete, point-in-time evaluations & calculations Large no of permutations to encode in a control flow Fact-based inferencing where control flow can not be predefined Use Orchestration for: Formal workflows that require: Long-running semantics Transactions/ Compensations Messaging Known control-flow that needs to be rigorously managed for Perf/Scale Visibility & tracking are critical Rules or Orchestration:Where do I use them?
Conclusion Gartner says… • “By enabling business users to respond more quickly to change, organizations with rules technologies will have greater agility and improve their time to market and thus their competitive advantage” • “By 2006, 80% of all integration software will include either direct or indirect business-friendly rules capability”
Conclusion • BizTalk Rules Engine • When combined with orchestration technology, enables truly agile process platform TODAY • Enables business users to fully participate in business processes • Increases BPM platform ROI through policy consistency across the organization
© 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS SUMMARY.