right, so when you modify a specific field on fact you don&#39;t want rules to fire that depend on *other* fields. <br><br>well there are only 2 options that spring to mind:<br><br>1) Break down your object model to be more atomic to match the rules
<br>2) In the first rule, set a field on the fact that indicates that scenario has been dealt with, and modify the LHS to take that into account so it doesn&#39;t fire more then its needed to. You just need to then &quot;unset&quot; that field when you do want it to fire again.
<br><br>Really I think #1 is what you want. <br><br>Michael.<br><br><div><span class="gmail_quote">On 2/11/07, <b class="gmail_sendername">Steve</b> &lt;<a href="mailto:software.1@ntlworld.com">software.1@ntlworld.com</a>
&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi, I was wondering what people this might think is good solution to the<br>
following scenario...<br><br>I have a Fact that represents a physical piece of equipment in a control<br>system, this Fact has a number of parameters, param1 and param2. The working<br>memory is used in a stateful manner. Consider two example rules, cs is a
<br>global vairable that allows calls back to the control system.<br><br>rule &quot;Monitor param1&quot;<br>&nbsp;&nbsp;when<br>&nbsp;&nbsp; f : Fact( param1 == 1 )<br>&nbsp;&nbsp;then<br>&nbsp;&nbsp; cs.DoSomething(f);<br>end<br><br>rule &quot;Monitor param2&quot;
<br>&nbsp;&nbsp;when<br>&nbsp;&nbsp; f : Fact( param2 == 1)<br>&nbsp;&nbsp;then<br>&nbsp;&nbsp;&nbsp;&nbsp;cs.DoSomething(f);<br>end<br><br>If param1 is updated to == 1, the working memory notified (modifyObject) and<br>the the rules are fired (fireAllRules), consequently the rule &quot;Monitor param1&quot;
<br>will be placed onto the Agenda. Assuming that sometime later param2 is updated<br>to == 1, notifing the working memory and firing the rules again will result in<br>rules &quot;Monitor param1&quot; and &quot;Monitor param2&quot; being placed on the agenda. What I
<br>really want is just the change to be detected and not for the &quot;Monitor param1&quot;<br>rule to fire again.<br>Is there a pattern to acheive the desired behaviour, I have used agenda-group<br>but am not sure this is the best solution.
<br><br>Thanks for your help.<br><br>_______________________________________________<br>rules-users mailing list<br><a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br><a href="https://lists.jboss.org/mailman/listinfo/rules-users">
https://lists.jboss.org/mailman/listinfo/rules-users</a><br></blockquote></div><br>