13    SAP Business Rules Management

You have to learn the rules of the game. And then you have to play better than anyone else.
                                                                                                   —Albert Einstein

This chapter introduces SAP Business Rules Management (SAP BRM) as a technology enabler to streamline the business rules that govern your business processes. SAP BRM makes it possible to centrally model, test, execute, and manage business rules, all from one single platform.

We’ll explore the background of business rules within the context of SAP Business Process Management (SAP BPM) and then take a deep dive into the technology again and learn how SAP BRM is supported within SAP Process Orchestration (SAP PO). After reading this chapter, you should have enough background to start designing and building business rules to support business processes across your organization.

13.1    How Business Rules Work

Automated business processes are a combination of process actors, activities, events, and information flowing from the start to the end of the process flow. Along that journey, a business process encounters different checkpoints at which the business process engine has to choose which process path to execute, which task should be assigned to which employee, what value should be set to a specific field, and so on. The outcome of that decision step may depend on different aspects, of which the business requirements supported by that automated decision step is one of the most important. In SAP BPM terminology, we call that type of in-flight process decision a business rule. Decisions made by or the results given by a business rule have to be executed quickly, be traceable, be accurate, and be done according to the business process requirements and corporate policies.

Business rules enrich business processes with conditions and constraints that must be met or checked before executing a certain process activity or returning a particular result to a requester. Put another way, a business rule represents constraints that affect the behavior or final result of a business process; for instance, corporate policies are standard business practices that need to be consistently applied across business processes.

An important aspect about business rules is that they are initially created by IT but owned and maintained by the business. Business rules can support simple conditions, such as validating a customer postal code in an order, or more complex business decisions, such as calculating pricing conditions and special discounts for selected accounts. It’s also good to mention here that the concept of business rules is absolutely not new and certainly not only applicable for automated business processes, such as those modeled and executed on modern business process management (BPM) engines such as SAP BPM. We find business rules in every line of business and industry; they support the business in driving the decisions taken in repetitive process steps in an efficient and quick way. However, the process of managing and maintaining those important rules imposes a big challenge for companies that haven’t implemented a BPM strategy across their organization. Many of those organizations still rely on individuals to make those decisions based on their knowledge and experience. That creates a knowledge-leak risk and limitation in terms of the reusability and efficiency of those rules.

Table 13.1 summarizes the different conventional implementation methods of business rules enforcement and automation within organizations.

Business Rules Implementation Methods Disadvantages
Automated in the application or database layer
  • Zero to limited visibility for process stakeholders.
  • Combination of business and decision logic. makes coding and maintenance of rules more complex.
  • No agility and flexibility offered to support quick changes driven by the business and market environment.
Documented as work procedures enforced and executed by individuals in the organization
  • Difficult to enforce and control due to its static character.
  • Error prone and increases risk of fraud because of its manual execution.
  • Limited to no knowledge transfer possible; rules knowledge leaves the organization when individuals leave the company.

Table 13.1    Conventional Methods of Business Rules

It’s clear from the preceding overview that traditional methods of maintaining and applying business rules in business processes aren’t suitable for coping with the high degree of flexibility and transparency demanded by modern businesses, in which agility and visibility is a must to run their processes. There is a need for a continuous flow of information through flexible and agile business processes able to cope with the increasing demand and high expectations from the market they operate in.

Automated business rules change the game by adding the level of maturity and flexibility that organizations need to effectively introduce and execute business rules. With automated rule-based decisions, you can enforce corporate policies and process constraints by supporting and speeding up decision making at key points in business processes.

Furthermore, you can take advantage of role-based applications by combining your organizational structure and process flows, which dynamically allocates tasks to the correct role or user via configurable business rules. When working with automated business rules, all activities related to rules modeling and development are managed and executed from one central platform, which gives you total transparency over the existing rules and their content and usage.

Business rules are one of the most fundamental parts of an application and the business processes it supports. Hence, identifying, documenting, and centralizing business rules helps to improve the efficiency and reliability of the business processes owned by an organization. Externalizing decision logic as automated business rules establishes a natural separation of application and decision logic, which in turn leads to easier ways of communicating business rules and managing applications organization-wide.

A special type of software platform called a Business Rules Management System (BRMS) provides organizations with that type of functionality. Such a platform addresses all the areas of business rules and removes the disadvantages presented by nonautomated business rules. It also adds transparency and manageability to the entire business rule lifecycle. Figure 13.1 provides a high-level overview of the basic architecture offered by a typical BRMS platform.

Basic Architecture of a BRMS Platform

Figure 13.1    Basic Architecture of a BRMS Platform

The following main components can be found in a BRMS architecture:

Business rules can be categorized in different groups, depending on their usage and supported functionality. Table 13.2 lists the different types of business rules, as applied in most processes.

Type of Business Rule Usage
Decision Supports simple and complex decisions at runtime. For example, there might be a business rule that computes task allocation to the correct role, team, or business unit in the organization.
Validation Commonly used to automate technical or business validation rules of specific information objects (data input) within a business process.
Calculation This type of rule is typically applied to support complex calculation tasks during process execution—for example, in pricing engines that have to take into consideration different factors (credit rating, special customer-level discounts, localization, marketing campaigns, etc.) before a price or quotation is released to a customer.
Error and exception handling Can be applied to determine which corrective or escalation steps to take when predictable and unpredictable exceptions during process execution occur.
Internationalization and localization Support of specific company policies, products, and services for international business and cross-border activities—for example, compliance with tax and legal acts and support of international markets with generic processes and systems.
Routing Applicable mainly for system-centric business processes in which the flow of messages is decided based on the contents of the message or other type of events while executing the process.

Table 13.2    Types of Business Rules