In this recipe, we will partially model and simulate a business process with a core focus on Oracle Business Rules from a financial services perspective. In home loan scenarios, a customer is asked to fill an online form or talk to a financial advisor at the bank. These discussions capture the basic required dataset such as the loan purpose, property value, loan amount required, loan repayment duration, applicant's monthly or annual income, type of employment, and age. These datasets are used to analyze the eligibility of the applicant, and to find out whether they qualify for the requested loan amount. Banks often classify their customers into Gold/Platinum customers based on various parameters such as annual income, loyalty with the bank for existing customers, and transactional amount. The primary focus in this recipe is to check if the person is within the eligible age limit and belongs to a particular income group based on which customers are classified into Platinum, Gold, Silver, and Bronze customers. The people who do not meet the required age group or income group are considered as not eligible.
Many screen captures, deployment- and configuration-related steps are not shown in detail in this book. However, these are made available in the ready-to-use source code and on my blog (jamessmith73.wordpress.com) under the BPM for Financial Services section.
We will start with a ready-made schema, available in the source code that is used to check the eligibility of an applicant. This recipe need JDeveloper and a running SOA Suite instance. Download the recipe's source code and take a look at the jamesbank.xsd
schema file from the source code folder for request and response elements.
Let's perform the following steps:
JamesBank
and then click on Next.LoanEligibilityProj
and then click on Next.LoanEligibilityProcess
.LoanEligibilityProcess
.EligibilityBO
. Create a new destination module and name it as Module
. Select Based on External Schema; this schema then needs to be picked from the schema browser. This is where we need to pick up eligibilityRequest
from the jamesbank.xsd
schema file.EligibilityRespBO
. This maps to the eligibilityResponse
element of the jamesbank.xsd
schema.inputArgs
.outputArgs
that maps to the EligibilityRespBO
business object.EligibilityPDO
.EligibilityRespPDO
that maps to the Module.EligibilityRespBO
component.Now perform the following steps to create a business rule in order to check eligibility:
EligibilityRule
.EligibilityBR
.EligibilityDecisionTable
, and then click on Bucketsets from the left tab.EligibilityRule
, set the rule conditions, and then assign values based on it.We will now understand the rule modeling in the decision table.
EligibilityDecisionTable
where applicants with age group less than 18 and greater than 50 years are marked as "NE" (not eligible). Applicants who are in the eligible age group are classified into various categories based on the monthly income and the loan amount requested.EligibilityRespPDO
.Now that our business rules are ready, we will add them into the process in order to check applicant's eligibility.
Bucketsets allow us to define a range of values to be used in the business rules. In the bucketset, we created the ranges for age, monthly income, and the requested loan ranges.
Global variables are the variables that are available within the business rule, which can be even changed during runtime by the process analyst in the business process. We will now create two global variables—one for fixed rate of interest EMIs and another for variable rate of interest EMIs. Fixed interest rate and variable interest rate are the variables that will hold these interest rates as their values.
The process flow and the model (shown in the next screenshot) for the LoanEligibility
business process modeling is summarized as follows:
EligibilityRule
gets fired. This determines various rule parameters based on the business rule defined in the previous section.We will now simulate our home loan business process to check how it works so far:
http://localhost:7001/em
) as weblogic
, and run the process by selecting LoanEligibilityProj
.Bangalore
7500000
Home Loan
9500000
60
30
Salaried
JS Bank
150000
The output of this process will be a Platinum customer, which can be viewed from the Audit Trail and Flow tabs. The green line in the flow denotes a happy path or the path taken by the process for the given input data.
Business rules not only support decision tables, but also if-then conditions. The same rule can be modeled as: if the customer age is less than 18, then assign the eligibility status as not eligible. It's a matter of choice whether you use decision tables or if-then conditions. Decision tables support complex business logic within business rules when compared to if-then conditions.