Rule Group Architecture

1

This Blog introduces the concept of Rules which is used extensively in OLFM. The need for Rules and its architecture is described in details.

Introduction

Oracle contracts need to capture lot of unstructured data related to contract. To capture such data, rule architecture is used. This was introduced in Contracts core module and is extensively used by OLFM.

Consider, for example, that we have to capture conditions for termination of contract. We need to capture information related to termination quote calculation, termination penalty, termination fee, approval etc. These elements are captured through the rule tables.

Rule meta-data

Rule architecture consist of rule group and rules definition. A rule group is a grouping of different rules under it. For example, rule group for capturing Termination Quote Calculation for contract may contain the rules for contract obligation, Discount Rate, Quote fee etc.

Rule meta-data is graphically shown below:

rule_metadata

Rule Groups Definition

Rule groups are captured in a lookup type OKC_RULE_GROUP_DEF. Many lookup codes are pre-seeded by Oracle. Since this is an user extensible lookup; more values can be added as per the requirements.

Rules Definition

Rules are defined and stored in the table OKC_RULE_DEFS_B and OKC_RULE_DEFS_TL.  The rule_code is the primary key.

Rule group to Rule Association

Rules can be associated with rule group using a standard OKC Screen. The association is stored in the table OKC_RG_DEF_RULES. This table contains RGD_CODE (which is Rule Group Code) and RDF_CODE (which is Rule Code).

The following screen displays the screen for creating rule group to rule association (Navigation-> Test Contract Security -> Setup -> Contract -> Rules -> Assign Rule to Rule Groups).

Rule_Group_to_Rules

Using the Rules

To use the rules, we have a Descriptive flex field named ‘OKL Rule Developer DF’. This flex field is based on the table OKC_RULES_B. The values are stored in various attribute columns of the table, and usage of columns are decided by the context value. The name of context value is same as rule code. The following figure shows the descriptive flex field definition:

DFF1

DFF2

 

How Rules are used in OLFM

Rule Groups are stored in the table OKC_RULE_GROUPS_B. The important fields of this table are given below:

Field Name Description
RGD_CODE Rule Group Code.
CHR_ID Contract ID. This field is populated if Rule is   associated with Contract Header; This field is NULL if rule is associated   with Contract Line.
CLE_ID Line ID. Populated if rule group associated with   contract line.
DNZ_CHR_ID Always populated with Contract ID.

 

Rules are stored in OKC_RULES_B. The important fields in the table are given below:

Field Name Description
RGP_ID Foreign key to OKC_RULE_GROUPS_B
DNZ_CHR_ID Contract ID. Always Populated
RULE_INFORMATION_CATEGORY Context Value from the DFF ‘ OKL Rule Developer DF’
RULE_INFORMATION1..RULE_INFORMATION15 These columns actually store the values. Various   fields are populated based on the definition of DFF column usage.

 

Terms and Conditions in OLFM

In a lease contract, we have to fill-in terms and conditions for the contract. The standard terms and conditions are given by Oracle and for each contract we need to capture the values for each T&C. These T&C are implemented using Oracle’s Rule group architecture. Each T&C corresponds to a rule group. The below figure shows screen for T&C on a contract:

Terns_Conditions

Let us take an example of one of the T&C and understand how it is implemented. We take example of ‘Security Deposit’ T&C. The details of this T&C are given below:

Security_Deposit

This T&C contains 4 fields as follows:

  •               Held Until Maturity
  •               Net from Proceeds
  •               Held Until Date
  •               Automatically Credit Security Deposit on Expiration

To find out which rule group is being used, run the following query:

select * from fnd_lookup_Values where meaning = ‘Security Deposit’ and lookup_type = ‘OKC_RULE_GROUP_DEF’;

We get the rule group code of ‘LASDEP’  with meaning = ‘Security Deposit’. Now, let’s find the associated rules for this rule group. For this, we go to OKC screen (navigation given earlier); we get the following results:

RGP_Rule_Sec_Deposit

 

Now, we get the rule name of ‘Security Deposit’. Using this, run the following query to get the rule code:

select * from OKC_RULE_DEFS_TL where meaning = ‘Security Deposit’ ;

We get the rule code of LASDEP. Now, we go the DFF Definition to find out which columns are being used to implement this rule:

Context_Example1

Context_Exampl2

How to create a custom Term and Condition

To create a custom term and condition, the following steps have to be followed:

1. Create a new Rule Group

Create a new rule group by creating an entry into the Lookup type OKC_RULE_GROUP_DEF.

2. Define a new Context

Define a new context in the DFF ‘OKL Rule Developer DF’ with context code = Rule Code. Define the usage of attribute columns as per the requirements.

3. Create a new Rule

Create a new rule by creating entry into the tables OKC_RULE_DEFS_B and OKC_RULE_DEFS_TL. This can be done by using a standard API okc_rld_pvt.insert_row.

4. Associate the Rule with the Rule Group.

This can be done by using standard form in OKC. This will create entry into the table okc_rg_def_rules.

 

5. Associate rule with Sub-Class of LEASE

This can be done by inserting a record in the table OKC_SUBCLASS_RG_DEFS. For doing this an API okc_subclass_pub.create_subclass_rg_defs.

Once the above steps are done, the custom T&C will appear in the Contract Authoring Process.

 

 

Leasing Software Vendors
Share.

About Author

More than 20 years experience in Oracle Technologies with 12+ years in OLFM development and implementation at various clients like GE Comfin, Beckman Coulter, Navistar, Ricoh, Sunrun.

1 Comment

  1. Gopi Mididoddi on

    Hi Kanti Sir,

    In the Step 3 for creating a new rule, can we do this from front end form to create entry in the table okc_rule_defs_b.
    If so can you please let us know the navigation.

    Regards,
    Gopi Mididoddi

Leave A Reply

seventeen − 14 =

Copy Protected by Chetan's WP-Copyprotect.