COMP208BRFplus for ABAPThe Framework for Business Rules
Carsten Ziegler, Application Platform SAP AGSudhir Sangani Rao, NW BPEM BRMS SAP AG
© SAP 2008 / SAP TechEd 08 / COMP208 Page 2
Disclaimer
This presentation outlines our general product direction and should not berelied on in making a purchase decision. This presentation is not subject toyour license agreement or any other agreement with SAP. SAP has noobligation to pursue any course of business outlined in this presentation or todevelop or release any functionality mentioned in this presentation. Thispresentation and SAP's strategy and possible future developments aresubject to change and may be changed by SAP at any time for any reasonwithout notice. This document is provided without a warranty of any kind,either express or implied, including but not limited to, the implied warrantiesof merchantability, fitness for a particular purpose, or non-infringement. SAPassumes no responsibility for errors or omissions in this document, except ifsuch damages were caused by SAP intentionally or grossly negligent.
© SAP 2008 / SAP TechEd 08 / COMP208 Page 3
1. About Business Rules2. Quick Demo of BRFplus3. BRFplus Features and Components4. Scenario: Insurance Eligibility and Pricing5. Connectivity6. Further Information
Agenda
© SAP 2008 / SAP TechEd 08 / COMP208 Page 4
A little bit about Business Rules...
“Business rules or business rule sets describe the operations, definitions and constraints thatapply to an organization in achieving its goals.” (Wikipedia)
Business rules represent the policies, guidelines that drive operational business decisionsBusiness rules are owned by Business, not by IT
Examples for Business Rules
Validation Rules Claim Validation, Loan Application Validation
Rate Calculation Rules Computation of Taxes, Interest Rates, Sales Commissions, Premiums, Bonuses, Duties
Decision Rules Is Applicant Eligible for a Loan ProductCan this good be cleared by Customs?
Recommendation Rules Marketing Promotions, Medical Recommendations, Online Product Chooser
Personalization Rules Website Personalization, Product Personalization , Relationship Personalization
Internationalization andLocalization Rules
International Products e.g. Maintaining similar Insurance products across countriesCross border Custom Duties
Exceptions and Special Rules Exceptions, Special Accounts , Special Arrangements, etc.
Optimization and ConfigurationRules
Product Configuration, Deal Configuration
Business Rules are expressed intext rules (if … then … else …)decision tables/treesformulas
Examples from across Industries
Telecom Content Based Customizable Billing
Insurance New Products, Claims Settlement, Agent Commissions
Mortgage Eligibility, Pricing, Underwriting
Logistics & Shipping Parts Management, Duties Calculations, Pricing Calculations
Public Sector Tax Calculations, Customs Duties, Land Regulations, LicenseFee Calculations
Stock Exchanges Alert Engines
Education Fee Calculations, Course Selections
CRM Quotations, Campaigns, Discounts, Recommendations, Pricing,Cross Sell
HealthCare Claims, Patient Monitoring, Fraud Detection
Banking Relationship based Pricing, Scorecards, Credit Decisioning
Rules are Ubiquitous. Rules are Everywhere !!
© SAP 2008 / SAP TechEd 08 / COMP208 Page 5
© SAP 2008 / SAP TechEd 08 / COMP208 Page 6
Enforcing Business Rules – ConventionalMethods
BusinessUser
BusinessExpert
BusinessAnalyst (BA)
Rules as Tacit Knowledge
No/Semi AutomationAutomated Enforcement
Rules In DocumentsRules in Code
Rules inside Databases
Typical Customer Challenges
Zero visibility into business decisionsCritical business rules are locked in code or databasesBusiness has no visibility into how systems take decisions
Change resistant IT systemsBusiness rules can be very volatileHardwired business rules make change difficult for ITUnacceptably long testing and change cycle timesHigh costs of correction and rework
Inefficient and Costly Human ExpertsNeed to maintain a pool of trained expertsContinuous training and hiring costsVery complex rules and error prone & time consuming human decision making
Scattered knowledgeBusiness rules not centrally managedScattered across code, manuals and as tacit knowledgeInadequate, ambiguous and inconsistent business rules across the EnterpriseHigh risk of compliance violation
© SAP 2008 / SAP TechEd 08 / COMP208 Page 7
© SAP 2008 / SAP TechEd 08 / COMP208 Page 8
How is it achieved?
Can't we just have faster application development lifecycles?What to change?Where to change?Test the applicationPerform unit tests, functional tests, integration tests
With Business Rules FrameworksProvide a constrained environment for changeEnable Business Users to changeProvide integrated testing; impact of change is clearClear inputs and clear outputsRules are versioned and are auditable and are self documenting"Empower" users to feel comfortable about making the change
© SAP 2008 / SAP TechEd 08 / COMP208 Page 9
How do you "Empower" business users..?
Empowerment of business usersProvide a lifecycle management for rule changes.Provide integrated testing and simulation capabilities.Provide easy to use user interfaces and "Not Code“.Provide expressive concepts such as decision tables, decision trees and if-then rules formodeling business rules.
© SAP 2008 / SAP TechEd 08 / COMP208 Page 10
Examples of Business Rules..
Decision Table
Decision Tree
IF-THEN Rule
© SAP 2008 / SAP TechEd 08 / COMP208 Page 11
The key benefits of Business Rules
Higher degree of transparencyExplicit documentation of business practice decisions instead of secrets kept in code or some people’sheadsBetter understanding and predictability of application behaviorDecreased maintenance and testing costs because business rules are decoupled from application code
business users can modify, test and simulatereduction in modification cycle timequicker response to changing conditionsno downtime, no code change needed
Improved administration of business practice decisions because of change history and clear ownership ofrules
Faster development by modeling approachSAP applicationsPartners and customers in composite scenario
Convenient graphical representationRules can be displayed in the most practical and natural way
Decision TablesDecision TreesFlow ModelsScorecardsText Rules
© SAP 2008 / SAP TechEd 08 / COMP208 Page 12
1. About Business Rules2. Quick Demo of BRFplus3. BRFplus Features and Components4. Scenario: Insurance Eligibility and Pricing5. Connectivity6. Further Information
Agenda
© SAP 2008 / SAP TechEd 08 / COMP208 Page 14
1. About Business Rules2. Quick Demo of BRFplus3. BRFplus Features and Components4. Scenario: Insurance Eligibility and Pricing5. Connectivity6. Further Information
Agenda
© SAP 2008 / SAP TechEd 08 / COMP208 Page 15
BRFplus Overview
BRFplus
Decision Table
Amount Transaction CheckType
0$..100$ None
> 100$ Internal None
> 100$ External 4-Eye
Decision Tree Formula …
(Quantity * 1.19) + ServCharge/
*
-
+
7 8 9
4 5 6
1 2 3
0 +/- ,
CustomerGroup
OpenItems OpenItems
A B,C
< 1000$ >= 1000$
CustomizingTables
SystemTables
Rules Processor
Rules Repository
front-end
back-end
Tools ServicesWorkbenchObject CatalogsWebServiceGenerationXML Export/ImportQueryTrace andSimulation
TransportVersioning andHistorizationCode GenerationExtensibilityDDIC BindingUnit/Currencyconversion Master Data
Tables
© SAP 2008 / SAP TechEd 08 / COMP208 Page 16
Functional Mode of Operation
Application Code
Function
ContextResult
Application codeprocesses BRFplus
function
Expression Formula: Bonus CalculationExpressions process
sub expressions
Expression Decision Table: Bonus DeterminationBRFplus function
processes assignedexpression
11
© SAP 2008 / SAP TechEd 08 / COMP208 Page 17
Event Mode of Operation
Application Code
Function
ContextResult
Application codeprocesses BRFplus
function
BRFplus functionprocesses rules fromassigned rule set(s)
Rules can change context andstart actions
1
*Ruleset: Risk Check
Some Expression Types
Boolean Boolean arithmetic supporting any number of operands, parenthesis, AND,OR, NOT
BRMS Connector Connects BRFplus with SAP NW BRM or partner products
Case Mapping of cases with results; “when … then …, when … then …”
Database Lookup Performs a database select to retrieve values for processing
Decision Table Sequentially processes a table of value ranges and returns the first row/allrows for which all ranges returned true
DecisionTree/Search Tree
Traverses a binary/non-binary tree with nodes being conditions and leafsbeing results
Formula Allows the definition of complex formulas to be evaluated at run-time
Random Number Gets a random number or determines whether a certain probability is met
Static ABAPMethod
Calls a static ABAP method of a class that implements a specific interface
Step Sequence Sequentially processes a number of expressions/functions keeping allavailable values (context / results) in a central work area
Value Range Checks whether a certain value lies within a value range
BRFplus allows to define new expression types, most features and services can be reused
© SAP 2008 / SAP TechEd 08 / COMP208 Page 18
© SAP 2008 / SAP TechEd 08 / COMP208 Page 19
Some Facts
Initial ShipmentsSAP NW 7.0 Enhancement Package 1Integrated into many SAP applications
Development LanguageBackend: ABAP Objects
comprehensive API to define and evaluate Business Rules
User Interface: WebDynpro for ABAPstandalone and reuse UIs
Customer/Partner EnhancementsUser interface is based on Model-View-Controller paradigmBackend and user interface are modular
Backend: usage of customer defined expression types easily possibleUser Interface: configuration of screens, development and replacement of screens possibleUser Interface: stand alone usage or embedding into another application possible
© SAP 2008 / SAP TechEd 08 / COMP208 Page 20
1. About Business Rules2. Quick Demo of BRFplus3. BRFplus Features and Components4. Scenario: Insurance Eligibility and Pricing5. Connectivity6. Further Information
Agenda
Insurance Eligibility and Pricing
EligibilityDetermination of the eligibility status of the insurer from his demographic details
Check for completeness of required mandatory detailsValidation of given inputs and provide error messages
PricingCalculation of the premium quote for the insurer for the chosen insurance productand the face amount
Risk class categorization based on the health status of the insurerCalculation of premiums
ObjectiveTo ascertain eligibility and obtain a premium quote for the selected insuranceproduct, given his/her basic demographic details.
© SAP 2008 / SAP TechEd 08 / COMP208 Page 21
© SAP 2008 / SAP TechEd 08 / COMP208 Page 23
1. About Business Rules2. Quick Demo of BRFplus3. BRFplus Features and Components4. Scenario: Insurance Eligibility and Pricing5. Connectivity6. Further Information
Agenda
BRMS Connector
BenefitsConnection with NW BRM or any other BRMS possible
enables usage of existing BRMSenables use of very specialized BRMS
Connection between ABAP and Java stack
FeaturesConnects external rules engines and NW BRM with BRFplusCommunication based on RFC/JCO and Web ServicesAllows you to export the BRFplus design time information (XML Schema)Provides runtime data exchange (XML)Built-in integration with NW BRM for Java
© SAP 2008 / SAP TechEd 08 / COMP208 Page 24
Modeling Steps
BRFplusCreate an expression of type BRMS Connector1
Specify the signature of the call - inputs/outputs2
Get the generated schema for the vocabulary3
NW BRMImport the vocabulary into NW BRM or externalrule engine4
Deploy the rules into AS Java5
© SAP 2008 / SAP TechEd 08 / COMP208 Page 26
How does the modeling of rules happen?
Create an expression of type BRMS Connector1
© SAP 2008 / SAP TechEd 08 / COMP208 Page 27
How does the modeling of rules happen?
Specify the signature of the call - inputs/outputs2
© SAP 2008 / SAP TechEd 08 / COMP208 Page 28
How does the modeling of rules happen?
Get the generated schema for the vocabulary3
© SAP 2008 / SAP TechEd 08 / COMP208 Page 29
Execution Steps
BRFplusBackend calls BRFplus1
BRFplus creates XML for input data conformant withgenerated XSD2
BRFplus calls java rule engine passing xml data (JCO)3
NW BRMUse the schema for rule definition.4
Java rule engine returns data to BRF plus5
NW BRM
BRFplus returns ABAP data to backend6
© SAP 2008 / SAP TechEd 08 / COMP208 Page 30
© SAP 2008 / SAP TechEd 08 / COMP208 Page 32
1. About Business Rules2. Quick Demo of BRFplus3. BRFplus Features and Components4. Scenario: Insurance Eligibility and Pricing5. Connectivity6. Further Information
Agenda
© SAP 2008 / SAP TechEd 08 / COMP208 Page 33
Planned Improvements
ExpressivenessExpression and Action Type improvements (e.g. BRMS Connector, DB Lookup)New Expression and Action Types (e.g. Email Action, BPM Connector, Loop Expression)Better integration of Decision Tables/Trees into the Rule setDeep Context
WorkbenchMerge of Catalog and RepositorySimplifications/Usability improvementsNew and improved Tools (e.g. for versioning)Excel import and export (for decision table data or test data)UI Configuration
MiscellaneousRule Debugger for non-developersMigration tools for migration to BRFplusRuntime Trace improvementsOptimization of generated code
© SAP 2008 / SAP TechEd 08 / COMP208 Page 34
Further Information
Related Workshops/Lectures at SAP TechEd 2008BPM101, Overview of Business Rules Management with SAP NetWeaver CE,LectureBPM201, Build the Business Rules Once and Let the End User (Business) ManageThem, LectureBPM260, The ABC's of Modeling and Using Business Rules in SAP NetWeaver CE,Hands-onBPM262, How to Use Business Rules With Business Process Management, Hands-on
SAP Online Helphttp://www.sap.com/education/
SAP Public Web:SAP Developer Network (SDN): www.sdn.sap.comBusiness Rules in SDN: http://www.sdn.sap.com/irj/sdn/nw-rules-managementBusiness Process Expert (BPX) Community: www.bpx.sap.com
Fuel your Career with SAP Certification
Take advantage of the enhanced, expanded and multi tier certifications from SAP today!
What the industry is saying“Teams with certified architects anddevelopers deliver projects onspecification, on time, and on budgetmore often than other teams.”2008 IDC Certification Analysis
“82% of hiring managers usecertification as a hiring criteria.”2008 SAP Client Survey
“SAP Certified ApplicationProfessional status is proof of quality,and that’s what matters most tocustomers.”*Conny Dahlgren, SAP Certified Professional
© SAP 2008 / SAP TechEd 08 / <Session ID> Page 36
© SAP 2008 / SAP TechEd 08 / <Session ID> Page 37
SDN Subscriptions offers developers and consultants like you,an annual license to the complete SAP NetWeaver platformsoftware, related services, and educational content, to keepyou at the top of your profession.
SDN Software Subscriptions: (currently available in U.S. and Germany)A one year low cost, development, test, and commercializationlicense to the complete SAP NetWeaver software platformAutomatic notification for patches and updatesContinuous learning presentations and demos to buildexpertise in each of the SAP NetWeaver platform componentsA personal SAP namespace
SAP NetWeaver Content Subscription: (available globally)An online library of continuous learning content to help build skills. Starter Kit
Building Your Business withSDN Subscriptions
To learn more or to get your own SDN Subscription, visit us at theCommunity Clubhouse or at www.sdn.sap.com/irj/sdn/subscriptions
© SAP 2008 / SAP TechEd 08 / COMP208 Page 38
Please complete your session evaluation.Be courteous — deposit your trash,
and do not take the handouts for the following session.
Thank You !
Feedback
© SAP 2008 / SAP TechEd 08 / COMP208 Page 39
Copyright 2008 SAP AGAll Rights Reserved
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changedwithout prior notice.
Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors.
SAP, R/3, xApps, xApp, SAP NetWeaver, Duet, SAP Business ByDesign, ByDesign, PartnerEdge and other SAP products and services mentioned herein as well as their respective logos aretrademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned and associated logos displayed arethe trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.
The information in this document is proprietary to SAP. No part of this document may be reproduced, copied, or transmitted in any form or for any purpose without the express prior writtenpermission of SAP AG. This document is a preliminary version and not subject to your license agreement or any other agreement with SAP. This document contains only intended strategies,developments, and functionalities of the SAP® product and is not intended to be binding upon SAP to any particular course of business, product strategy, and/or development. Please note thatthis document is subject to change and may be changed by SAP at any time without notice. SAP assumes no responsibility for errors or omissions in this document. SAP does not warrant theaccuracy or completeness of the information, text, graphics, links, or other items contained within this material. This document is provided without a warranty of any kind, either express orimplied, including but not limited to the implied warranties of merchantability, fitness for a particular purpose, or non-infringement.
SAP shall have no liability for damages of any kind including without limitation direct, special, indirect, or consequential damages that may result from the use of these materials. This limitationshall not apply in cases of intent or gross negligence.
The statutory liability for personal injury and defective products is not affected. SAP has no control over the information that you may access through the use of hot links contained in thesematerials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-party Web pages.
Weitergabe und Vervielfältigung dieser Publikation oder von Teilen daraus sind, zu welchem Zweck und in welcher Form auch immer, ohne die ausdrückliche schriftliche Genehmigung durchSAP AG nicht gestattet. In dieser Publikation enthaltene Informationen können ohne vorherige Ankündigung geändert werden.
Einige von der SAP AG und deren Vertriebspartnern vertriebene Softwareprodukte können Softwarekomponenten umfassen, die Eigentum anderer Softwarehersteller sind.
SAP, R/3, xApps, xApp, SAP NetWeaver, Duet, SAP Business ByDesign, ByDesign, PartnerEdge und andere in diesem Dokument erwähnte SAP-Produkte und Services sowie diedazugehörigen Logos sind Marken oder eingetragene Marken der SAP AG in Deutschland und in mehreren anderen Ländern weltweit. Alle anderen in diesem Dokument erwähnten Namen vonProdukten und Services sowie die damit verbundenen Firmenlogos sind Marken der jeweiligen Unternehmen. Die Angaben im Text sind unverbindlich und dienen lediglich zuInformationszwecken. Produkte können länderspezifische Unterschiede aufweisen.
Die in dieser Publikation enthaltene Information ist Eigentum der SAP. Weitergabe und Vervielfältigung dieser Publikation oder von Teilen daraus sind, zu welchem Zweck und in welcher Formauch immer, nur mit ausdrücklicher schriftlicher Genehmigung durch SAP AG gestattet. Bei dieser Publikation handelt es sich um eine vorläufige Version, die nicht Ihrem gültigen Lizenzvertragoder anderen Vereinbarungen mit SAP unterliegt. Diese Publikation enthält nur vorgesehene Strategien, Entwicklungen und Funktionen des SAP®-Produkts. SAP entsteht aus dieserPublikation keine Verpflichtung zu einer bestimmten Geschäfts- oder Produktstrategie und/oder bestimmten Entwicklungen. Diese Publikation kann von SAP jederzeit ohne vorherigeAnkündigung geändert werden.
SAP übernimmt keine Haftung für Fehler oder Auslassungen in dieser Publikation. Des Weiteren übernimmt SAP keine Garantie für die Exaktheit oder Vollständigkeit der Informationen, Texte,Grafiken, Links und sonstigen in dieser Publikation enthaltenen Elementen. Diese Publikation wird ohne jegliche Gewähr, weder ausdrücklich noch stillschweigend, bereitgestellt. Dies gilt u. a.,aber nicht ausschließlich, hinsichtlich der Gewährleistung der Marktgängigkeit und der Eignung für einen bestimmten Zweck sowie für die Gewährleistung der Nichtverletzung geltenden Rechts.SAP haftet nicht für entstandene Schäden. Dies gilt u. a. und uneingeschränkt für konkrete, besondere und mittelbare Schäden oder Folgeschäden, die aus der Nutzung dieser Materialienentstehen können. Diese Einschränkung gilt nicht bei Vorsatz oder grober Fahrlässigkeit.
Die gesetzliche Haftung bei Personenschäden oder Produkthaftung bleibt unberührt. Die Informationen, auf die Sie möglicherweise über die in diesem Material enthaltenen Hotlinks zugreifen,unterliegen nicht dem Einfluss von SAP, und SAP unterstützt nicht die Nutzung von Internetseiten Dritter durch Sie und gibt keinerlei Gewährleistungen oder Zusagen über InternetseitenDritter ab.
Alle Rechte vorbehalten.