[rules-users] How can I write a rule that will only fire once for every object in the working memory

2008-01-23 Thread Waruzjan Shahbazian
Hallo, I was wondering if it's possible to create a rule that can only be activated once. So if at a certain point the LHS is matching, it will be fired and deactivated immediately, so the rule never ever gets fired for the object it has updated, no matter if the LHS will matches after a few

[rules-users] from l18n syntax question

2007-12-17 Thread Waruzjan Shahbazian
s is the fastest way. So can anyone please help me with this? Thanks, Waruzjan Shahbazian ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users

Re: [rules-users] Contains substring in the LHS with regular expression capturing groups?

2007-12-14 Thread Waruzjan Shahbazian
new features and the descriptor model must usually change to support them what may eventually break backward compatibility. Even with that, I think it is an affordable cost to pay (fixing eventual breaks on version updates) compared to your runtime application robustness. []s Edson

Re: [rules-users] Contains substring in the LHS with regular expression capturing groups?

2007-12-14 Thread Waruzjan Shahbazian
u to do that, but not possible at this moment. Edson 2007/12/14, Waruzjan Shahbazian <[EMAIL PROTECTED]>: Hi, I need to check in the LHS of my rule if a given String contains an given substring. What is the best way to do that? I can use regular expression with matches, but is tha

[rules-users] Contains substring in the LHS with regular expression capturing groups?

2007-12-14 Thread Waruzjan Shahbazian
Hi, I need to check in the LHS of my rule if a given String contains an given substring. What is the best way to do that? I can use regular expression with matches, but is that the best (fastest) solution? (STRING matches "(?i).*SUBSTRING.*"). And can I use regulare expressions capturing gro

Re: [rules-users] BRMS Insurance Sample - Invalid Class Exception -> Solved

2007-11-27 Thread Waruzjan Shahbazian
BRMS ( after you successfully imported repository_export.xml ) . Than you can deploy the package in brms and the test units should work fine. Waruzjan Shahbazian schreef: I am having the same problem. Has anyone got this working? I have tried using mvel version 1.2.8 and 1.2.10 in the classpa

Re: [rules-users] BRMS Insurance Sample - Invalid Class Exception

2007-11-26 Thread Waruzjan Shahbazian
I am having the same problem. Has anyone got this working? I have tried using mvel version 1.2.8 and 1.2.10 in the classpath of drools-insurance ( where the jUnit tests are ) and by both the serialVersionUID is different. So can anyone tell me which version of mvel is needed to get this working

Re: [rules-users] Initialize Global

2007-10-30 Thread Waruzjan Shahbazian
d rule "end" salience 97 when $g : MyGlobalObject( list != null ) then System.out.println("End objectList: " + $g.getList()); end -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Waruzjan Shahbazian Sent: 3

Re: [rules-users] Initialize Global

2007-10-30 Thread Waruzjan Shahbazian
u have to do an update/insert/remove action... But you can't do that with globals. So you need to use the WM facts. Waruzjan Shahbazian-2 wrote: I have the same "problem", but eval(objectList == null) doesn't work. If I don't execute "drools.getWorkingMemory().set

Re: [rules-users] Initialize Global

2007-10-30 Thread Waruzjan Shahbazian
I have the same "problem", but eval(objectList == null) doesn't work. If I don't execute "drools.getWorkingMemory().setGlobal()" it "works fine", as if the rule activates and the object is null. global List objectList; rule "Start" salience 101 when #conditions then obje

Re: [rules-users] About rules firing

2007-10-08 Thread Waruzjan Shahbazian
As mentioned in the documentation ( http://downloads.jboss.com/drools/docs/4.0.1.14754GA/html/ch06s05.html#d0e2928 ) you can use activation-group's. So you need to give your both rules the same activation-group name, so when the one rule is being activated, the other will not be fired. You coul

Re: [rules-users] eclipse drools builder doesn't recognize functions ...?

2007-09-25 Thread Waruzjan Shahbazian
If you want to execute the test() methode of the Object() you are checking on on the LHS, you need to save the instance of it into a variable: rule "test" when $o : Object() then $o.test(); end greets, Waruzjan Manukyan, Sergey schreef: Getting error reports by drools builder in 4.0.1 telli

Re: [rules-users] eclipse drools builder doesn't recognize functions ...?

2007-09-25 Thread Waruzjan Shahbazian
ekke schreef: manukyan, I noticed a problem if the function has the same name as the package, please rename your function and try again. ekke btw: please always open a new thread for a new topic Manukyan, Sergey wrote: Getting error reports by drools builder in 4.0.1 telling "The method

[rules-users] architectural question about saving the static data

2007-09-24 Thread Waruzjan Shahbazian
Hi, I have a question regarding the way of saving the values of some static data, wich will be used by the drools engine to calculate the price for some product. I will explain it with the following example: I have an website where the user can fill a form where he can choose between different ki