Re: [rules-users] How to create a drl file or decision table dynamically?

2012-02-26 Thread shawn
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

Re: [rules-users] How to create a drl file or decision table dynamically?

2012-02-26 Thread Michael Anstis
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.

Re: [rules-users] How to create a drl file or decision table dynamically?

2012-02-26 Thread shawn
Thank you ~ I will learn the documentation more. -- View this message in context: http://drools.46999.n3.nabble.com/How-to-create-a-drl-file-or-decision-table-dynamically-tp3772708p3777002.html Sent from the Drools: User forum mailing list archive at Nabble.com.

Re: [rules-users] How to create a drl file or decision table dynamically?

2012-02-26 Thread shawn
Sorry, I forget to mention one thing. What's really difficult for me is to translate the AND,OR(Condition 1 AND Condition 2 OR Condition 3) to the drool. Because someone will send the request with the expression(Condition 1 AND Condition 2 OR Condition 3) to me. For each request the

Re: [rules-users] How to create a drl file or decision table dynamically?

2012-02-26 Thread Wolfgang Laun
A (dynamic) request with a logical expression that is to be evaluated as a rule is very much like a (dynamic) SQL query to be evaluated on a database. Are you sure that Drools is the right platform? If someone wants to send a logical expression in a formal language of their own, you'll have to

Re: [rules-users] How to create a drl file or decision table dynamically?

2012-02-26 Thread shawn
Thank your for your reply~ I am developing the Identity and Access management. I have finished the basic requirement, but the pre-condition part is what I am doing. The website sends the pre-condition(like what IP address or the time period can user access) that user sets. The pre-conditions are

Re: [rules-users] How to create a drl file or decision table dynamically?

2012-02-26 Thread shawn
Thank your for your reply~ I am developing the Identity and Access management. I have finished the basic requirement, but the pre-condition part is what I am doing. The website sends the pre-condition(like what IP address or the time period can user access) that user sets. The pre-conditions

Re: [rules-users] How to create a drl file or decision table dynamically?

2012-02-25 Thread shawn
Hi~ Do you have any example about using stringBuilder? Cheers -- View this message in context: http://drools.46999.n3.nabble.com/How-to-create-a-drl-file-or-decision-table-dynamically-tp3772708p3774707.html Sent from the Drools: User forum mailing list archive at Nabble.com.

Re: [rules-users] How to create a drl file or decision table dynamically?

2012-02-24 Thread Michael Anstis
Yes. If the data defines the rules then there are numerous options:- - Construct a DRL String yourself and pass this to a KnowledgeBuilder - Use the fluent API to build rules programmatically - Construct an XLS decision table using your favourite XLS (Java) API and look at

Re: [rules-users] How to create a drl file or decision table dynamically?

2012-02-24 Thread shawn
Thanks for your reply. Sorry, I am not quite clear about your first option. What's the meaning of 'Construct a DRL String'? -- View this message in context: http://drools.46999.n3.nabble.com/How-to-create-a-drl-file-or-decision-table-dynamically-tp3772708p3773060.html Sent from the Drools: User

Re: [rules-users] How to create a drl file or decision table dynamically?

2012-02-24 Thread Leonardo Gomes
Hi Michael, Do you have a link to the Fluent API documentation? I wanted to answer to this question and couldn't find the link anywhere. Thanks, Leo. 2012/2/24 Michael Anstis michael.ans...@gmail.com Yes. If the data defines the rules then there are numerous options:- - Construct a DRL

Re: [rules-users] How to create a drl file or decision table dynamically?

2012-02-24 Thread shawn
Is it from JBPM or ? -- View this message in context: http://drools.46999.n3.nabble.com/How-to-create-a-drl-file-or-decision-table-dynamically-tp3772708p3773142.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users

Re: [rules-users] How to create a drl file or decision table dynamically?

2012-02-24 Thread Michael Anstis
Quite simply, use a StringBuilder and create the DRL you need from the data you receive. @Leonardo, erm, erm... no. TBH I thought I'd be able to Google for it.. but no luck. Edson? Is there anything - or am I promoting something I shouldn't ;) On 24 February 2012 16:43, shawn

Re: [rules-users] How to create a drl file or decision table dynamically?

2012-02-24 Thread shawn
Thank you~ Does it mean I have to write a file in java and saved it as .drl? fluent API is in jbpm, right? -- View this message in context: http://drools.46999.n3.nabble.com/How-to-create-a-drl-file-or-decision-table-dynamically-tp3772708p3773187.html Sent from the Drools: User forum mailing

Re: [rules-users] How to create a drl file or decision table dynamically?

2012-02-24 Thread Michael Anstis
1) No you don't have to save it; just use one of the overloaded methods on KnowledgeBuilder that takes a StringReader, or String or something else similar. 2) I understand there to be one for Drools Expert too, which I'd expect to be in one of the drools-xxx JARs however am having trouble finding

Re: [rules-users] How to create a drl file or decision table dynamically?

2012-02-24 Thread shawn
Thanks a lot~ Looking forward to hearing from you. -- View this message in context: http://drools.46999.n3.nabble.com/How-to-create-a-drl-file-or-decision-table-dynamically-tp3772708p3773255.html Sent from the Drools: User forum mailing list archive at Nabble.com.

Re: [rules-users] How to create a drl file or decision table dynamically?

2012-02-24 Thread Edson Tirelli
The reason it is not in the manual yet is because it was not promoted to the public API yet. Nevertheless, you can use it, but be aware that there might still be changes on it from version to version until it is promoted to the public API. I am hoping Mark will give me the go ahead to make it

Re: [rules-users] How to create a drl file or decision table dynamically?

2012-02-24 Thread Wolfgang Laun
There is one (1) sentence and a dozen (12) lines of example in the section about What is New and Noteworhty in Drools 5.2.0 in the Introduction manual. Given that this nano-documentation doesn't tell you what to do with the resulting PackageDescr and that this fluent API is part of the unstable