Look into the drools KnowledgeAgent api (do a google you should find old discussion/blog posts about it).
Alternatively if you know where your drl files live and just want to do it at startup just use the standard File methods to list all the “*.drl” files in
that particular directory.
Thomas
From: rules-users-bounces@lists.jboss.org [mailto:rules-users-bounces@lists.jboss.org]
On Behalf Of Fnu Mahalakshmi
Sent: 09 June 2010 16:59
To: 'rules-users@lists.jboss.org'
Subject: [rules-users] uploading rule files dynamically
Hi,
Is there anyway that I can dynamically add rule files??
I am loading it like this as of now :
private
static
final String[]
RULES_FILES =
new String[]{
"Rule1.drl"};
new RuleRunner().runStatelessRules(RULE_FILES,null,list_of_data,null);
If I create new rule files, I will have to keep adding it to RULES_FILES.
Is there someway I can check dynamically if there are more rule files and get it added to my rulebase??
Thanks
M
Please consider the environment before printing this email.
Visit our website at
http://www.nyse.com
*****************************************************************************
Note: The information contained in this message and any attachment to it is privileged, confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this
message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender immediately by replying to the
message, and please delete it from your system. Thank you. NYSE Euronext.