Re: [rules-users] Composition of Fact Templates

2008-08-11 Thread Mark Proctor
Stephen Kestle wrote: I'm trying to make some fact templates in the form of template "Address" String line1 String line2 end template "Person" String name int age Address address end It complains that it is "Unable to resolve class "Address"" 1. Is there any way around this -

Re: [rules-users] Composition of Fact Templates

2008-08-11 Thread Mark Proctor
FactTemplates are an experimental feature and only supports primitives and strings as fields. It was based around using arrays for the models, this made the implementation easy but tooling and integration with other libraries being very hard. For 5.0 we using "type declarations" which basically

[rules-users] Composition of Fact Templates

2008-08-11 Thread Stephen Kestle
I'm trying to make some fact templates in the form of template "Address" String line1 String line2 end template "Person" String name int age Address address end It complains that it is "Unable to resolve class "Address"" 1. Is there any way around this - am I just getting synt

Re: [rules-users] Caching RuleBase in Drools

2008-08-11 Thread Robert Crawford
On Aug 11, 2008, at 9:30 AM, Ingomar Otter wrote: >" Typically, a rulebase would be generated and cached on first use; to save >on the continually re-generation of the Rule Base; which is expensive." Read: Cache the rulebase (the rulebase object) with a Cache mechanism of your choice.

Re: [rules-users] Fetching values of an object's attribute set by different rules

2008-08-11 Thread Kris Nuttycombe
Maybe this doesn't apply to your actual domain, but it seems to me that you probably need some additional rules to decide what to do when multiple conditions that affect the same values are encountered. By analogy, when you're writing multithreaded code with a shared memory model, you have to expli

RE: [rules-users] Fetching values of an object's attribute setbydifferent rules

2008-08-11 Thread Anstis, Michael (M.)
Hi Paul, What about subclassing List and adding a "type" attribute? class MyArrayList extends ArrayList { private String type; public String getType() { return type; } } Rule "smurf" when $l : MyArrayList( type == 'shirt' )

Re: [rules-users] Salience not being considered in DSL

2008-08-11 Thread Ingomar Otter
Hello Harsh, >The problem I am facing is that the salience specified in the drl is not >being used. Please elaborate, this is a too general question. So the salience is present in the generated drl? Salience (by default) defines the execution order of those rules which are activated (=

RE: [rules-users] Fetching values of an object's attribute set bydifferent rules

2008-08-11 Thread psentosa
Hi Mike, thanks for the reply. Actually for each object I check, depending on how many rules are activated, I'd need so many value holder too. So, each value holder actually contains information about each activated rule (e.g. regarding the temperature and detergent. But thank you for the keyword

Re: [rules-users] Caching RuleBase in Drools

2008-08-11 Thread Ingomar Otter
>" Typically, a rulebase would be generated and cached on first use; to save >on the continually re-generation of the Rule Base; which is expensive." Read: Cache the rulebase (the rulebase object) with a Cache mechanism of your choice. AFAIK there is no dedicated caching mechanism in Droo

[rules-users] Caching RuleBase in Drools

2008-08-11 Thread raj_drools
Hi , i'm trying to implement caching of rules . in the manual there is a statement as follows : " Typically, a rulebase would be generated and cached on first use; to save on the continually re-generation of the Rule Base; which is expensive." how does rule base caches rules ? is there any

[rules-users] Salience not being considered in DSL

2008-08-11 Thread Harsh Jetly
Hi , I am using Drools version 4.0.4. I have created a dsl file for my drl ,I have set a salience for each rule . The problem I am facing is that the salience specified in the drl is not being used. Now when I use the drl without the dsl . Things work just fine and the salience is used . What s

RE: [rules-users] Fetching values of an object's attribute set bydifferent rules

2008-08-11 Thread Anstis, Michael (M.)
Hi psentosa, I don't fully understand what you require, but won't using a List of WashRuleMatches provide what you need? rule A when $s : Shirt (dirtinessLevel == high) $holder : WashRuleValueHolder() Then System.out.println ("this cloth should be washed in 60 degree water wit

[rules-users] Fetching values of an object's attribute set by different rules

2008-08-11 Thread psentosa
Hi, I have the following problems: I need to prove an object based on certain rules, where the parts of the rules should be kept to be used in further process within my application. In order to fetch those parts, my idea was to insert an additional object as value holder for the rule's parts, pu

RE: [rules-users] Use of a DAO in LHS

2008-08-11 Thread Anstis, Michael (M.)
Hi Jean-Baptiste, Here is a good (complete) example you can try following: http://www.redhatmagazine.com/2008/07/11/jboss-drools-meets-hibernate/ With kind regards, Mike From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of BINET JEAN-BA

Re: [rules-users] How to create DSL template that produces rules based on arbitrary user's input?

2008-08-11 Thread psentosa
Hi Matt, thanks for the mind-opening idea ;-) I'll try to remember this when I need to do such mapping again Paul Matt Geis wrote: > > You can do this. Keep in mind that the DSL engine will try to match each > dsl mapping entry into the LHS of the rule, one by one, in the order they > are de

RE: [rules-users] Use of a DAO in LHS

2008-08-11 Thread BINET JEAN-BAPTISTE
On the contrary of what you said I read the documentation. And there is this sentence : "The next example shows how we can reason over the results of a hibernate query. The Restaurant pattern will reason over and bind with each result in turn:" but after there is no example I already tried