<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
ok.<br>
So the only way to do that is to add a control fact, and update it
at runtime...<br>
Do you think that using the "control fact" method will speed up the
execution time for a large ruleset that have different
ruleflow-group ? <br>
My feeling is yes, especially if "first" rules does many updates,
but I haven't done any tests.<br>
<br>
Le 21/03/2011 14:37, Swindells, Thomas a écrit :
<blockquote
cite="mid:DAC86F5F3B84F14088F0DB16092558CA0F616271CF@UKMA1.UK.NDS.COM"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<meta name="Generator" content="Microsoft Word 12 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";
        color:black;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size: 11pt; font-family:
"Calibri","sans-serif"; color: rgb(31,
73, 125);">The thing to remember is that fact evaluation
occurs at object insert/update time, not at the point you
call fireAllRules. Salience, Agenda and rufeflow control on
the other hand are runtime conditions which control which
rules are actually activated in what order.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family:
"Calibri","sans-serif"; color: rgb(31,
73, 125);"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family:
"Calibri","sans-serif"; color: rgb(31,
73, 125);">Thomas <o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family:
"Calibri","sans-serif"; color: rgb(31,
73, 125);"><o:p> </o:p></span></p>
<div style="border-width: medium medium medium 1.5pt;
border-style: none none none solid; border-color:
-moz-use-text-color -moz-use-text-color -moz-use-text-color
blue; padding: 0cm 0cm 0cm 4pt;">
<div>
<div style="border-right: medium none; border-width: 1pt
medium medium; border-style: solid none none;
border-color: rgb(181, 196, 223) -moz-use-text-color
-moz-use-text-color; padding: 3pt 0cm 0cm;">
<p class="MsoNormal"><b><span style="font-size: 10pt;
font-family:
"Tahoma","sans-serif"; color:
windowtext;" lang="EN-US">From:</span></b><span
style="font-size: 10pt; font-family:
"Tahoma","sans-serif"; color:
windowtext;" lang="EN-US">
<a class="moz-txt-link-abbreviated" href="mailto:rules-users-bounces@lists.jboss.org">rules-users-bounces@lists.jboss.org</a>
[<a class="moz-txt-link-freetext" href="mailto:rules-users-bounces@lists.jboss.org">mailto:rules-users-bounces@lists.jboss.org</a>] <b>On
Behalf Of </b>Vincent Legendre<br>
<b>Sent:</b> 21 March 2011 13:34<br>
<b>To:</b> Rules Users List<br>
<b>Subject:</b> Re: [rules-users] Limiting rule
evaluation--not firing<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">And what about ruleflow-group ?<br>
There is no network filtering for that too ? The
ruleflow-group behaves like an agenda filter, but still
evaluate all nodes ?
<br>
Could we imagine setting "tags" to nodes, and stop
propagation for node that does not declare the current task
tag ?<br>
<br>
<br>
Le 21/03/2011 14:20, Edson Tirelli a écrit : <o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"> The algorithm as is does eager
evaluation, as for the general case that is still better
than doing selective evaluation. <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"> If, in your case, the decision of
which rules to fire is an arbitrary application decision,
and not based on the actual constraints of the rules
themselves, then the only way would be by creating a
control fact:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">rule 1<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">when<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> ControlFact( phase == Phase.ONE )<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">...<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">rule 2<o:p></o:p></p>
</div>
<div>
<div>
<p class="MsoNormal">when<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> ControlFact( phase == Phase.TWO )<o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal">...<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"> This way, if the control fact is the
first pattern in each rule it effectively disables all the
beta evaluations for rules of phases other than the
current one. Just be aware that by blocking the eager
evaluation this way, phase switches are heavier than
without the control fact, where most constraints were
already previously evaluated. Obvious, but worth saying
out loud... :)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"> There is also a feature that
Leonardo is working on that makes the engine automatically
unlink and relink parts of the network, based on the
existence and possibility of matching the other required
facts in a rule LHS. It might achieve similar results to
what you are looking for in some cases, but that is
totally based on the constraints in there and not on any
arbitrary application decision.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"> Edson<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
<br>
<hr>
<font color="Gray" face="Arial" size="1"><br>
**************************************************************************************<br>
This message is confidential and intended only for the
addressee. If you have received this message in error, please
immediately notify the <a class="moz-txt-link-abbreviated" href="mailto:postmaster@nds.com">postmaster@nds.com</a> and delete it from
your system as well as any copies. The content of e-mails as
well as traffic data may be monitored by NDS for employment and
security purposes. To protect the environment please do not
print this e-mail unless necessary.<br>
<br>
NDS Limited. Registered Office: One London Road, Staines,
Middlesex, TW18 4EX, United Kingdom. A company registered in
England and Wales. Registered no. 3080780. VAT no. GB 603 8808
40-00<br>
**************************************************************************************<br>
</font>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
rules-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a>
</pre>
</blockquote>
<br>
</body>
</html>