Re: [rules-users] How execute a Single rule from rule file or rule package

2009-07-05 Thread Wolfgang Laun
The concept of "executing a rule" isn't useful. Rules are written to fire whenever their conditions are met by some set of facts. So, if all of your rules fire, then all conditions are met. Consider the condition defining the single rule you want to fire. Can this condition be derived from one or

Re: [rules-users] Does evaluating two facts of same type in one when condition works?

2009-07-05 Thread Wolfgang Laun
The rule is capable of locating two different facts of type PlaceHolder because you wrote it that way: one is supposed to have a field value equal to 1, and the other one equal to 2. (Clearly, there cannot be one fact where value equals 1 and 2 at the same time.) Drools (and other rule-based syste

Re: [rules-users] Drools 5 - how create Logger for Template File based rules?

2009-07-05 Thread Wolfgang Laun
It does contain the essential steps I was suggesting. Please try it, and if there are problems, we'll take a closer look... -W On 7/3/09, ch...@twc wrote: > > > Wolfgang, is this correct? Thx > > >// populate working memory >ExternalSpreadsheetCompiler converter = new > ExternalSpreadsh

Re: RE : [rules-users] Re: the n best solutions on a very simple test case(drools-solver)

2009-07-05 Thread Geoffrey De Smet
Try something like this: AND 4 ... your current finish configuration ... With kind regards, Geoffrey De Smet Laurent Michenaud schreef: Hi, This is a genuine test case. It is like this in our application because drools is not the final decision maker. Drools is here to find and propo

[rules-users] classnotfound\classdefnotfound

2009-07-05 Thread Wishing Carebear
Hello: I have the drools5 embedded in an ear. When running aginst JBoss 5 gets the following classnotfound exception but it works okay with websphere and pramati application server. Wondering if someone could throw some pointers. Please note that drools-compiler, drools-core etc are all in the ear

Re: [rules-users] Drools 5 - how create Logger for Template File based rules?

2009-07-05 Thread ch...@twc
Wolfgang, is this correct? Thx // populate working memory ExternalSpreadsheetCompiler converter = new ExternalSpreadsheetCompiler(); InputStream spreadsheetStream = ... InputStream templateFileStream = ... String drl = converter.compile(spreadsheetStream, templateFileStream,

[rules-users] Does evaluating two facts of same type in one when condition works?

2009-07-05 Thread balachandra maddina
Hi There, Im wondering weather the Following rule would work properly, rule "abc" when a : PlaceHolder(value == 1) b : PlaceHolder(value == 2) then System.out.println("print"); . workingmemory.insert(placeholderobject1); workingm

RE: [rules-users] Drools 4.0.7 OSGi version not working

2009-07-05 Thread Faron Dutton
Hi Flavius, This is just a guess... com.springsource.org.drools.compiler is attempting to use an 'internal' package from the JDT, which is not exported. Other OSGi containers (like Spring) may choose to expose not-exported packages in the class loader but Equinox (as of version 3.3) does not. Wh

Re: [rules-users] Formula value assginment in LHS

2009-07-05 Thread Premkumar Stephen
How are you executing the rules? Are you using web services via the Drools execution server? because, I have seen multiple firings in this scenario. Regards, Prem 2009/7/2 Shabbir Dhari > Dear all > > We are developing a financial business application that contains hundreds > of business rule

Re: [rules-users] Re: a technical error occurred. Please contact a system administrator.

2009-07-05 Thread Jaroslaw Kijanowski
Can you retry with Guvnor from trunk? https://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/trunk/target/drools-5.1.0.SNAPSHOT-guvnor.zip If you still see this issue, could you please open a jira in https://jira.jboss.org/jira/browse/GUVNOR and attach your repository or the mod

[rules-users] feature request : load config/drl files using full path

2009-07-05 Thread Laurent Michenaud
Hi, We would need that the file solver-config.xml and the rules files (*.drl) can be loaded using a full path. For the moment, only the classpath is used to load these files. Thanks Michenux ___ rules-users mailing list rules-users@lists.jboss.org

Re: [rules-users] Formula value assginment in LHS

2009-07-05 Thread Wolfgang Laun
While thinking this over, several things have come to my mind. (1) Obviously you are using double for representing monetary values. This is dangerous, as even simple calculations may result in values that are not acceptable due to accounting customs or tax laws. (2) The effort for checking is don

REĀ : [rules-users] Re: the n best solutions on a ver y simple test case(drools-solver)

2009-07-05 Thread Laurent Michenaud
Hi, This is a genuine test case. It is like this in our application because drools is not the final decision maker. Drools is here to find and propose the n best solutions, the customer will pick up one among these. The score of each solution is printed to the customer, so he knows that this one i

RE: [rules-users] Formula value assginment in LHS

2009-07-05 Thread Anstis, Michael (M.)
Why not simply use something like this:- rule "TaxCalc" when $i : Invoice($st : salesTax, $gst : gstRate, $sa : salesAmount, $id : importDuty, $gr : govtRebate) then $i.setTotalTax(round($st + ($gst * $sa / 100) + $id - $gr, 2)); update($i); end What do you gai

[rules-users] How execute a Single rule from rule file or rule package

2009-07-05 Thread Amila Silva
hi everyone, I have a requirement like execute a single rule from set of loaded rule files or single rule from single drl file. when i execute fireAllRules() it executes the all the rules in the files. even that overloaded method that take int as agrs also seems doesnt help much. let me know