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
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
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
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
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
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
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
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
-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
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
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 "
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
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 == "
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
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]
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");
16 matches
Mail list logo