Re: [rules-users] Drools Guvnor API information?

2011-02-14 Thread Vikas Hazrati
Hey Luciano, Meanwhile i tries pumping in the rule with a webdav api (Sardine in my case) and that seems to work and trigger ok for me. this is how i did that public class SardineTest { public static void main(String[] args) throws SardineException { Sardine sardine = SardineFactory.begin("admin"

[rules-users] Travelling Salesman

2011-02-14 Thread Lukáš Petrovický
Hello, I've been making myself familiar with Drools Planner and in the process of doing so, I've hacked together a simple algorithm for optimizing the Travelling Salesman Problem: https://github.com/triceo/DroolingTSP At this point, I get a 7 % improvement over a route with 71 stops, which was p

Re: [rules-users] [Planner] Travelling Salesman

2011-02-14 Thread Geoffrey De Smet
You might be disabling "delta score calculation" with your score rules: https://github.com/triceo/DroolingTSP/blob/master/src/main/rules/tspScoreRules.drl Read http://downloads.jboss.com/drools/docs/5.1.1.34858.FINAL/drools-planner/html_single/index.html#d0e1530 Simulated annealing doesn't

Re: [rules-users] How to Ignore Rule Compilation Error and Continue to Compile Other Rules?

2011-02-14 Thread hyjshanghai
Please refer to the Drools Reference Document. http://downloads.jboss.com/drools/docs/5.1.1.34858.FINAL/drools-expert/html/ch02.html#d0e254 http://downloads.jboss.com/drools/docs/5.1.1.34858.FINAL/drools-expert/html/ch02.html#d0e254 Sample code from it to add rules in a drl file.: KnowledgeBui

Re: [rules-users] Declaring events separately from rules breaks expires

2011-02-14 Thread jwillans2
The suggestion of placing the type declarations in the template worked. However I am eager to find a solution where they can be defined independently without exhibiting the bug mentioned earlier in the thread? Thanks, James -- View this message in context: http://drools-java-rules-engine.4699

Re: [rules-users] Applying rules on the data in an RDBMS

2011-02-14 Thread hyjshanghai
As far as I know, Drools can only reason over facts in the working memory. It can not directly "select" from RDBMS. You have to load in all data items from the database and validate them in memory by Drools. -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/App

Re: [rules-users] hardcore masterclass (west london)

2011-02-14 Thread Swindells, Thomas
I’d potentially be interested depending on what time it is – during the day would actually be better as I could probably get away with it being classed as training for work. Thomas From: rules-users-boun...@lists.jboss.org [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Greg Barton S

[rules-users] Type Declaration upgrade

2011-02-14 Thread delete
Hi. I have such declaration of type declare Contact firstName : String end then I want to add new property to this type. so the next version is declare Contact firstName : String newField : String end this type declaration is in separate drl file. then I add this new type to current Knowl

Re: [rules-users] [rules-dev] Drools 5 load drl rule file from file system.

2011-02-14 Thread Esteban Aliverti
Did you try using ResourceFactory.newFileResource("C:\\savedRules\\rule.drl")? A FileResource is more appropriated for your case I think. By the way, this kind of questions should go in rules-users@lists.jboss.org. I'm forwarding it now. Best, Esteban Al

Re: [rules-users] Applying rules on the data in an RDBMS

2011-02-14 Thread Michael Anstis
You can access Objects from external resources using the "from" keyword (in fact the use of this with Hibernate named queries is a documented use-case, IIRC). The Objects are not however inserted into WorkingMemory using "from" are should therefore be time-constant as their properties will not be

Re: [rules-users] Applying rules on the data in an RDBMS

2011-02-14 Thread Mauricio Salatino
Beware with the use of the FROM Conditional Element, because if you are using another fact that doesn't come from the DB and you change them, the FROM CE will be continuously evaluated causing the execution of tons of queries multiple times. My two cents. Greetings 2011/2/14 Michael Anstis > You

Re: [rules-users] Drools Guvnor API information?

2011-02-14 Thread Luciano A. Andrade
Great, but i like (need really) to triger the rules from a web service, since i am outside the JVM, i will use the web interface to manage the rules, at least at the beginning. 2011/2/14 Vikas Hazrati : > Hey Luciano, Meanwhile i tries pumping in the rule with a webdav api > (Sardine in my case) a

Re: [rules-users] Applying rules on the data in an RDBMS

2011-02-14 Thread Michael Anstis
Sure, I agree, this would be an example:- rule "Family smurf" when MyFact( smurf == "pupa" ) ExternalObject( ) from placeHolder.namedQuery("Smurfs") then //Do something end If MyFact is updated in other rules the list will be refreshed "from" the named query. So the preference might

Re: [rules-users] How to Ignore Rule Compilation Error and Continue to Compile Other Rules?

2011-02-14 Thread Esteban Aliverti
Are you adding rules one by one? Or are you adding files that contains multiple rules? If you are adding rules one by one you could try something like this: 1. create a kbase 2. for each rule: 1. create a kbuilder 2. add the rule to the kbuilder 3. add the generated packag

Re: [rules-users] Declaring events separately from rules breaks expires

2011-02-14 Thread Wolfgang Laun
Template expansion is just text processing. Inserting some text into a template before expanding the modified template should be simple. And even an insertion after expansion is feasible for some of the expansion procedures. -W On 14 February 2011 12:26, jwillans2 wrote: > > The suggestion of p

Re: [rules-users] Type Declaration upgrade

2011-02-14 Thread Edson Tirelli
The current version of Drools does not support dynamic changes in "type declarations" and I don't see this changing anytime soon. The reason is that not only the actual fact would require changes, but the actual knowledge base would require changes as several nodes might be referencing the old c

Re: [rules-users] Type Declaration upgrade

2011-02-14 Thread Mark Proctor
On 14/02/2011 18:10, Edson Tirelli wrote: The current version of Drools does not support dynamic changes in "type declarations" and I don't see this changing anytime soon. The reason is that not only the actual fact would require changes, but the actual knowledge base would require changes

Re: [rules-users] Drools 5.1: What happens when an incremental KA rebuild fails?

2011-02-14 Thread ljnelson
Esteban wrote: > > I will check this problem. I'll need to create a test scenario first. > I am so embarrassed that I never got back to you! I am using Drools 5.1.1. The error occurs when I am pointing at the .drl file too. The scanner says (after the error) that it is scanning 0 resources

Re: [rules-users] Type Declaration upgrade

2011-02-14 Thread Wolfgang Laun
And what will happen to any FactType objects out there? Or the Class objects derived from them? Will it be safe to continue to use the object returned by KnowledgeAgent.getKnowledgeBase() which is documented to return a "cached KnowledgeBase"? Whoa! -W 2011/2/14 Mark Proctor > On 14/02/2011