13.5    Best Practices for Modeling Business Rules

When modeling and developing business rules in SAP BRM, you should always design those rules while applying best practices and design principles. By doing so, you’ll become aware of various aspects that may positively or negatively impact the overall quality of your business rules.

In this section, we’ll share some practical tips that have been proven to improve the quality of the rules and to mitigate other general risks, such as poor performance and difficult-to-maintain rules. However, before we look into that, we’ll share a couple of good sources of information about business rules on the Internet—namely, www.businessrulesgroup.org and, of course, the SAP Community, which has its own page dedicated to SAP PO including business rule topics (https://www.sap.com/community/topic/process-orchestration.html). There, you’ll find an entire collection of blogs, how-to documents, and lots of forum topics discussing SAP BRM.

13.5.1    Separate Decision Logic from Other Types of Logic

When implementing business rules with SAP BRM, you should always apply an important design principle: isolate decision logic (in SAP BRM) from integration logic (in SAP Process Integration [SAP PI]/AEX) and application logic (in SAP and non-SAP backend systems). Use SAP BRM to support decision-making logic and nothing else. Don’t confuse the true power of business rules with other types of logic, such as executing transformations, and calling web services/external systems, or modeling an entire process flow in a flow ruleset. You should use the right tool depending on the type of logic (i.e., SAP BPM to orchestrate and call external services via the AEX). If you fail to do so, you’ll end up introducing maintenance and performance problems in your business rules.

Tip

Here are some additional guidelines for you to consider when designing and before you start implementing your business rules.

  • Use SAP BRM exclusively to support decision making.
  • Think and decide which fields and (XML/Java) data types you’ll need to support the context of your business rule.
  • Send only input data required to execute the business rule. The output of the rule will be updated with the results of the rule execution.

13.5.2    Reuse and Extend before Building

Before you start implementing new rules, first analyze the existing rulesets, and then choose wisely which ones you could reuse or extend before you create new rules. The following specifies when to use a rule, decision table, or rule script: