Re: [rules-users] Update vs insert

2008-09-11 Thread Shyam, Pallav (MSCIBARRA)
Title: Re: [rules-users] Update vs insert To add to what I said below the re-insert will fail silently and the previously inserted fact will be returned. - Original Message - From: Shyam, Pallav (MSCIBARRA) To: 'rules-users@lists.jboss.org' Sent: Thu Sep 11 21:20:51 20

Re: [rules-users] Update vs insert

2008-09-11 Thread Shyam, Pallav (MSCIBARRA)
depends on whether you have implemented equals/hashCode properly. But again, in that example I understand that you want to change the property of an object you have matched  in the LHS. The way to do this is using update(). -- Ingomar Am 11.09.2008 um 12:39 schrieb Shyam, Pallav (MSCIBARRA): &g

Re: [rules-users] getting latest date

2008-09-11 Thread Shyam, Pallav (MSCIBARRA)
rule when m : MemberDataRecords( d : loggedInDate) from Data( ) and not MemberDataRecords( loggedInDate < d) from Data( ) then end From: [EMAIL PROTECTED] To: rules-users@lists.jboss.org Sent: Thu Sep 11 19:05:22 2008 Subject: [rules-users] getting latest dat

Re: [rules-users] Update vs insert

2008-09-11 Thread Shyam, Pallav (MSCIBARRA)
Very strange. The facts are passed into the WM by-reference. Therefore the query should work after calling the person.setClassName("Math") on the fact. And this should work without calling the insert or update. This leaves me guessing that the query does not work on the facts directly, instead

RE: [rules-users] looping problem

2008-09-10 Thread Shyam, Pallav (MSCIBARRA)
Thomas, Everytime you update a fact in the WM, it is matched against all the rules. An activation is created for all such matching cases. In your example whenever the fact is updated in Rule 2, two activations are created, one for Rule 1 and one for Rule 2. Rule 2 doesn't get fired because of n

RE: [rules-users] looping problem

2008-09-10 Thread Shyam, Pallav (MSCIBARRA)
Thomas, Everytime you update a fact in the WM, it is matched against all the rules. An activation is created for all such matching cases. In your example whenever the fact is updated in Rule 2, two activations are created, one for Rule 1 and one for Rule 2. Rule 2 doesn't get fired because of n

[rules-users] RE: logging with WorkingMemoryEventListener

2008-09-08 Thread Shyam, Pallav (MSCIBARRA)
try this public String toString() { return super.toString() + "Type: " + type; } From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of thomas kukofka Sent: Monday, September 08, 2008 2:04 PM To: Rules Users List Cc: Shy

Re: [rules-users] logging with WorkingMemoryEventListener

2008-09-05 Thread Shyam, Pallav (MSCIBARRA)
You can override the toString method of InputObject to return the type information. From: [EMAIL PROTECTED] To: Rules Users List Sent: Fri Sep 05 22:31:04 2008 Subject: [rules-users] logging with WorkingMemoryEventListener Hello, I want to use WorkingMem

FW: [rules-users] Variable assignment in DSL

2008-09-03 Thread Shyam, Pallav (MSCIBARRA)
-off resulting in v1 : RawVolumeTs (status == "NV, sourceId == 2 ) Also v1 is a Volume where status is "NV" and sourceId is 2 and volume is 1000 Give a totally incorrect drl v1 : RawVolumeTs (status == "NV", sourceId == 2 and volume is 1000 ) Thanks Pallav -Original

FW: [rules-users] Variable assignment in DSL

2008-09-03 Thread Shyam, Pallav (MSCIBARRA)
I have a DSL [condition][]There is a Volume where {constraints}=v : RawVolumeTs ( where {constraints} ) [condition][]where {attr} is "{value}"={attr} == "{value}" [condition][]and {attr} is "{value}"=, {attr} == "{value}" And here is my business rule using the above dsl(the dslr file) dialect

[rules-users] Variable assignment in DSL

2008-09-03 Thread Shyam, Pallav (MSCIBARRA)
I have a DSL [condition][]There is a Volume where {constraints}=v : RawVolumeTs ( where {constraints} ) [condition][]where {attr} is "{value}"={attr} == "{value}" [condition][]and {attr} is "{value}"=, {attr} == "{value}" And here is my business rule using the above dsl(the dslr file) dialect "

RE: [rules-users] Check the condition is TRUE during a period of time

2008-09-03 Thread Shyam, Pallav (MSCIBARRA)
Here is how you can achieve this: rule "Init" salience 10 when exists FactObject(condition != true) then insertLogical(new Stop()) end rule "Your Business rule" when not Stop() //some other condit

[rules-users] FW: Sequential Mode with Sequential or Dynamic Agenda

2008-09-02 Thread Shyam, Pallav (MSCIBARRA)
posting my query again and hoping to get an answer soon. Hi All, I am trying to figure out when to use Sequential Mode. Also, what does SequentailAgenda.SEQUENTIAL and SequentialAgenda.DYNAMIC means. rule "asset > 1000" when s : Security( status == "NOT VALIDATED", country == "

RE: [rules-users] Checking facts between them

2008-09-02 Thread Shyam, Pallav (MSCIBARRA)
rule "compare dates" when FactObject($d1 : date) FactObject(date == $d1) then end This assumes there is an object FactObject with attribute date. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Delaunay Ga

Re: [rules-users] Turning on and off a particular rule

2008-09-01 Thread Shyam, Pallav (MSCIBARRA)
Title: Re: [rules-users] Turning on and off a particular rule To turn off a rule write enabled false on the line after the rule name. Pallav - Original Message - From: [EMAIL PROTECTED] <[EMAIL PROTECTED]> To: Rules Users List Sent: Tue Sep 02 02:20:27 2008 Subject: [rules-users]

[rules-users] Sequential Mode with Sequential or Dynamic Agenda

2008-08-31 Thread Shyam, Pallav (MSCIBARRA)
Hi All, I am trying to figure out when to use Sequential Mode. Also, what does SequentailAgenda.SEQUENTIAL and SequentialAgenda.DYNAMIC means. rule "asset > 1000" when s : Security( status == "NOT VALIDATED", country == "USA", asset > 1000) then s.setStatus("VALIDATED");