Oracle BRE with ADF

303 views
Skip to first unread message

Tapash Ray

unread,
Dec 5, 2012, 8:10:06 PM12/5/12
to adf-met...@googlegroups.com
What is the best way for implementing dynamic business rules ? for example - depending on the credit rating of a customer, different code logic needs to be executed, maybe even display different views/pages.

Instead of hard-coding these rules in application logic within ADF and defining navigation outcome, wouldn't it be better to utilize Oracle BRE and define the Rules there ? Then invoke the BRE rules from ADF and based on the output of Oracle BRE follow a code path/navigation.

If this is acceptable, then the next question would be - what is the best way to implement this. Two options 

Option 1. Define the BRE decision functions with ADF BC Facts and then use Rules SDK to invoke the dictionary->decision function 
or 
Option 2. Define a SOA composite with Rules component and XML facts and invoke the composite from ADF.

Option 1 would seem efficient from execution perspective as we would avoid the SOA layer, but has two disadvantages - 
1. Packaging the ADF application alongwith the .mar file and do application deployment as a ear would be a challenge. ADF recommends to deploy the ViewController project instead of deploying the Application.
2. SOA Composer cannot be used to change rules dynamically at runtime without getting back to changing the .rules file.

Any recommendations ? Anyone used Oracle BRE with ADF ?
Thanks,
Tapash

Saif Kamaal

unread,
Dec 6, 2012, 2:58:58 AM12/6/12
to adf-met...@googlegroups.com
Tapash,

You can have a look at OPA also.


Regards,
Saif Kamaal.




--
You received this message because you are subscribed to the ADF Enterprise Methodology Group (http://groups.google.com/group/adf-methodology). To unsubscribe send email to adf-methodolo...@googlegroups.com
 
All content to the ADF EMG lies under the Creative Commons Attribution 3.0 Unported License (http://creativecommons.org/licenses/by/3.0/). Any content sourced must be attributed back to the ADF EMG with a link to the Google Group (http://groups.google.com/group/adf-methodology).

Birol Bora

unread,
Dec 6, 2012, 10:11:06 AM12/6/12
to adf-met...@googlegroups.com
This is a major weakness for the ADF.
ADF support very limited functionality for business data validation.
The ADF does not support the derivation of complex data.
ADF does'nt have useful data derivation API. For example : View object doesnt have RowDataChange event.
There are two different solutions on this topic.
1) Oracle suggestion : Buy another ORACLE tool :)
2) Write your own business rules framework.

We are implementing 2. solution.


2012/12/6 Tapash Ray <tra...@outlook.com>
Oracle BRE

Steve Muench

unread,
Dec 6, 2012, 3:49:30 PM12/6/12
to adf-met...@googlegroups.com
Here's a whitepaper written about all the different kinds of business data validation that you can do.


Some things this paper does not cover are never features added in 11g...

We support business logic groups, which is a sophisticated yet simple way to implement data-driven validation rules (where the sets of rules you want to apply change based on one or more values in the row. See 4.8 Defining Business Logic Groups for more info on that.

We support modeling inheritance and creating polymorphic view objects so you can capture business rules that apply to supertypes and subtypes.

You would not typically do data derivation at a view object level since it is business logic and business logic belongs at the entity object level. We offer a row data change functionality that is quite easy to use. Just create an object-level validation rule with one or more triggering attributes. In the rule, if necessary, you can use isAttributeChanged() function if you write your rule in Groovy (the standard dynamic scripting language for the Java platform). 


Tapash Ray

unread,
Dec 6, 2012, 10:03:14 PM12/6/12
to adf-met...@googlegroups.com
Thanks Steve - I guess I did not state the requirement clearly enough. Oracle ADF as a place to hold business logic is extensive and that is not what I am looking for. 

What I am looking for is recommendations for implementing dynamic business rules. 

For example - Depending on the Location and credit rating of customers, certain navigation needs to happen. For Customer A in San Jose having credit rating of 7, navigate to page A, for Customer B in Seattle with Credit Rating of 6, navigate to page B, and so on. Also, these rules could change on a daily or weekly basis. These rules can be hard-coded in application logic, but since they can change so frequently, it would make sense to keep them out of the application and that is where I am looking for recommendations, and if Oracle BRE is the right choice or not. Oracle BRE Decision tables can implement these dynamic rules fairly quickly and also the rules can be changed out of application logic.

@Saif - What is OPA ? Can you elaborate please ?
Thanks
Tapash
 


From: steve....@gmail.com
Date: Thu, 6 Dec 2012 21:49:30 +0100
Subject: Re: [ADF EMG] Oracle BRE with ADF
To: adf-met...@googlegroups.com

Steve Muench

unread,
Dec 7, 2012, 3:40:30 AM12/7/12
to adf-met...@googlegroups.com
Dynamic navigation rules are controller-layer logic that would not typically be appropriate to push down into your backend business service components. I've seen numerous customers implementing data-driven navigation rules and dynamic taskflows with a bit of code in backing beans. It wouldn't surprise me if the extensive collection of ADF Samples over at http://java.net/projects/smuenchadf/pages/ADFSamples might have something similar in one of the samples.

Jang-Vijay Singh

unread,
Dec 7, 2012, 2:20:02 PM12/7/12
to adf-met...@googlegroups.com
For Customer A in San Jose having credit rating of 7, navigate to page A, for Customer B in Seattle with Credit Rating of 6, navigate to page B, and so on. Also, these rules could change on a daily or weekly basis

The problem statement basically boils down to this:
An ADF controller (task flow) controls the navigation from a hypothetical 'Home' page to PageA or PageB. 
Normally, you'd have a router in your task flow that would evaluate some static condition (embedded within your task flow router)

You wish to make the 'condition' dynamic, or runtime configurable - via Oracle business rules. 

I would approach this somewhat like this this: Before the router in your task flow, add a "method call activity" whose implementation (Java? Rules SDK? Rules web service proxy? - I suppose you're looking for the best option here) calls the preferred decision service that checks for the credit rating and returns an outcome. 
The decision service outcome would be what the router evaluates (instead of actually checking for the customer's credit rating). 
In this way, you externalised one of your navigtaion rules outside the controller and made it runtime configurable. 

I wouldn't overdo it though (but your example of making a customer credit rating check seems fair though).

 HTH. 

PS: I understand my post bordered into a technical solution and this forum may not be appropriate for this. But might be interesting to know what the best practices might be - it seems to be a common requirement to 'externalise' certain rules whose outcome is required for the UI controller (the task flow) to make a navigation decision. The 'external' configuration could be anything from a simple database tables (easily accessible to task flow routers via ADFbc) to a sophisticated decision service (BRE).
RulesCall.png

Tapash Ray

unread,
Dec 7, 2012, 3:55:37 PM12/7/12
to adf-met...@googlegroups.com
Thanks Jang Vijay, I think you have understood most part of the problem and I like the idea of using a router activity. But the navigation statement was just an example, based on the credit and location of the customer (which could change daily) , there could be variety of actions that could be taken, navigate to another page, execute an extra piece of code logic, call another web service to get legal approval etc. 
All these are the actions after I get the outcome, but more serious issue and the point of discussion here is - how to implement and derive the outcome itself and make it highly configurable, hence the need of calling a sophisticated decision service that can be maintained and altered without changing code. 
Oracle BRE seemed to be a good fit, except for the challenges I mention in my initial email and this is where I am looking for recommendations and best practices from the group.

Thanks
Tapash


From: jvs...@gmail.com
Date: Fri, 7 Dec 2012 19:20:02 +0000
Subject: Re: [ADF EMG] Dynamic Business Rules in Oracle BRE with ADF
Reply all
Reply to author
Forward
0 new messages