Monday, July 15, 2013

Implementing Business Rules in BPM Processes

Implementing Business Rules in BPM Processes
(JDeveloper 11.1.1.7, WLS 10.3.6, SOA/BPM 11.1.1.7)


In this post I would like to show how to implement Business Rules in Oracle BPM Processes.


Let us assume a scenario where an employee wants to travel on business and it needs manager’s approval on certain scenarios as the following table. All other cases it is automatically approved.


Destination Type
Duration (Days)
Business Class
Amount ($)
International



Domestic
> 30


Domestic

Y

Domestic


> 1000


  1. Create a BPM Application with a manual process



  1. Define a business object with the following attributes



  1. Modify the process as follows and create Human tasks and Business rule

  1. Create Business Rules as follows



  1. Open the Business Rules editor and select Rulesets and change the Ruleset name to “Manual Approval Ruleset” and create a Decision table for the View property and name it as “Approval Decision Table”.



  1. Build Decision table as follows according to the above table



  1. You can create LOVs dynamically as follows which will create the Bucketsets


  1. Similarly you can create ranges for duration and expense amounts also


  1. You can select the values from the LOVs as shown below from all the bucketsets for destination types, duration and amounts



  1. Fill the Actions section for all the Rules for the manualApprovalRequired, reviewOutcome attributes selecting ‘modify’ as the action


  1. Validate the Business Rules as shown below and make sure there are no warnings or errors



  1. Set the condition for the conditional flow for ‘Is Auto Approved’ exclusive gate as follows




  1. Assign the output data mapping for Review Travel Expense task as follows



  1. Build the project and build the ADF UI project for the Human Tasks UI. For more detailed steps follow my previous blog here.


  1. Assign users to the roles in Organization file.


  1. Deploy the application and test


  1. Login as the employee and request the travel expense approval, with auto approval condition



  1. The travel request is auto approved.



  1. Request another travel expense with any of the approval required conditions



  1. The request will go for managers approval



3 comments:

  1. hi this is nice example project,
    can you possible to send mail to this project,
    my mail id: nrajakumaranster@gmail.com

    ReplyDelete
  2. Hi Sameer,

    screenshot is not visible.

    ReplyDelete