Re: [rules-users] Inserting collection of facts in rule Consequence

2009-02-15 Thread Steven Williams
I normally do something like when $creditContract : CreditContract() $o : Applicant() from $creditContract.coApplicantArray then insert($o); end retract would be something like when $o : Applicant( ) CreditContract( coApplicantArray contains $o ) then retract($o); end ch

[rules-users] Truth maintenance

2009-02-15 Thread Andreas Volz
Hi, I have a question concerning the truth maintenance mechanism in Drools: Is it possible to exclude some preconditions from truth maintenance? We want to implement a rule flow by using an attribute of a special fact (ProcessPhaseController.phase). We have some phases that we want to traverse.

Re: [rules-users] re:Shadow Facts

2009-02-15 Thread Edson Tirelli
I am not sure what we are missing, but we must be missing something. The test I mentioned is here: http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/MiscTest.java Can you send me a test case with your scenario so that I

[rules-users] re:Shadow Facts

2009-02-15 Thread J Michael Dean
Sorry - in previous email forgot to include the following code, as the NPE occurs when this routine is called at the addPackage call. private void readDRLintoPackage(String rulesFile) throws DroolsParserException, IOException, Exception { Reader source = new InputStreamReader(RulesEngi

[rules-users] Re:Shadow Facts

2009-02-15 Thread J Michael Dean
Edson - build2589-rev25264-20090214-0603 is the snapshot that I downloaded and installed. However, I have done a search on the source and have not been able to locate MiscTest.testPropertyChangeSupportNewAPI() in the source at all. Interestingly, the DRL compilation does not crash if I use

[rules-users] Re: drools-solver - magic name of scoreCalculator => Solution has a Sore and is inserted into the working memory

2009-02-15 Thread Geoffrey De Smet
I am actually considering a couple of designs, which also happens to solve the problem of the magic name of the scoreCalculator. 1) a score will no longer be a double, but an instance of a new interface Score. This will means that a score of an int hard and int soft will be represented as it s

Re: [rules-users] Shadow Facts

2009-02-15 Thread Edson Tirelli
Can you provide the error messages your are getting? Make sure you use at least build #2589, that include the changes. https://hudson.jboss.org/hudson/job/drools/2589/artifact/trunk/target/ There is a test case for this on MiscTest.testPropertyChangeSupportNewAPI(). []s Edson 20