Re: [rules-users] is is possible to insert facts into working memory from functions ?

2011-03-10 Thread Wolfgang Laun
import org.drools.spi.KnowledgeHelper; function void ins( KnowledgeHelper k, Object o ){ k.insert(o); } On 11 March 2011 04:26, groovenarula wrote: > Hello all, > > As the title states, I need to create new facts and insert them into > working > memory from a function. Is it possible to do t

[rules-users] is is possible to insert facts into working memory from functions ?

2011-03-10 Thread groovenarula
Hello all, As the title states, I need to create new facts and insert them into working memory from a function. Is it possible to do that ? I tried to create a function with 'KnowledgeHelper' as a parameter and my rule file failed to compile. Then I even tried to reference 'drools' instance variab

Re: [rules-users] drools-server - resource change scanner/notifier

2011-03-10 Thread Ross H
Well this does not quite work. Whilst the knowledgebase is rebuilt when changes are detected, requests to the drools-server are not firing the rules as expected and a test fact is being returned unmodified. If new-instance is set to false, then merging of the rules causes errors. Any thoughts?

Re: [rules-users] eval in DSL

2011-03-10 Thread Saleem Lakhani
OMG .. I look so dum now haha J .. thanks though. saleem From: rules-users-boun...@lists.jboss.org [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Wolfgang Laun Sent: Thursday, March 10, 2011 1:42 PM To: Rules Users List Subject: Re: [rules-users] eval in DSL The DSRL line end

Re: [rules-users] eval in DSL

2011-03-10 Thread Wolfgang Laun
The DSRL line ends with "... Coverage *C*" but the DSL definition ends with "...Coverage *A*" -W 2011/3/10 Saleem Lakhani > Here are the details: > > > > This is how my rule looks like: > > > > //Imports for TO and MathHelper > > > > *global* com.h.MathHelper math; > > > > *rule* "Coverage must

Re: [rules-users] OptionalDataException while running sample mortagage example

2011-03-10 Thread Aditya
HI just repasting the changeset.xml : -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/OptionalDataException-while-running-sample-mortagage-example-tp2661626p2661633.html Sent from the Drools - User mailing list archive

[rules-users] OptionalDataException while running sample mortagage example

2011-03-10 Thread Aditya
HI, I had downloaded the drools 5.1 examples which is present in http://www.jboss.org/drools/downloads.html url and trying to run drools-examples-brms\ mortgage-example by following all the steps listed in the how-to document But as RuleAgent is depricated I changed it to KnowledgeAgent and use

Re: [rules-users] eval in DSL

2011-03-10 Thread Saleem Lakhani
Here are the details: This is how my rule looks like: //Imports for TO and MathHelper global com.h.MathHelper math; rule "Coverage must equal 20% of Coverage C" auto-focus true agenda-group "C" when Coverage information exists Coverage

Re: [rules-users] eval in DSL

2011-03-10 Thread Wolfgang Laun
Can't help you - not enough context. * What's the error? * How is it used, especially preceding [when] clauses, where covTO ought to get defined -W 2011/3/10 Saleem Lakhani > How do we get this done in Drools 5.2.1: > > > > [when]Cov is not equal to "{value}" percent of Coverage A = > *eval*(m

Re: [rules-users] Infinite loop in rule condition matching

2011-03-10 Thread Sartaj Shaik
Thanks for your quick response Michael, I have identified the issue.. while writing rules in Decision table (Web-guided editor) -> column configuration there is a option Update engine with changes (Checking this will tell the engine that the value has changed. This will cause the rules that de

Re: [rules-users] Infinite loop in rule condition matching

2011-03-10 Thread Michael Anstis
Without seeing the rules it would be very hard to determine what causes your issue. "Infinite loops" normally imply there is some degree of circularity between rules. Can you please provide a self contained test case or your rules (DRL form, preferential). Thanks 2011/3/10 Sartaj Shaik > > Hi

[rules-users] Infinite loop in rule condition matching

2011-03-10 Thread Sartaj Shaik
Hi, I have written some rules in Decision table (Web-guided editor), and I have implemented the AgendaFilter to fire rules that ends with the rule name specified (EndAgendaFilter) here is the accept method I have written. When I fire the rules ends with some "X", this accept method goes int

[rules-users] eval in DSL

2011-03-10 Thread Saleem Lakhani
How do we get this done in Drools 5.2.1: [when]Cov is not equal to "{value}" percent of Coverage A = eval(math.calculatePercentages(covTO.getCoverage(), covTO.getD()) != {value}) This used to compile in Drools 3. Thanks saleem ___ rules-

Re: [rules-users] Guvnor and drools implementation - questions

2011-03-10 Thread Eddy Hautot
Thanks your code works well (extract the name of all the rules and name of the package). I suppose there is nothing we ca do with guvnor. May be export all in guvnor so we have a 'snapshot' of guvnor when the package was build and deployed or archive the package. You mean put a Map as attribute

Re: [rules-users] EvalConditionNode cannot be cast to org.drools.reteoo.RightTupleSink

2011-03-10 Thread nanic23
I'm using Drools 5.1.1 -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/EvalConditionNode-cannot-be-cast-to-org-drools-reteoo-RightTupleSink-tp2660572p2660824.html Sent from the Drools - User mailing list archive at Nabble.com. _

Re: [rules-users] Drools command line interface

2011-03-10 Thread Mauricio Salatino
cool! sounds interesting.. but there was an existing project about that right? drools-cli? or was removed? I think this kind of things can really helps out to teach people how drools behave in a simple environments I will take a look on it next week. 2011/3/10 Diego López León > Hi ppl, > in my

[rules-users] Drools command line interface

2011-03-10 Thread Diego López León
Hi ppl, in my spare time I've been working on a tool that may be of interest to some of you. I call it Drools Shell. "The aim of this project is to provide a simple command line interface to test rules allowing you to insert, modify and retract facts. You also have commands to query the state of t

[rules-users] EvalConditionNode cannot be cast to org.drools.reteoo.RightTupleSink

2011-03-10 Thread nanic23
We are seeing this exception when trying to complete flows in wait state. This happens after we deploy a newer release of our application. Context: 1. we start several process that go to wait state 2. we make bug fixes to our application and deploy a new version 3. we try to resume the existing f

Re: [rules-users] Is it possible to Iteriate over a list of string values ?

2011-03-10 Thread groovenarula
ok ! It looks like Wolf, your idea of using 'for' in the RHS worked using rule templates. It's still 'java' code though. I just wish there was a cleaner way to load facts into WM without going through java. Declaring types in rules is a very nice feature. If there's a cleaner way to 'load' these

Re: [rules-users] New to Drools. Is it possible to test inverse conditions?

2011-03-10 Thread Manuel Ortiz
Dear Mauricio: Thank you very much for your quick response. If I understood Drools rules documentation, not(Person(age > 30)) means "There is no Person fact in working memory with age > 30". Isn't it? I would like to write in DRL "Retrieve Person facts in working memory with age not greater than

Re: [rules-users] New to Drools. Is it possible to test inverse conditions?

2011-03-10 Thread Salaboy
You can use not(Person(age > 30)) greetings - CTO @ http://www.plugtree.com - MyJourney @ http://salaboy.wordpress.com - Co-Founder @ http://www.jbug.com.ar - Mauricio "Salaboy" Salatino - On 10/03/2011, at 06:09, Manuel Ortiz wrote: > Dear all: > > My name is Manuel Ortiz, a very beginner in

Re: [rules-users] maven-drools-plugin, anyone?

2011-03-10 Thread Geoffrey De Smet
Angar, I 've been looking at the code: great stuff, nice quality, nice work! We definitely want to pull the directory maven-drools-plugin of your git repository into the git repository droolsjbpm-tools, if you let us. A couple of notes: - Are the other modules (api-tests, cities-fact-model, ...)

[rules-users] New to Drools. Is it possible to test inverse conditions?

2011-03-10 Thread Manuel Ortiz
- Dear all: My name is Manuel Ortiz, a very beginner in Drools, and have a question related to Multi Restriction on Condition Elements. In http://downloads.jboss.com/drools/docs/5.1.1.34858.FINAL/drools-expert/html/ch04.html#RuleLanguage-ConditionalElements, it can be found the following exam

Re: [rules-users] maven-drools-plugin, anyone?

2011-03-10 Thread Geoffrey De Smet
Op 10-03-11 09:27, Ansgar Konermann schreef: > Hi Geoffrey, > > On 10.03.2011 08:58, Geoffrey De Smet wrote: >> There's a jira for a maven-drools-plugin with possible requirements >> and I believe there already 2 implementations in the wild. >> >> IMHO: >> 1) It should be centralized into the

Re: [rules-users] maven-drools-plugin, anyone?

2011-03-10 Thread Ansgar Konermann
Hi Geoffrey, On 10.03.2011 08:58, Geoffrey De Smet wrote: > There's a jira for a maven-drools-plugin with possible requirements >and I believe there already 2 implementations in the wild. > > IMHO: > 1) It should be centralized into the droolsjbpm-tools repository. > Make a pull request on tha

Re: [rules-users] maven-drools-plugin, anyone?

2011-03-10 Thread Geoffrey De Smet
There's a jira for a maven-drools-plugin with possible requirements and I believe there already 2 implementations in the wild. IMHO: 1) It should be centralized into the droolsjbpm-tools repository. Make a pull request on that repository and I 'll peer review it. 2) The goals etc should follow m