[rules-users] What's more efficient too ?

2008-11-21 Thread vdelbart
I have a similar question with global or fact (Foo is never modified) What's more efficient beetwen : 1. rule Foo_globals when Foo(name != null) from fooGlobals then ... end 2. rule Foo_facts when Foo(name != null) then ... end

Re: [rules-users] null checking

2008-10-17 Thread vdelbart
I think it's not in the manual. Try this : seller: ( seller.cheese != null, seller.active == true ) cheese: ( this != null, cheese.type == chedder ) from seller.cheese I don't kown if it's fine but it works. dave sinclair wrote: read the manual

[rules-users] date-effective date-expires : change execution date

2008-08-25 Thread vdelbart
Hi, I want to change the date in the drools execution (drools 4.0) Example : I have this rule rule test 1 date-effective 17-sept.-2008 when ... then ... end the current date is 12-oct.-2008 but I want to force the date of the execution to 15-juil.-2008 but just for drools

Re: [rules-users] ShadowProxy PersistentSet

2008-04-28 Thread vdelbart
will now have shadow proxies any more, as default. Mark vdelbart wrote: I think the method cloneObject 'ShadowProxyUtils' could be improve like follow : public static Object cloneObject(Object original) { Object clone = null; if ( original instanceof Cloneable

[rules-users] Shadow Facts update

2008-04-28 Thread vdelbart
Hello, for hibernate reason I disable shadow facts; however I have 'update' like this : rule e when ... then obj.attr = other; update(obj); end and I can confirm, I have an unpredictable behavior. Could I replace this sentence by this : rule e when ... then retract(obj);

Re: [rules-users] ShadowProxy PersistentSet

2008-04-28 Thread vdelbart
I post a test case in the JIRA Mark Proctor wrote: Mock classes? vdelbart wrote: I create a JIRA : http://jira.jboss.com/jira/browse/JBRULES-1590 it's to complicate to me to create an unit test with a hibernate session. thanks, V. Mark Proctor wrote: Can you open a JIRA

[rules-users] Collection Emptyness

2008-04-23 Thread vdelbart
Hi, I have an object 'VenueGlobal' with a property 'sousVenues' who is a List of SousVenue. I try to test the emptyness of this list in on sentence but i don't know why it doesn't work : I try this : VenueGlobal( sousVenues == null || sousVenues.empty ) but I have this error :

Re: [rules-users] ShadowProxy PersistentSet

2008-04-23 Thread vdelbart
I think the method cloneObject 'ShadowProxyUtils' could be improve like follow : public static Object cloneObject(Object original) { Object clone = null; if ( original instanceof Cloneable ) { try { Method cloneMethod =

[rules-users] ShadowProxy PersistentSet

2008-04-22 Thread vdelbart
Hi, I have a big problem with shadowproxy. All my objects are hibernate so they use PersistentSet in their properties. But when the shadowproxyfactory clone the PeristentSet properties, I have this error : org.hibernate.LazyInitializationException: failed to lazily initialize a collection, no

[rules-users] Error on access variable in workingmemorylogger

2008-04-09 Thread vdelbart
Hello, I have an error on WorkingMemoryLogger with this rule : package example import mcmipih.rules.demo.model.*; global Param param; rule Your Third Rule dialect mvel when Param( iep : IEP ) from param then System.out.println(Iep de

Re: [rules-users] Error on access variable in workingmemorylogger

2008-04-09 Thread vdelbart
Actually ! I try with the future 4.0.5 version, and it's working ! I wait for the official new realease. thanks, V. Steven Williams-5 wrote: This may be http://jira.jboss.org/jira/browse/JBRULES-1415 cheers Steve On Wed, Apr 9, 2008 at 5:37 PM, vdelbart [EMAIL PROTECTED

Re: [rules-users] Problem with ternary and mvel

2008-01-17 Thread vdelbart
Thanks for the answer. I can move on now. And I'm going to use your function solution. V. Mark Proctor wrote: vdelbart wrote: I try in 4.0.4 it doesn't work. Nobody have an idea ? We do not currently allow any imperative code for MVEL, it is disabled. This is on purpose

Re: [rules-users] Problem with ternary and mvel

2008-01-16 Thread vdelbart
I try in 4.0.4 it doesn't work. Nobody have an idea ? Thanks, V. vdelbart wrote: Hi, I have a problem with this simplified rule (mvel + ternary) : rule Your Third Rule dialect mvel when v:Venue() then v.activite = (v.um == null

[rules-users] Problem with ternary and mvel

2007-12-21 Thread vdelbart
Hi, I have a problem with this simplified rule (mvel + ternary) : rule Your Third Rule dialect mvel when v:Venue() then v.activite = (v.um == null ? it's null : it's not null); end before the execution I have this fact : Venue(Type Hosp:

[rules-users] memberOf in a eval statement (dialect mvel)

2007-12-07 Thread vdelbart
Hi, I want to use the keyword memberOf in an eval statement (with dialect = mvel). rule Your 5 Rule dialect mvel when $l:ArrayList() eval(test memberOf $l) then #actions System.out.println(OK); end

Re: [rules-users] java.lang.OutOfMemoryError: Java heap space

2007-11-12 Thread vdelbart
)logger); session.removeEventListener((RuleBaseEventListener)logger); regards, V. vdelbart wrote: Good morning, I found a workaround : don't use the WorkingMemoryFileLogger ! I create an issue : http://jira.jboss.com/jira/browse/JBRULES-1325 regards, V. vdelbart wrote

[rules-users] java.lang.OutOfMemoryError: Java heap space

2007-11-09 Thread vdelbart
Hello, In my tests of the 4.0.3, I have some : java.lang.OutOfMemoryError. So, I try a simple test with 10.000 sequential execution of 1 rule with no context and just a workingmemorylogger and I have the error : java.lang.OutOfMemoryError: Java heap space My code is : public class

[rules-users] Drools plugins : how to manage error with xls extension in my Drools Projet ?

2007-11-07 Thread vdelbart
Hi everyone, I have a little problem with this plugins Drools in Eclipse. In my Drools Project I have some xls but I haven't Decision Table. I have this error associate with all xls files : An error occured opening the workbook. How to ignore this error and don't see it any more ? I try to

Re: [rules-users] Initialize Global

2007-10-30 Thread vdelbart
If your List is not immutable, you can't use global. You have to use WM facts. V. java_user_ wrote: Thanks. That initialized my global but the rule still runs every execution. Can I disable the rule after the first execution? I would like to use (if (objectList==null)). My list

Re: [rules-users] Initialize Global

2007-10-30 Thread vdelbart
It's normal. Globally, the rule engine works in two steps : - first : the activation (the when statement) - second : the execution (the then statement) with salience, ruleflow ... In your test, you have in the first step objectList = null and in the second step objectList = [1, 2]. If you

Re: [rules-users] Initialize Global

2007-10-25 Thread vdelbart
Beware, 2.5.4.5. Globals If you use a global on the LHS of a rule, make sure it is immutable. regards, V. java_user_ wrote: How do I initialize a global fact in the drl file? I want use the JSR94 API and avoid using the Drools API inside the Java code. I would like to access the same

Re: [rules-users] Difference between constraint within a pattern and eval

2007-10-25 Thread vdelbart
I try with this and it's working. I don't know why your case doesn't work. public class Experience { private String primary; public String getPrimary() { return primary; } public void setPrimary(String primary) { this.primary=

Re: [rules-users] Problem with DSL and 4.0.2

2007-10-12 Thread vdelbart
Nobody knows what's going wrong ? All my DSLs are wrong and in the same time my rules too... It's very problematic... V. vdelbart wrote: Hi, I have a problem with my DSL and the 4.0.2 version : this sentence doesn't work in 4.0.2 (work in 4.0.1) in Eclipse Editor : [condition

Re: [rules-users] Problem with DSL and 4.0.2

2007-10-12 Thread vdelbart
only know i have this problem to when using 4.0.2 - conclusion: don't use it ... stay with 4.0.1 2007/10/12, vdelbart [EMAIL PROTECTED]: Nobody knows what's going wrong ? All my DSLs are wrong and in the same time my rules too... It's very problematic... V. vdelbart wrote: Hi, I

[rules-users] Problem with DSL and 4.0.2

2007-10-11 Thread vdelbart
Hi, I have a problem with my DSL and the 4.0.2 version : this sentence doesn't work in 4.0.2 (work in 4.0.1) in Eclipse Editor : [condition][]there is at least {number} {object}=ArrayList( size = {number}) from collect( {object}() ) log : !ENTRY org.eclipse.ui 4 0 2007-10-11 14:29:29.052

[rules-users] 4.0.2 : Class EventManager

2007-10-11 Thread vdelbart
Hi, I didn't find the class org.drools.EventManager in 4.0.2 where is it ? And I find nothing about this in the documentation... thanks, V. -- View this message in context: http://www.nabble.com/4.0.2-%3A-Class-EventManager-tf4607170.html#a13155535 Sent from the drools - user mailing list

Re: [rules-users] 4.0.2 : Class EventManager

2007-10-11 Thread vdelbart
thanks, for my information, what's the difference between RuleBaseEventManager WorkingMemoryEventManager ? thks, V. Mark Proctor wrote: vdelbart wrote: Hi, I didn't find the class org.drools.EventManager in 4.0.2 where is it ? http://downloads.jboss.com/drools/docs/4.0.2.15666

Re: [rules-users] DSL expression - ??

2007-09-25 Thread vdelbart
OK, I open the JIRA : http://jira.jboss.com/jira/browse/JBRULES-1222 V. Edson Tirelli-3 wrote: Seems IDE needs fixing then. May I ask you please to open a JIRA. I will talk to kris about it. Thanks. Edson -- View this message in context:

[rules-users] DSL expression - ??

2007-09-24 Thread vdelbart
Hi, I have this in my DSL consequence : {name}.{indic}+:{value}={name}.putIndicator({indic},{name}.get({indic})+{value}); {name}.{indic}:{value}={name}.putIndicator({indic},{value}); If I write in my dslr : ... then ex.+:200 ex.:200 end the mapping is : then

Re: [rules-users] DSL expression - ??

2007-09-24 Thread vdelbart
Hi, It doesn't work. With : [consequence][]{name}.{indic}\+:{value}={name}.putIndicator({indic},{name}.get({indic})+{value}); this code : ex.\+:200 is mapping like that : ex.+:200 For information, I use the 4.0.1 Drools. thks, V. -- View this message in context:

[rules-users] Globals and Boolean object

2007-09-18 Thread vdelbart
Hi, My rule is : #created on: 29 août 2007 package example #list any import classes here. global Boolean test rule Your Third Rule #include attributes such as salience here... when then #actions test = true;

Re: [rules-users] Globals and Boolean object

2007-09-18 Thread vdelbart
thanks, it's working. V. Mark Proctor wrote: java is pass by reference, so all you are doing is assigning the local test pointer to point to something else; which ofcourse won't be reflected in the global resolvers drools.getWorkingMemory.setGlobal(test, test); Mark vdelbart

[rules-users] RE: How to use not operator in drool.

2007-09-13 Thread vdelbart
instead of mvel. You can't use Map(), it's mvel coding. Try this : when m:Map() eval(!((Integer)m.get[G10.3] !=8) || ((Integer)m.get[G10.2] ==19)) then good luck, vdelbart -- View this message in context: http://www.nabble.com/How-to-use-not-operator-in-drool.-tf4430240.html

Re: [rules-users] Assistance with DSL syntax

2007-09-13 Thread vdelbart
I think it's impossible... I have the same problem and to do this I mixed globals and working memory... but I have only one Order()... It was easier. v. -- View this message in context: http://www.nabble.com/Assistance-with-DSL-syntax-tf4432759.html#a12650375 Sent from the drools - user

[rules-users] Use of = in DSL

2007-09-13 Thread vdelbart
Hello, In my DSL, I have : {indicator}:={boolean} mapping with {indicator}.setValue({boolean}); but in my rule when I write : myIndicator:=true In the DRL viewer, I have : {boolean}myIndicator.setValue({boolean}); I think I can't use the = in my DSL... I try to use simple quote or double

Re: [rules-users] Use of = in DSL

2007-09-13 Thread vdelbart
I create this issue : http://jira.jboss.com/jira/browse/JBRULES-1190 http://jira.jboss.com/jira/browse/JBRULES-1190 thanks, V. -- View this message in context: http://www.nabble.com/Use-of-%22%3D%22-in-DSL-tf4434499.html#a12653465 Sent from the drools - user mailing list archive at

Re: [rules-users] Ruleflow and persistence

2007-09-11 Thread vdelbart
It's true Kris Verlaenen. But the first set is strange, isn't it? thanks, Vincent -- View this message in context: http://www.nabble.com/Ruleflow-and-persistence-tf4415033.html#a12608948 Sent from the drools - user mailing list archive at Nabble.com.

[rules-users] Router Layout : what's that ??

2007-09-10 Thread vdelbart
In the Ruleflow editor, there is a Router Layout properties, what is it ? I searched in the documentation but I didn't find anything... There are three possibility : - Shortest Path - Manual - Manhatten Best regards, Vdelbart -- View this message in context: http://www.nabble.com/Router

[rules-users] Action and Milestone buttons

2007-09-10 Thread vdelbart
thanks, i have the same question with Action and Milestone buttons. Are they work ? regards, vdelbart -- View this message in context: http://www.nabble.com/Router-Layout-%3A-what%27s-thattf4414120.html#a12592479 Sent from the drools - user mailing list archive at Nabble.com

[rules-users] Ruleflow and persistence

2007-09-10 Thread vdelbart
? thanks, vdelbart -- View this message in context: http://www.nabble.com/Ruleflow-and-persistence-tf4415033.html#a12593732 Sent from the drools - user mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https

Re: [rules-users] DSL field constraint question

2007-09-04 Thread vdelbart
thanks el arbi ! I had a good teacher ! -- View this message in context: http://www.nabble.com/DSL-field-constraint-question-tf4360996.html#a12472569 Sent from the drools - user mailing list archive at Nabble.com. ___ rules-users mailing list

Re: [rules-users] DSL field constraint question

2007-09-03 Thread vdelbart
[when]-id must be positive integer=id 0 Good luck, vdelbart -- View this message in context: http://www.nabble.com/DSL-field-constraint-question-tf4360996.html#a12457145 Sent from the drools - user mailing list archive at Nabble.com. ___ rules-users

Re: [rules-users] Execution problems with (or and (and

2007-08-31 Thread vdelbart
(RuleTerminalNode.java:326) at org.drools.reteoo.RuleTerminalNode.assertTuple(RuleTerminalNode.java:132) with the same rule package. Thanks, Vdelbart -- View this message in context: http://www.nabble.com/Execution-problems-with-%28or-and-%28and-tf4352997.html#a12421776 Sent from the drools

Re: [rules-users] Ruleflow and Global - precision

2007-08-31 Thread vdelbart
I try with the 4.0.1 release but it's the same result. best regards, Vdelbart -- View this message in context: http://www.nabble.com/Ruleflow-and-Global---tf4347589.html#a12421773 Sent from the drools - user mailing list archive at Nabble.com

Re: [rules-users] Ruleflow and Global - precision

2007-08-31 Thread vdelbart
Thanks a lot ! I will use your Global class :-) vdelbart -- View this message in context: http://www.nabble.com/Ruleflow-and-Global---tf4347589.html#a12425923 Sent from the drools - user mailing list archive at Nabble.com. ___ rules-users mailing

Re: [rules-users] Execution problems with (or and (and

2007-08-31 Thread vdelbart
Ok cool, it's working !! thanks a lot, vdelbart -- View this message in context: http://www.nabble.com/Execution-problems-with-%28or-and-%28and-tf4352997.html#a12426264 Sent from the drools - user mailing list archive at Nabble.com. ___ rules

[rules-users] Execution problems with (or and (and

2007-08-30 Thread vdelbart
() v:Venue())) then System.out.println(OK - 2); end In my WM, I have a Param and a ListeSousVenue but no Venue But after execution, I have just this result : OK - 1 Why the second rule doesn't execute ? Thanks, Vdelbart -- View this message in context: http://www.nabble.com/Execution

Re: [rules-users] Ruleflow and Global - precision

2007-08-30 Thread vdelbart
/Imports%2Beditor.jpg but the declaration is not save : http://www.nabble.com/file/p12409258/Imports%2Beditor_without_global.jpg Is there a textual editor for global declaration in the ruleflow ? thank you, vdelbart -- View this message in context: http://www.nabble.com/Ruleflow-and-Global

[rules-users] Ruleflow and Global ?

2007-08-29 Thread vdelbart
Hello, How to use global in my split condition of a Ruleflow ? :confused::confused: I try this : - My global map is a HashMap when I write this : Boolean(eval((Boolean)map.get(decision) == true)) from Boolean.TRUE; I