We had similar use case. What we do is we model the Schema elements,
generate Java Beans (pojo), and write rules using these Pojo. Now we
have written a Service on top which takes Hibernate QL and gets the
database records as the same Pojos that Rules are defined on and fire
the Rules. Thus the service is generic and can be changed to take any
Query. The Rules can me modified and changed anytime and redeployed but
business objects in form of Pojos remain the same. Hope this helps
-Uday
________________________________
From: rules-users-bounces(a)lists.jboss.org
[mailto:rules-users-bounces@lists.jboss.org] On Behalf Of Joe Chuby
Sent: Friday, March 09, 2007 3:53 AM
To: rules-users(a)lists.jboss.org
Subject: [rules-users] Using rules with database scenario
Hi all,
First time trying to learn JBoss Rules here. We have a pretty large
database (DBMS), we want to build some rules and retrieve data based on
the rules.
Could someone give a hint or an example of this usage scenario? I mean,
how can I use rules for database query, without writing my rules in SQL
directly? We are currently writing everything in HQL (Hibernate), but
the rules change every 3 months on average, so that's not a way to
maintain the system. Therefore, we want to extract that portion of the
business logic out of the code. The data structure does not change, but
the rules keep on changing.
I'm reading the user's guide, running thru the examples, writing some of
my own, but still no clue how to make it work with database.
If someone could give a sample, that would be greatly appreciated.
Thanks a lot.
________________________________
Bored stiff? <
http://us.rd.yahoo.com/evt=49935/*http:/games.yahoo.com>
Loosen up...
Download and play hundreds of games for free
<
http://us.rd.yahoo.com/evt=49935/*http:/games.yahoo.com> on Yahoo!
Games.