Re: [rules-users] rules-users Digest, Vol 40, Issue 41

2010-03-10 Thread Nilima R
- next part -- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20100310/90dfc6b4/attachment-0001.html -- Message: 2 Date: Wed, 10 Mar 2010 19:25:39 +0100 From: Geoffrey De Smet Subject: Re

[rules-users] Overriding default evaluators

2010-03-10 Thread Barry Kaplan
As part of my drools-scala project I am implementing evalators for scala collections. This means that the some default evaluator operators like "contains" and "memberOf" need to be overridden. My problem is that drools seems to load the evaluators as defined in meta-infa/(I forget the file name) i

[rules-users] Issue with comparing values from multiple lists

2010-03-10 Thread Gaurav
Hi All, I am facing issues with iterating multiple lists and matching the statements. 1. dealTechList - This is a list which contains DealTypeTotal class and which has following params. protected String summaryType ; protected double listPrice; protected double

[rules-users] nabble

2010-03-10 Thread Nathan Bell
Perfect, yes. Thanks. -- View this message in context: http://n3.nabble.com/Re-rules-users-Digest-Vol-40-Issue-41-tp440433p440933.html Sent from the Drools - User mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.

Re: [rules-users] Accumulator function

2010-03-10 Thread Ansgar Konermann
On 10.03.2010 17:52, Glenn Macgregor wrote: What configuration file is this referring to and/or what system property can I set to make this work. This might be helpful: http://blog.athico.com/2009/06/how-to-implement-accumulate-functions.html Regards Ansgar ___

[rules-users] Question on contains operator with integer

2010-03-10 Thread cwolfinger
Hello - I have a question on how to a contains operation with primitive values. What I have is a message that has a field called intTest that is a List. If i do an intTest contains 4 check, then check compiles but it never matches. However if I do an eval it does work. Does anyone know how to

Re: [rules-users] rules-users Digest, Vol 40, Issue 41

2010-03-10 Thread Greg Barton
      "Error en el Detalle: El > n?mero del lineas de detalle (" +  $total + > > >                 >                 >           ") no empareja con lo > del > encabezado (" + $map.get("NU_REGISTROS") + ")")); > > > end > > > &

Re: [rules-users] rules-users Digest, Vol 40, Issue 41

2010-03-10 Thread Nathan Bell
gland and Wales. Registered no. 3080780. VAT no. GB 603 8808 40-00 **** ** This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the p

Re: [rules-users] Problems count and sumarizing data in facts

2010-03-10 Thread Yamil Bracho
Thanks Thomas. I rewrote the rule as: rule "Sumatoria de lineas detalle vs Header" salience 10 when Number( $total : doubleValue) from accumulate( Map(this["_TYPE_"] == "D", $monto : eval(Double.parseDouble(this.get("MONTO", sum($monto))

Re: [rules-users] A general question about this mailing list

2010-03-10 Thread Geoffrey De Smet
I personally don't believe much in a wiki (there is a drools wiki btw), because it gets stale fast. I believe much more in the reference manual, which is checked in in Subversion. In the Drools Planner manual I 've already added "meta" information, such as where jira is and how to build from so

[rules-users] A general question about this mailing list

2010-03-10 Thread Nathan Bell
I'm fairly new to this list, but I have already seen a great deal of helpful information being shared. The problem is that a collection of emails makes a poor knowledge base. Has there ever been an attempt to set up a forum/wiki/knowledgebase for the Drools community? I would be willing to help wit

[rules-users] Accumulator function

2010-03-10 Thread Glenn Macgregor
Hi All, I am building an accumulator function to get the maximum value with a limit, so for instance I have need to find the highest negative (closest to 0 without being positive). I am calling the accumulator maxnegative, I have created the function but can't seem to figure out how to get the

Re: [rules-users] Template salience

2010-03-10 Thread Bertrand Grottier
Great ! It even works with a long. Many thanks. Benoît Date: Wed, 10 Mar 2010 14:34:57 + From: ejdigg...@gmail.com To: rules-users@lists.jboss.org Subject: Re: [rules-users] Template salience Hi, Yes it is possible but I think the function has to return an int. Also, it should be called as

Re: [rules-users] Problems count and sumarizing data in facts

2010-03-10 Thread Swindells, Thomas
To convert from string to double you have to full back to java: Something along the lines of $monto : eval(Double.parseDouble(this.get("MONTO"))) However even with doing this your rules are unlikely to work consistently as you expect. Using equality tests on doubles is fundamentally unsafe as d

Re: [rules-users] Template salience

2010-03-10 Thread Enda J Diggins
Hi, Yes it is possible but I think the function has to return an int. Also, it should be called as follows: rule "peri...@{row.rownumber}" salience ( getNbJours("@{ddeb}", "@{dfin}") ); Include the stack trace from the NPE if this doesn't work. Cheers, Enda 2010/3/10 Bertrand Grottier >

Re: [rules-users] Problems count and sumarizing data in facts

2010-03-10 Thread Yamil Bracho
I solved the counting of detail lines this way: rule "Contador de lineas detalle vs Header" salience 10 when Number($count : intValue) from accumulate( $mp : Map(this["_TYPE_"] == "D"), count($mp)) $map : Map(this["_TYPE_"] == "H", this["NU_REGISTROS"

[rules-users] Template salience

2010-03-10 Thread Bertrand Grottier
Hello, Is it possible to specify a template salience such as: function long getNbJours(String pStrDDeb, String pStrDFin) { SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/"); Date dDeb = sdf.parse(pStrDDeb) ; Date dFin = sdf.parse(pStrDFin) ; long diff = dFin.getTime

Re: [rules-users] Persistence issue using Oracle

2010-03-10 Thread ramram
Hi All, I changed the datasource that was pointing to the in memory database to oracle. But I am having the following exceptions. Can anyone help in this issue. 15:28:10,926 INFO [SchemaExport] exporting generated schema to database 15:28:11,348 ERROR [SchemaExport] Unsuccessful: create tabl

Re: [rules-users] Rule looping question

2010-03-10 Thread Glenn Macgregor
Hi Enda, Thanks for the quick response, those are great suggestions and they work as expected. I will dig in and see if I can simplify these rules. Thanks Glenn From: rules-users-boun...@lists.jboss.org [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Enda J Diggins Sent: 10 March 2

Re: [rules-users] Persistence issue using Oracle

2010-03-10 Thread ramram
Hi wytten, Please can you help more about this issue of the creation of tables and using the mapping. can u give the whole path of the persistence.xml and the tags that are used. Because I am facing this issue. Regards, Ram -- View this message in context: http://n3.nabble.com/Persistence

Re: [rules-users] Rule looping question

2010-03-10 Thread Enda J Diggins
Hi Glenn, I'm going to start with the looping issue. The quick answer is use lock-on-active instead of no-loop. This is the important bit of code as far as I'm concerned: $tholdBreach : Parameter.Threshold(windowSize == 15, threshold >= $averageUpdateValue) *from* $

[rules-users] Rule looping question

2010-03-10 Thread Glenn Macgregor
Hi All, I am in the process of creating some rules for a POC I am doing using drools, having some issues understanding why I have an infinite loop in a rule. Rule in question: rule "Check Parameter Threshold Update Breach" no-loop true when ParameterUpdateEvent($name : n

Re: [rules-users] Template rules & eval

2010-03-10 Thread Bertrand Grottier
You are right, that was the problem ! Thank you very much for your help. Regards, Benoît Date: Wed, 10 Mar 2010 11:49:05 + From: ejdigg...@gmail.com To: rules-users@lists.jboss.org Subject: Re: [rules-users] Template rules & eval You're getting a NullPointer in the predicate... is dDeb null

Re: [rules-users] Template rules & eval

2010-03-10 Thread Enda J Diggins
You're getting a NullPointer in the predicate... is dDeb null? Enda 2010/3/10 Wolfgang Laun > All I can see is that the date string is the same in Periode1 and Periode2, > so you must have the same date in lines 1 and 2, which won't work well, but > is perhaps due to simplification? > -W > > >

Re: [rules-users] Template rules & eval

2010-03-10 Thread Wolfgang Laun
All I can see is that the date string is the same in Periode1 and Periode2, so you must have the same date in lines 1 and 2, which won't work well, but is perhaps due to simplification? -W 2010/3/10 Bertrand Grottier > Here is the "drl generated string": > > > package com.tarification > impor

[rules-users] Loading facts by xml

2010-03-10 Thread Bertrand Grottier
Hello, I keep trying loading facts by xml based on "Example 3.37. Constructing a pipeline". Now, I encounter a java.lang.RuntimeException when inserting the fact in the working memory: com.thoughtworks.xstream.mapper.CannotResolveClassException: Produit : Produit It guess it comes from the d

Re: [rules-users] Template rules & eval

2010-03-10 Thread Bertrand Grottier
Here is the "drl generated string": package com.tarification import java.util.Date ; import tarification.Produit ; import java.text.SimpleDateFormat; function Date getDate(String pStrDate) { SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/"); return sdf.parse(pStrDate) ; } rule "

Re: [rules-users] Template rules & eval

2010-03-10 Thread Wolfgang Laun
Can you post the "drl generated string" you are referring to? -W 2010/3/10 Bertrand Grottier : > Hello, > > I want to use template rules. Here is my .drt file: > > template header > ddeb > dfin > prix > > package com.tarification > > import java.util.Date ; > > import tarification.Produit ; > impo

Re: [rules-users] gwt-console-drools - link 2 download

2010-03-10 Thread ramram
Hi Kris, It seems that there is conflict in the persistence jar. So after deleting the persistance-api.jar from the war file the problem is solved and the process could open. But I reached to the step where you have mentioned before where the Guvnor is requesting username and password. Please

[rules-users] Template rules & eval

2010-03-10 Thread Bertrand Grottier
Hello, I want to use template rules. Here is my .drt file: template header ddeb dfin prix package com.tarification import java.util.Date ; import tarification.Produit ; import java.text.SimpleDateFormat; function Date getDate(String pStrDate) { SimpleDateFormat sdf = new SimpleDateFormat

Re: [rules-users] Inferencing

2010-03-10 Thread Wolfgang Laun
2010/3/9 Tim de Jager : > > > Also interesting read about the Airliner application Greg, thanks! Not "Up in the Air" but on rails: http://sunsite.informatik.rwth-aachen.de/Publications/CEUR-WS/Vol-549/paper6.pdf -W ___ rules-users mailing list rules-use

Re: [rules-users] XStream

2010-03-10 Thread Wolfgang Laun
If Kris' hint helps you, that's fine. I have always used JAXB to unmarshal my XML data into a Java beans tree, and then I walk the tree, inserting what needs to be inserted. I feel that direct control gives me enough leeway to modify or not, prior to insertion, etc. YMMV. -W 2010/3/9 Bertrand Gr