The RuleBase and Package classes are serializable so all you have to do is
create them once then store them as a serialized field on a table (the type
may vary based on the DB provider you are using). You can serialize the
RuleBase by using standard Java classes like the ObjectOutputStream and
ByteArrayOutputStream. There is nothing here that is specific to Drools -
it is vanilla serialization and database storage.
ABRA wrote:
Hi
Can you please give me an example to explain this? How to serialize
the rulebase and store it in database? The how do you load the rules
in memory?
thanks a lot in advance
ABRA
>>>
I think the better approach if possible is to serialize your rule base
and storing it in the database as such. Storing the DRL and
recompiling your rules at run time will be quite expensive. We have a
similar setup and it has worked out pretty well for us.
>>>>>
Hi,
If the rules,conditions,consequences have to be loaded from the
database. I can think of following two approach. what would be right
approach( I will have upto 1200 rules in the db)
1. Programmatically inject the rules into rule engine using drools API.
2. Read the rules from the database and create drl or dsl file for
them and inject into rule engine.
Thanks
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
--
View this message in context:
http://www.nabble.com/loading-rules-dynamically-tp20274919p25588522.html
Sent from the drools - user mailing list archive at
Nabble.com.