Hi All,
I have the following situation.
class A {
int count = 0;
public int getCount() {
return count;
}
public void incrCount() {
count++;
fireCountChangeevent......
}
public void decrCount() {
count--;
fireCountChangeEvent.....
}
}
class B {
.....
}
(defrule A1
(B)
(A (OBJECT ?aObj))
=>
(?aObj incrCount)
)
(defrule A2
(A (count ?count))
=>
(printout t "Count in object A is " ?count crlf)
)
Now whenever the count changes the rule A2 should be evaluated and fired.
But as the count is changing the rule A1 is also getting evaluated and fired
as object A is retracted and asserted to indicate the change in the count
value. If i do not have any checked in the incrCount method in A, this rule
A1 will fire multiple times and increments the counter multiple times which
is not what i want.
Is there any way i can eliminate this? I tried not to fire the countchange
event when ever i increment or decrement the counter, but by doing that rule
A2 will not get evaluated every time the count is changed.
I appreciate any suggestion.
Thanks in advance
Satish.
---------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the
list (use your own address!) List problems? Notify [EMAIL PROTECTED]
---------------------------------------------------------------------