GRC
HR
SCM
CRM
BI


Article

 

Business Rules Change All the Time, But Your Applications Don’t Have To: Manage and Modify Rules with SAP NetWeaver BRM

by Rajagopalan Narayanan | SAPinsider

April 1, 2009

Typically, business rules are implemented manually, hardwired into a software system, or coded into a program. These methods can be cumbersome and inefficient for developers, as business rules change frequently — so you need a way to effectively manage rules without having to modify your system with each iteration.
 

Organizations routinely rely on business rules — operations, definitions, and constraints based on corporate policies, business guidelines, or laws and regulations — to make day-to-day decisions and achieve their business goals. For example, a retail company sets business rules to determine consumer discounts: “If a buyer’s credit is good and the purchase order value is greater than US$500, then we can grant the buyer a 12% discount.” As the buyer’s credit rating changes, the company must adjust its discount calculations accordingly. In another example, an organization may create calculation rules to drive tax computations, but these rules must change as the tax laws and codes on which they’re based are modified.

Business rules are embedded with business knowledge. IT alone doesn’t know how business rules will change or what impact those changes will have. But IT is responsible for maintaining and executing rules programmatically. Typically, business rules are implemented manually, hardwired into a software system, or coded into a program. These methods can be cumbersome and inefficient for developers, as business rules change frequently — so you need a way to effectively manage rules without having to modify your system with each iteration. That’s why it’s prudent to maintain business rules outside of their associated applications, where business analysts can manage them on an ongoing basis (see sidebar).

SAP offers SAP NetWeaver Business Rules Management (SAP NetWeaver BRM) to help you manage your ever-growing — and ever-evolving — business rules, and to maintain more flexible and agile applications that reflect these changing rules. The solution is a set of pure Java components and tools that provide rules modeling and execution capabilities within SAP NetWeaver Composition Environment (SAP NetWeaver CE). You can use SAP NetWeaver BRM on its own, and you can also leverage it in conjunction with SAP NetWeaver Business Process Management (SAP NetWeaver BPM) to integrate, model, and modify rules within the context of a business process.1

Here I’ll provide an overview of the tools within SAP NetWeaver BRM, break down how to manage business rules with this solution, explain the benefits of combining SAP NetWeaver BRM and SAP NetWeaver BPM, and show you where business rules management is headed.

The immediate and most important value gained when you employ a rules-based approach is that you can externalize and separately manage the most critical and volatile business rules in your applications.

The Building Blocks of SAP NetWeaver BRM

SAP NetWeaver BRM currently consists of two tools (see Figure 1):

The Rules Composer is the rule modeling and implementation environment of SAP NetWeaver BRM. This tool is a perspective in the Eclipse-based SAP NetWeaver Developer Studio designed for IT rule developers. Because it is integrated within SAP NetWeaver Developer Studio, the Rules Composer is the most efficient way for developers to build rules-based applications targeted at the SAP NetWeaver platform.

The Rules Engine is the run-time engine of SAP NetWeaver BRM, available as a predeployed stateless session bean in the SAP NetWeaver Application Server (SAP NetWeaver AS) Java of SAP NetWeaver CE. This tool gives IT developers the ability to generate reusable rules services out of the box, which is particularly helpful for integrating rules into composite applications.

Three additional tools will be added in future releases of SAP NetWeaver BRM (again, see Figure 1). The Rules Repository will provide developers and administrators with rules versioning, role-based access control to rules, and historical rules invocation. The Rules Manager will feature a Web-based collaborative rule maintenance interface for business analysts. And the Rules Analyzer, a targeted environment for business analysts, will allow them to model, test, simulate, and analyze business rules without assistance from developers.

Figure 1
The five technical building blocks of SAP NetWeaver BRM; the Rules Composer and the Rules Engine are currently available, and the other tools will be available in future versions of the solution

Getting Started with Business Rules Management: An Overview

Effective business rules management consists of three core steps. Let’s look at each of these steps within the context of SAP NetWeaver BRM.

Step #1: Create a Business Vocabulary

Before you can model business rules, you need to establish a set of business terms — your business vocabulary. For example, consider the following “if/then” rule used to determine whether a buyer is qualified to make a particular purchase:

IF Buyer’s CreditScore > 720 THEN ASSIGN
Qualified=true.

Here, the business terms are Buyer’s CreditScore and Qualified. You can infer these terms from an existing data model available as an XML schema or a Java class. You can also define your own business terms independent of a data model with SAP NetWeaver BRM. Moreover, you can provide user-friendly, business-oriented names for these terms to represent the rules in a more natural-language format.

Step #2: Model Business Rules

Business rules are ubiquitous. You likely will see a requirement for using a rules-based approach in many kinds of applications, including plain Java applications, composite applications, and business processes. To facilitate such a diverse set of usage requirements, SAP NetWeaver BRM enables you to model business rules in two ways: independently through rules modeling, or through an integrated approach that combines rules modeling and process modeling (see Figure 2).

Figure 2
Depending on an application’s requirements, developers can use SAP NetWeaver BRM or SAP NetWeaver BPM to model rules

SAP NetWeaver BRM supports the independent rules modeling approach through the Rules Composer environment. Later in the article, I’ll cover integrated rules and process modeling (in the “Combining SAP NetWeaver BRM with SAP NetWeaver BPM” section).

The main unit of work in SAP NetWeaver BRM is a ruleset, a group of logically related rules. Rulesets are important from an application viewpoint because when an application calls a rule engine, it asks for a ruleset name, not individual rules inside a ruleset.

Within the Rules Composer, the Project Explorer view (the rules tree) shows a list of all of the rules projects — collections of logically related rulesets — in a workspace (see Figure 3). You can see the rulesets in the Outline view.

Figure 3
Developers work within the Rules Composer environment of SAP NetWeaver BRM

Business rules can be represented in many forms, mainly as if/then rules (inference or production rules) and decision tables (score cards or tabular rules). Future versions of SAP NetWeaver BRM will introduce additional representations, including flow rules.

For technical details on modeling rules with SAP NetWeaver BRM, please visit https://www.sdn.sap.com/irj/sdn/nw-rules-management.

Step #3: Integrate Rules Engines with Applications

Business rules are reusable assets. The Rules Engine of SAP NetWeaver BRM enables the reuse of rules and rules-based operations. Because the Rules Engine is available as a predeployed stateless session bean, Java and J2EE applications can directly use this stateless EJB to integrate their applications with the Rules Engine.

This design enables the consumption of rules from any kind of application, regardless of whether the application uses SAP or non-SAP technology. In fact, SAP NetWeaver BRM is an ideal rules management technology for building rules-based composite applications and service-oriented architecture (SOA)-style applications. These applications can use the Rules Engine — and therefore, rules-based operations — as stateless Web services. What’s more, SAP customers can successfully employ business rules management in a variety of business scenarios involving pure composite applications at the edge of the application core, and in many system-to-system application integration scenarios — for example, destination determination rules in SAP NetWeaver Process Integration (SAP NetWeaver PI), or precise and targeted campaign management in SAP Customer Relationship Management (SAP CRM).

Combining SAP NetWeaver BRM with SAP NetWeaver BPM

SAP NetWeaver BRM and SAP NetWeaver BPM are complementary technologies. You can use them separately — but when you use them together, they are a powerful combination, especially for processes with numerous steps that involve changing or evolving rules.

NOTE!
When modeling business rules in the context of a business process, you use the same tools available in the Rules Composer.

Here is a nonexhaustive list of common scenarios in which business rules add value to business process management:

  • Complex rules-based decisions, such as pricing and credit decisions

  • Responsibility determination, such as rules-based task assignment

  • Recognition of business events, such as fraud detection

  • Routing rules, such as receiver determination

  • Parameter thresholds and tolerance, such as constraint rules

An organization can use SAP NetWeaver BRM and SAP NetWeaver BPM to assess financial liability for a warranty claim, for example. Figure 4 illustrates a warranty claims process modeled with SAP NetWeaver BPM. Here, SAP NetWeaver BPM manages the whole process, but the Rules Engine of SAP NetWeaver BRM helps to both validate a particular claim request and assess financial liability for it.

Figure 4
Modeling business rules in the context of a warranty claims business process using
SAP NetWeaver BRM and SAP NetWeaver BPM

To determine financial responsibility — one step in the process — you use a set of liability assessment rules based on contracts with your suppliers, which may change yearly. The Rules Engine calls the liability assessment rules, which are managed and modified outside of the application. Business rules have been modeled in the context of a business process, and these same rules have been used in the business process model.

The Future of SAP NetWeaver BRM: Roadmap Highlights

Going forward, SAP NetWeaver BRM will continue to complement and accelerate SOA, composition, and business process management via the automation and alignment of critical business rules.

The interactivity between SAP NetWeaver BRM and SAP NetWeaver BPM will continually add value as companies integrate their business process and business rules management capabilities. SAP will provide seamless navigation from business process models into business rules definitions that drive decisions within processes, as well as integrated rules modeling in a business process model context.

And, aimed at increased business analyst enablement, future versions of SAP NetWeaver BRM will:

  • Support the modeling of complex business decision sequences

  • Enable business user participation and collaboration toward rules authoring and tactical change management

  • Allow rules-based responses to business events in real-time business scenarios

  • Facilitate advanced rules analysis capabilities to align with business goals through simulations and replays

  • Enable business analysts to model business rules

Conclusion

With SAP NetWeaver BRM, you need only adapt your business rules — not your complete systems — to changing business requirements. As a result, a real-world competitive benefit emerges: Companies can considerably reduce maintenance and operational costs and, at the same time, lower time-to-market pressures.

For additional information about SAP NetWeaver BRM, please visit https://www.sdn.sap.com/irj/sdn/nw-rules-management and click the “Rules Tutorial Center Is Available” link. Here you’ll find ready-to-download applications to use with the Rules Engine.

Additional Resources

  • “Gain Control of Your Critical Business Processes: Design, Document, and Deploy Them with SAP NetWeaver Business Process Management,” an SAP NetWeaver Unleashed column by Donka Dimitrova and Ralf Schaub (SAP Insider, January-March 2009, www.SAPinsideronline.com)

  • The SAP NetWeaver/BI and Portals 2010 conference in Orlando, March 23-26, 2010, for strategies and best practices on using SAP NetWeaver technology (www.sapnetweaver2010.com)

  • “SAP BPM Tools,” an SAP Insider Multimedia Training CD, which includes
    an introduction to SAP NetWeaver Business Rules Management
    (www.SAPinsidermultimedia.com)

Rajagopalan (Rajgo) Narayanan (rajagopalan.narayanan@sap.com) is a Development Manager on the SAP NetWeaver Business Rules Management team at
SAP Labs India. Prior to this role, Rajgo was a Product Manager in the same area. He has more than eight years of experience working in business rules management.


1 For more information on SAP NetWeaver BPM, please see “Gain Control of Your Critical Business Processes: Design, Document, and Deploy Them with SAP NetWeaver Business Process Management” by Donka Dimitrova and Ralf Schaub in the January-March 2009 issue of SAP Insider (www.SAPinsideronline.com). [back]


An email has been sent to:






More from SAPinsider



COMMENTS

Please log in to post a comment.

No comments have been submitted on this article. Be the first to comment!


SAPinsider
FAQ