You don't need a file, you need a String (not to say you couldn't use a File if you really, really wanted - just that you don't have to).

Other than the Fluent API already mentioned there is no Drools API to construct a DRL String. Read the manual, understand *your* data and build DRL applicable.

I get the feeling you don't know what DRL actually is nor how to use Drools to any extent. Please do read the excellent documentation I am sure things will become clearer to you.

sent on the move

On 26 Feb 2012 11:37, "shawn" <youngxiao121@hotmail.com> wrote:

Hi Michael,
Thank you for your reply~
Now, I understand some mechanism of building dynamic class.
Back to my question,
if I understand correct, those methods you mentioned is to add a drl
file(exist) to the knowledgeBase dynamically, right?
But how about the file?
I mean if I need to write "Condition 1 AND Condition 2 OR Condition 3...."
into the file, does drool have API to do it.
Because the content that I write into the file is also dynamic. What I
really want to do is how to make the drl file exist first? Does it mean I
have to create the file myself, and after finished creation I can add it
dynamically?

--
View this message in context: http://drools.46999.n3.nabble.com/How-to-create-a-drl-file-or-decision-table-dynamically-tp3772708p3776811.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users