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



Thursday, July 4, 2013

Importing BPM Projects to Composer using MDS Connection from JDeveloper

(JDeveloper 11.1.1.7, WLS 10.3.6, SOA/BPM 11.1.1.7)


The following is a simple procedure to import the BPM Projects from JDeveloper to SOA MDS Repository and open the Processes in Oracle BPM Composer.


  1. Open the BPM Application in JDeveloper





  1. Open the BPM MDS Navigator and Configure an MDS connection





  1. Create a BPM MDS Connection, SOA MDS Connection, and Database Connection to DEV_MDS database as follows. The DEV_MDS database connection is the one you have created while installing the RCU in the SOA installation process.

  1. Look at the WLS Console Data Source for DEV_MDS for details





  1. Make sure all the connections are tested successfully.





  1. Open the BPM Project Navigator in JDeveloper and Save to BPM MDS





  1. Click Ok for the following dialog





  1. After the project is saved, login to the BPM Composer as weblogic administrator login and you can see the project imported already





  1. Click on the project and it will take you to the project home.
  2. Also, if we create a project/process in the BPM Composer, it will be visible in the MDS Navigator in the JDeveloper.