<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<STYLE>.hmmessage P {
        PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px
}
BODY.hmmessage {
        FONT-SIZE: 10pt; FONT-FAMILY: Tahoma
}
</STYLE>
<META content="MSHTML 6.00.2900.3132" name=GENERATOR></HEAD>
<BODY class=hmmessage>
<DIV dir=ltr align=left><SPAN class=208223809-11042008><FONT face=Arial
color=#0000ff>In essence, yes. Have a look at "update" in the manual (and a read
on Shadow Facts will probably be useful too).</FONT></SPAN></DIV><BR>
<BLOCKQUOTE style="MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma><B>From:</B> rules-users-bounces@lists.jboss.org
[mailto:rules-users-bounces@lists.jboss.org] <B>On Behalf Of </B>Jonathan
Guéhenneux<BR><B>Sent:</B> 11 April 2008 10:24<BR><B>To:</B> Rules Users
List<BR><B>Subject:</B> RE: [rules-users] Synch Business Object / Working
Memory<BR></FONT><BR></DIV>
<DIV></DIV>yes, i made a mistake. its a.setE(...) and not
c.setE(...).<BR><BR>I don't call update. If I dont call update, properties of
an object are just read one time for all rules?<BR><BR><BR>
<BLOCKQUOTE>
<HR>
Subject: RE: [rules-users] Synch Business Object / Working Memory<BR>Date:
Fri, 11 Apr 2008 09:47:43 +0100<BR>From: manstis1@ford.com<BR>To:
rules-users@lists.jboss.org<BR><BR>
<META content="Microsoft SafeHTML" name=Generator>
<STYLE>.ExternalClass .EC_hmmessage P {
        PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px
}
.ExternalClass BODY.EC_hmmessage {
        FONT-SIZE: 10pt; FONT-FAMILY: Tahoma
}
</STYLE>
<DIV dir=ltr align=left><SPAN class=EC_287464408-11042008><FONT face=Arial
color=#0000ff>I guess the example is a simplification as "c" (in RHS) has
not been bound to a fact.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=EC_287464408-11042008><FONT face=Arial
color=#0000ff></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=EC_287464408-11042008><FONT face=Arial
color=#0000ff>Anyway, that aside, do you call "update" to ensure WM knows of
changes to facts otherwise properties need to be "time-constant" which in
your example they are not.</FONT></SPAN></DIV><BR>
<BLOCKQUOTE style="MARGIN-RIGHT: 0px">
<DIV class=EC_OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR>
<FONT face=Tahoma><B>From:</B> rules-users-bounces@lists.jboss.org
[mailto:rules-users-bounces@lists.jboss.org] <B>On Behalf Of </B>Jonathan
Guéhenneux<BR><B>Sent:</B> 11 April 2008 09:34<BR><B>To:</B> Rules Users
List<BR><B>Subject:</B> [rules-users] Synch Business Object / Working
Memory<BR></FONT><BR></DIV>
<DIV></DIV>Hi,<BR><BR>I have two rules :<BR><BR>rule "rule 1 -
1"<BR> <BR> salience
90<BR> ruleflow-group "rfg1"<BR>
when<BR> a : A(<BR>
eComputed ==
"false",<BR> c
< 15,<BR> d
>= 75) <BR>
then<BR>
c.setE(0);<BR>end<BR><BR><BR><BR>rule "rule 1 -
2"<BR><BR> salience 10<BR>
ruleflow-group "rfg1"<BR> when<BR>
a : A(<BR>
eComputed == "false",<BR>
c >= 15,<BR>
d >= 75)
<BR> then<BR>
c.setE(1);<BR>end<BR><BR><BR><BR>and part of the
corresponding business code :<BR><BR>public class A
{<BR><BR> ...<BR><BR> public String
getEComputed(){<BR>
if(eComputed)<BR> return
"true";<BR> else<BR>
return "false";<BR>
}<BR><BR> ...<BR><BR> public void
setE(int e){<BR> this.e =
e;<BR> eComputed =
true;<BR> }<BR><BR>
...<BR><BR>}<BR><BR><BR><BR>so, I expected that if the first rule is
activated, the second won't be. But according to my tests, the two rule
can be fired on the same object A.<BR>While debugging, I noticed the
getEComputed method was only called once. I suppose that I should write
this :<BR><BR><BR>rule "rule 1 - 1"<BR>
<BR> salience 90<BR> ruleflow-group
"rfg1"<BR> when<BR>
a : A(<BR>
eComputed == "false",<BR>
c < 15,<BR>
d >= 75)
<BR> then<BR>
c.setE(0);<BR>
c.setEComputed("true);<BR>end<BR><BR><BR><BR>rule "rule 1 -
2"<BR><BR> salience 10<BR>
ruleflow-group "rfg1"<BR> when<BR>
a : A(<BR>
eComputed == "false",<BR>
c >= 15,<BR>
d >= 75)
<BR> then<BR>
c.setE(1);<BR>
c.setEComputed("true);<BR>end<BR><BR>But I would prefer another solution.
Thanks for help.<BR><BR>
<HR>
Plus de 15 millions de français utilisent Windows Live Messenger ! <A
href="http://www.windowslive.fr/messenger/" target=_blank>Téléchargez
Messenger, c'est gratuit !</A> </BLOCKQUOTE></BLOCKQUOTE><BR>
<HR>
Plus de 15 millions de français utilisent Windows Live Messenger ! <A
href="http://www.windowslive.fr/messenger/" target=_new>Téléchargez Messenger,
c'est gratuit !</A> </BLOCKQUOTE></BODY></HTML>