Book Image

Instant Oracle BPM for Financial Services How-to

By : B.M Madhusudhan Rao
Book Image

Instant Oracle BPM for Financial Services How-to

By: B.M Madhusudhan Rao

Overview of this book

Oracle Business Process Management helps in process automation and improvement with a very high level of flexibility for all the process participants from the process planning team to the end users. It also makes it possible to have corporate employees and customers collaborating towards common goals. Instant Oracle BPM for Financial Services How-to covers many concepts that can be easily reused across industries such as core banking, healthcare, travel, self service automation, e-governance, and so on. It highlights various roles of Business Process Management such as Business Process Modeling, Process Developer, Process Owner, and Process Participant along with the way they work together in a financial services environment. Instant Oracle BPM for Financial Services How-to is your guide to implementing Oracle Business Process Management whilst working in the Financial Services industry.Starting through the discovering of implementation and Business challenges for financial services we will move on to Modeling, Implementation, Process ork-flow’s, deployment and testing. Moving on to cover advanced topics such as Process administering, changing business processes using process analysts, business reporting, participants and notifications and finally collaboration. You will learn to setup, maintain and alter your Business Process Management aimed specifically for the Financial services industry.
Table of Contents (8 chapters)

Implementing a home loan business process (Advanced)


A process analyst needs to have expertise on BPMN 2.0 models. They should also be able to understand the business process and business rules, collaborate with other business users, and simulate and document the process. It is also expected that a process analyst can model and edit the process on runtime using BPM Composer if there are changes in the business requirements. Oracle BPM allows process analysts to monitor the process, or even assign a given task to any user in the workflow system. BPM's out of the box integration capabilities allows analysts to view or check-in documents from or into the content repository related to his process.

A process developer needs to have expertise on BPMN 2.0 models from a technical point of view and the ability to write complex business logic in Java or PL/SQL. If required, he needs to have expertise in implementing the process model itself, by integrating with the necessary applicants or legacy systems by using BPM or SOA.

This recipe continues from the previous process model and implements the eligible customers business logic.

Getting ready

Before we begin, the following requirement needs to be fulfilled:

  • Download the source code from the previous recipe.

  • Use Oracle SQL Developer to develop and test a stored procedure to compute the EMI amount. We can use the SQL scripts provided in the code files of this recipe to create the database user and execute the procedure.

  • Ensure that SOA Suite is running.

Let us understand how a home loan EMI is calculated. Home loan EMI's are calculated based on the following formula:

EMI = (L*I)* {(1+I)^N / [(1+I)^N]-1}

Where:

L = Requested loan amount

I = Interest rate (rate per annum divided by 12)

^ = To the power of

N = Repayment duration in months

So, assuming a loan of 100,000 INR at 11 percent per annum that is repayable in 15 years, which is 180 months, the EMI using the formula will be:

EMI = (100000*0.00916)* {(1+0.00916)^180 / [(1+0.00916)^180]-1}

EMI ~ 916 * (5.161846 / 4.161846)

EMI ~ 1,136 INR

How to do it…

We need to create a PL/SQL procedure that can calculate fixed and variable EMIs, and also generate a unique request ID for every eligibility request. We will be passing the interest rate (I) to the PL/SQL procedure from the BPM business rules.

Writing a business logic in PL/SQL and integrating it with the process is done as follows:

  1. Log in to Oracle Database as the SYS user.

  2. Create the JAMESBANKDB user and grant all the required create table, create trigger, and create sequence privileges to this user.

  3. Log in as JAMESBANKDB.

  4. Create the procedure to calculate EMIs and write the data in the database table.

    Note

    The SQL scripts are available in the code files for this recipe.

  5. Compile and Run the Insert Eligibility procedure. This procedure will insert the eligibility data into a table, calculate the EMI amount for fixed and variable rate of interest, and also return a unique ID for the eligibility request.

  6. Launch JDeveloper and open the James Bank application developed in the previous recipe.

  7. Open composite.xml in the Design view.

  8. In the External References area on right side in the Design view, insert a Database Adapter service.

  9. Set up the necessary database connection parameters:

    • Connection Name: jamesbankdb

    • Username: jamesbankdb

    • Password: welcome1

    • JDBC Port: 1521

    • Service Name: orcl

  10. Test the connection and proceed if it is successful.

  11. In the Adapter Configuration Wizard, select the Call a Stored Procedure or Function operation type.

  12. From the configuration wizard, select the EMI Calculator stored procedure.

  13. Open the LoanEligibility process in the Design view, and change the EligibleCustomers activity into a service task, and make it active (earlier it was marked as draft).

  14. Select the Database Adapter service that we have created in the service list.

  15. Now click on Data Associations and ensure that the necessary input and output parameters are passed.

  16. Save the process and deploy on SOA Suite.

  17. Generate a web service-based Application Development Framework (ADF) data control by using the deployed WSDL URL, and drag-and-drop it on the JSPX page.

  18. Right-click and Run the JSPX page to test the web service from the browser by giving necessary input parameters, and then clicking on the Check Eligibility button, as shown in the next screenshot.

How it works…

We have build a PL/SQL procedure to calculate EMIs, store the necessary input data into the database table, and generate a request ID for every eligible application request. In the James Bank's loan application business rules, we are dynamically passing the fixed and variable interest rate (I). We have also built a business logic that defines Platinum, Gold, Silver, Bronze, and NE customers. We then deployed our BPM process. The process can be tested from Enterprise Manager or a simple ADF web service-based data control.

The role clarification process analyst was responsible for creating the dynamic business logic in the BPM process, including business rules, whereas the process developer was responsible for creating the PL/SQL stored procedure for the static business logic. The process developer was also responsible for creating and deploying the ADF application, and implementing some of the process logic as planned by the process analyst.

The output of this recipe is ready to run the home loan EMI calculator application that works on a particular business logic. We also learnt how the business logic in the BPM rules engine communicates through a service invocation with the business logic stored in stored procedures or any other legacy systems.

In the browser UI, enter input values and check for the web service return values, as shown in the following screenshot:

Log in to Enterprise Manager and view the process flow. The major change that we see in the process flow is the business service invocation at the PL/SQL database layer by the BPM process.

Our business logic is now ready to be used in the main Home Loan Process.

There's more…

It would also be interesting to know that BPM supports integration with EJB-written business logic. So if we are not planning to implement PL/SQL-based business logic, we can write the same logic by using EJBs, and invoke it as a BPM service activity. Alternatively, we can also use a combination of BPMN expression language to compute the EMI, and use a simple Database Adapter to write the data into a database table and generate the request ID.