Additional Blogs by Members
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member
0 Kudos

In the various applications, industries and projects I have implemented BRF+ business rules I always came accross the question of how to document these rules.

As one intention of rules engines is to reduce documentation by providing a user interface which business and IT experts can use to actually browse through business rules, project requirements, support and other stake holders still demand a proper documentation of these rules.

If your rules engine does not provide the funcionality to print the modelled rules or not according to your standards/formats/needs I recommend you to follow these steps:

What are the program/project/customer guidlines you have to follow ?0.1.

Who will work with the documentation?0.1.

What media and formats do you want to use (word, excel, ...) ?0.1.

In what detail will you require the documentation and how can you ensure the reader is able to find the documenation in the rules engine ?0.1.

Develop a template and teach your people how to use it ?While the most documentation is done in a Microsoft Word like program I recommend the following structure to use for documentation. This has been proofed to be easily readable and enhanceable while providing a clear structure. It can always be adjusted to the project needs. This approach is BRF+ specific, but can be adjusted to other engines.

Start with a description of the business use case you plan to support and how the BRF+ is integrated from a process and technical perspective. For every BRF+ application provide information about function details like names and attributes (transport mode, functional/event mode etc) and list the rule sets or top expressions being used by the function to provide an overall understanding of the BRF+ application.

Further, explain what context information is being passed to the function, what the result object will be and link to a naming convention document or document it within.

Open one sub-chapter per function and rule set.

For each rule, use the structure below (or an adjusted structure, but make sure everybody in the BRF+ team uses the same structure) to describe it's conditions, actions and subsequent rules to whatever level it makes sense to you. I do not describe every mapping in detail, but rather the logical steps and expressions/actions/rules and their outcome. For details I refer to look into the rules engine or requirement documents.

Example (first try to understand the sequence of the rules in the table, and then compare it with the screenshots below):

Rule Set Description:

Provide background information, context, pre-conditions, exit conditions and alike.

Rules:

(1) Rule: Calculate discount, update one order object and trigger approval process ; BRF+ ID 64315000D8301ED08EB953EEBD81C010

IF

%

Expression Formula: FML_CALC_SUM (sum of all purchased products) > 10.000 €

%

</p></td><td rowspan="2" width="49"><p>THEN</p></td><td colspan="6" width="493" valign="top"><p>Process expression Formula: FML_CALC_DISCOUNT to determine the % discount.</p></td></tr><tr><td colspan="6" width="493" valign="top"><p>1.1.    Process Rule: R_CALC_PRODUCT_PRICE</p></td></tr><tr><td colspan="2" width="79" valign="top"><p> </p></td><td width="30"><p>IF</p></td><td colspan="5" width="463" valign="top"><p> <additional conditions could apply here></p></td></tr><tr><td colspan="3" width="109" valign="top"><p> </p></td><td width="49"><p>THEN</p></td><td colspan="4" width="415" valign="top"><p>Process Expression Loop: LO_PRODUCTS for every product in IT_PRODUCTS and do for each entry: </p><p>Process expression Formula: FML_CALC_PRODUCT_PRICE to determine the final price.</p><p>Process action CRM Update OneOrder: UP_ITEM with final price</p></td></tr><tr><td colspan="4" width="157" valign="top"><p> </p></td><td colspan="3" width="393" valign="top"><p>1.1.1. Process Rule: R_TRIGGER_APPROVAL_WORKFLOW</p></td><td width="22"><p> </p></td></tr><tr><td colspan="4" width="157" valign="top"><p> </p></td><td width="30"><p>IF</p></td><td colspan="3" width="385" valign="top"><p>Expression Formula: FML_CALC_END_SUM (sum of all discounted products to be purchased) > 5.000 €</p></td></tr><tr><td colspan="4" width="157" valign="top"><p> </p></td><td colspan="2" width="49"><p>THEN*

%

Process expression *Workflow: WF_APPROVAL to create a new workflow item with WF Task ID TSxxxx and reason code 01 for responsible approver. </p></td></tr><tr><td width="30" valign="top"><p>    </p></td><td width="49"><p>ELSE</p></td><td colspan="6" width="493" valign="top"><p> </p></td></tr></tbody></table><p>Now the same logic in screenshots of a BRF+ application.<br />Rule-Set*

*</p><p>1st Rule<br /><a></a>!https://weblogs.sdn.sap.com/weblogs/images/251744534/rule1.png|height=313|alt=image|width=700|src=ht...! </p><p>2nd Rule*!https://weblogs.sdn.sap.com/weblogs/images/251744534/rule2.png|height=295|alt=image|width=700|src=ht...!</body>

6 Comments