<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman,new york,times,serif;font-size:12pt"><div>Even though the conversion of "&&" to "," had no dramatic effect for you I suggest you do it anyway. As your rules become more complex it will scale much better.<br></div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><font face="Tahoma" size="2"><hr size="1"><b><span style="font-weight: bold;">From:</span></b> Costigliola Joel (EXT) <joel.costigliola-ext@natixis.com><br><b><span style="font-weight: bold;">To:</span></b> Rules Users List <rules-users@lists.jboss.org><br><b><span style="font-weight: bold;">Sent:</span></b> Tuesday, September 29, 2009 8:01:53 AM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [rules-users] infinite loop
rules problem<br></font><br>
<style>
<!--
_filtered {font-family:"MS Mincho";panose-1:2 2 6 9 4 2 5 8 3 4;}
_filtered {font-family:Tahoma;panose-1:2 11 6 4 3 5 4 4 2 4;}
_filtered {font-family:Verdana;panose-1:2 11 6 4 3 5 4 4 2 4;}
_filtered {panose-1:2 2 6 9 4 2 5 8 3 4;}
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;margin-bottom:.0001pt;font-size:12.0pt;font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:blue;text-decoration:underline;}
p
        {margin-right:0cm;margin-left:0cm;font-size:12.0pt;font-family:"Times New Roman";}
span.EmailStyle18
        {font-family:Verdana;color:blue;font-weight:normal;font-style:normal;text-decoration:none none;}
span.EmailStyle19
        {font-family:Verdana;color:blue;font-weight:normal;font-style:normal;text-decoration:none none;}
_filtered {margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.Section1
        {}
_filtered {}
_filtered {}
_filtered {}
_filtered {}
_filtered {}
_filtered {}
_filtered {}
_filtered {}
_filtered {}
_filtered {}
_filtered {}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
-->
</style>
<div>
<div>
<div class="Section1">
<p class="MsoNormal"><font color="blue" face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana; color: blue;">Back with (good) news :)</span></font></p>
<p class="MsoNormal"><font color="blue" face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana; color: blue;" lang="EN-GB">Removing the update has
a tremendous effect; process time (ie. session.fireAllRule) has decreased from
10s to less than 1.</span></font></p>
<p class="MsoNormal"><font color="blue" face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana; color: blue;" lang="EN-GB">On the other hand,
changing && to constraint group had no visible effect. </span></font></p>
<p class="MsoNormal"><font color="blue" face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana; color: blue;" lang="EN-GB"> </span></font></p>
<p class="MsoNormal"><font color="blue" face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana; color: blue;" lang="EN-GB">Is there a way to
evaluate rules performance just at looking at rete tree ?</span></font></p>
<p class="MsoNormal"><font color="blue" face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana; color: blue;" lang="EN-GB">Do you have some good articles
on that ?</span></font></p>
<p class="MsoNormal"><font color="blue" face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana; color: blue;" lang="EN-GB"> </span></font></p>
<p class="MsoNormal"><font color="blue" face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana; color: blue;" lang="EN-GB">Thanks all for your
help,</span></font></p>
<p class="MsoNormal"><font color="blue" face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana; color: blue;" lang="EN-GB"> </span></font></p>
<p class="MsoNormal"><font color="blue" face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana; color: blue;" lang="EN-GB">Joel </span></font></p>
<p class="MsoNormal"><font color="blue" face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana; color: blue;" lang="EN-GB"> </span></font></p>
<div>
<div class="MsoNormal" style="text-align: center;" align="center"><font face="Times New Roman" size="3"><span style="font-size: 12pt;">
<hr tabindex="-1" width="100%" align="center" size="2">
</span></font></div>
<p class="MsoNormal"><b><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma; font-weight: bold;" lang="EN-GB">De :</span></font></b><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;" lang="EN-GB">
rules-users-bounces@lists.jboss.org
[mailto:rules-users-bounces@lists.jboss.org] <b><span style="font-weight: bold;">De
la part de</span></b> Costigliola </span></font><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;">Joel (EXT)<br>
<b><span style="font-weight: bold;">Envoyé :</span></b> mardi 29 septembre
2009 10:37<br>
<b><span style="font-weight: bold;">À :</span></b> ' Rules
Users List '<br>
<b><span style="font-weight: bold;">Objet :</span></b> Re: [rules-users]
infinite loop rules problem</span></font></p>
</div>
<p class="MsoNormal"><font face="Times New Roman" size="3"><span style="font-size: 12pt;"> </span></font></p>
<div>
<div>
<p class="MsoNormal"><font color="blue" face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana; color: blue;" lang="EN-GB">Nice suggestion for
removing the update ! </span></font></p>
<p class="MsoNormal"><font color="blue" face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana; color: blue;" lang="EN-GB">I also will remove the
&& for constraint group, another user of this mailing list has given me
the same advice on my previous mail (it was Greg Barton by the way). </span></font></p>
<p class="MsoNormal"><font color="blue" face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana; color: blue;" lang="EN-GB"> </span></font></p>
<p class="MsoNormal"><font color="blue" face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana; color: blue;" lang="EN-GB">Many thanks,</span></font></p>
<p class="MsoNormal"><font color="blue" face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana; color: blue;" lang="EN-GB"> </span></font></p>
<p class="MsoNormal"><font color="blue" face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana; color: blue;" lang="EN-GB">Joel</span></font></p>
<p class="MsoNormal"><font color="blue" face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana; color: blue;" lang="EN-GB"> </span></font></p>
<div>
<div class="MsoNormal" style="text-align: center;" align="center"><font face="Times New Roman" size="3"><span style="font-size: 12pt;">
<hr tabindex="-1" width="100%" align="center" size="2">
</span></font></div>
<p class="MsoNormal"><b><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma; font-weight: bold;">De :</span></font></b><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;">
rules-users-bounces@lists.jboss.org
[mailto:rules-users-bounces@lists.jboss.org] <b><span style="font-weight: bold;">De
la part de</span></b> Wolfgang Laun<br>
<b><span style="font-weight: bold;">Envoyé :</span></b> lundi 28 septembre
2009 19:37<br>
<b><span style="font-weight: bold;">À :</span></b>
Rules Users List<br>
<b><span style="font-weight: bold;">Objet :</span></b> Re: [rules-users]
infinite loop rules problem</span></font></p>
</div>
<p class="MsoNormal"><font face="Times New Roman" size="3"><span style="font-size: 12pt;"> </span></font></p>
<p class="MsoNormal" style="margin-bottom: 12pt;"><font face="Times New Roman" size="3"><span style="font-size: 12pt;">Collecting stuff from
several matches into a single Collector fact is best done<br>
by letting matches occur with rules at salience N. Then, put a single rule<br>
matching the Collector, without any constraints, at salience < N.<br>
This matches any Collector fact, and, in the consequence you should<br>
remove this fact, which has done its duty. To distinguish (as in your case)<br>
the successful case (one match) from others, you might just use an if<br>
statement in the consequence. (Well, yes, this isn't quite comme-il-faut,<br>
but it'll get the job done.) So, don't bother with updates on the Collector
fact.<br>
<br>
As for the frequently used && to connect the constraints, it is
preferred<br>
to use individual constraint groups, separated by a comma, for matches<br>
with different fact attributes. Constraint groups can be shared among<br>
rules (in the Rete node network) which is the essence of Rete being<br>
fast enough to cope with the many-many pattern matching effort.<br>
<br>
-W<br>
</span></font></p>
<div>
<p class="MsoNormal"><font face="Times New Roman" size="3"><span style="font-size: 12pt;">2009/9/28 Costigliola Joel (EXT) <<a rel="nofollow" ymailto="mailto:joel.costigliola-ext@natixis.com" target="_blank" href="mailto:joel.costigliola-ext@natixis.com">joel.costigliola-ext@natixis.com</a>></span></font></p>
<div>
<div>
<div>
<div>
<p><font face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana;" lang="EN-GB">Hello,</span></font></p>
<p><font face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana;" lang="EN-GB"> </span></font></p>
<p><font face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana;" lang="EN-GB">Me again and no it is not spamming, and I’m still
drools newbie ;-)</span></font></p>
<p><font face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana;" lang="EN-GB"> </span></font></p>
<p><font face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana;" lang="EN-GB">I was facing a problem of infinite loop with one of my rule,
I have solved it but I’m wondering if my solution is not too costful on a
performance point of view.</span></font></p>
<p><font face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana;" lang="EN-GB">So my question is really on the most efficient way of
solving the infinite loop problem I’m gonna expose you right now.</span></font></p>
<p><font face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana;" lang="EN-GB"> </span></font></p>
<p><font face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana;" lang="EN-GB">First of all, a few words the problem I want to solve with
Drools :</span></font></p>
<p><font face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana;" lang="EN-GB">My company is a bank where traders are making deals on
markets, these deals must be classified in book, this is what we call
“booking process”.</span></font></p>
<p><font face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana;" lang="EN-GB">Booking is done according to booking criteria : which
trader has made the deal ? on which product ? etc … </span></font></p>
<p><font face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana;" lang="EN-GB">A booking rule defines a set of criteria and the target
book where the deal will classified. </span></font></p>
<p><font face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana;" lang="EN-GB"> </span></font></p>
<p><font face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana;" lang="EN-GB">The guilty rule’s job was to fill </span></font><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: black;" lang="EN-GB">DealMatchingBookingRules</span></font><font face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana;" lang="EN-GB">
with the booking rules applicable on a deal, (</span></font><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: black;" lang="EN-GB">DealMatchingBookingRules</span></font><font face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana;" lang="EN-GB">
references a unique deal). </span></font></p>
<p><font face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana;" lang="EN-GB">I have put below a corrected version by commenting the
update</span></font><font color="olive" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: olive;" lang="EN-GB">(</span></font><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: black;" lang="EN-GB">$dealMatchingBookingRules</span></font><font color="olive" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: olive;" lang="EN-GB">)</span></font><font face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana;" lang="EN-GB">
instruction of the RHS.</span></font></p>
<p><font face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana;" lang="EN-GB"> </span></font></p>
<p><font face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana;" lang="EN-GB">With update uncommented, the problem occurred when 2
booking rule were matching the same deal in here’s my understanding of
the problem </span></font></p>
<p><font face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana;" lang="EN-GB">Facts inserted in the session : </span></font></p>
<p style="margin-left: 36pt;"><font face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana;" lang="EN-GB">-</span></font><font size="1"><span style="font-size-adjust: none; font-stretch: normal;"><span style="font-size: 7pt;" lang="EN-GB"> </span></span></font><font face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana;" lang="EN-GB">dmbr1
(instance of DealMatchingBookingRule) referencing a deal</span></font></p>
<p style="margin-left: 36pt;"><font face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana;" lang="EN-GB">-</span></font><font size="1"><span style="font-size-adjust: none; font-stretch: normal;"><span style="font-size: 7pt;" lang="EN-GB"> </span></span></font><font face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana;" lang="EN-GB">br1
and br2 matching the deal referenced in dmr1</span></font></p>
<p><font face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana;" lang="EN-GB">Results : </span></font></p>
<ol start="1" type="1">
<li class="MsoNormal" style=""><font face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana;" lang="EN-GB">rule is activated with
(dmbr1, br1), dmbr1 is updated</span></font></li>
<li class="MsoNormal" style=""><font face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana;" lang="EN-GB">rule is activated with
(dmbr1, br2), dmbr1 is updated - (dmbr1, br1) does not activate the rule
because of no-loop rule attribute</span></font></li>
<li class="MsoNormal" style=""><font face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana;" lang="EN-GB">rule is activated AGAIN with
(dmbr1, br1), dmbr1 is updated : back to step 1</span></font></li>
<li class="MsoNormal" style=""><font face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana;" lang="EN-GB">rule is activated AGAIN with
(dmbr1, br2), dmbr1 is updated : back to step 2</span></font></li>
<li class="MsoNormal" style=""><font face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana;" lang="EN-GB">infinite loop on step1 &
step 2</span></font></li>
</ol>
<p><font face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana;" lang="EN-GB"> </span></font></p>
<p><font face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana;" lang="EN-GB">I have fixed the problem by removing the call to update,
but for the next steps of my process (not shown here) Drools need to aware of
the modified </span></font><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: black;" lang="EN-GB">DealMatchingBookingRules.
</span></font><font face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana;" lang="EN-GB">I thus have written a rule which only update all
DealMatchingBookingRules.</span></font></p>
<p><font face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana;" lang="EN-GB"> </span></font></p>
<p><font face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana;" lang="EN-GB">Is there a better way to solve this infinite loop ?</span></font></p>
<p><font face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana;" lang="EN-GB">Feel free to make comments, I’m really open to any
suggestion/enhancement. </span></font></p>
<p><font face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana;" lang="EN-GB"> </span></font></p>
<p><font face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana;" lang="EN-GB">Regards,</span></font></p>
<p><font face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana;" lang="EN-GB"> </span></font></p>
<p><font face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana;">Joël
Costigliola</span></font></p>
<p><font face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana;" lang="EN-GB"> </span></font></p>
<p><font face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana;" lang="EN-GB"> </span></font></p>
<p><b><font color="#960000" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: rgb(150, 0, 0); font-weight: bold;" lang="EN-GB">rule</span></font></b><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: black;" lang="EN-GB"> </span></font><font color="green" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: green;" lang="EN-GB">"Find matching level 1 booking
rules by deal"</span></font></p>
<p><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: black;" lang="EN-GB"> </span></font><b><font color="#960000" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: rgb(150, 0, 0); font-weight: bold;" lang="EN-GB">salience</span></font></b><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: black;" lang="EN-GB"> 10</span></font></p>
<p><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: black;" lang="EN-GB"> </span></font><b><font color="#960000" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: rgb(150, 0, 0); font-weight: bold;" lang="EN-GB">no-loop</span></font></b><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: black;" lang="EN-GB"> </span></font></p>
<p><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: black;" lang="EN-GB"> </span></font><b><font color="#960000" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: rgb(150, 0, 0); font-weight: bold;" lang="EN-GB">ruleflow-group</span></font></b><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: black;" lang="EN-GB"> </span></font><font color="green" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: green;" lang="EN-GB">"Find level 1 matching booking rules by deal group"</span></font></p>
<p><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: black;" lang="EN-GB"> </span></font></p>
<p><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: black;" lang="EN-GB"> </span></font><b><font color="#960000" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: rgb(150, 0, 0); font-weight: bold;" lang="EN-GB">when</span></font></b></p>
<p><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: black;" lang="EN-GB">
$dealMatchingBookingRules : DealMatchingBookingRules($dealModel : deal, $dealProductRelatedIndexes
: dealProductRelatedIndexes)</span></font></p>
<p><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: black;" lang="EN-GB">
$bookingRule : BTExecutionBookingRuleModel (</span></font></p>
<p><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: black;" lang="EN-GB">
priority == 1</span></font></p>
<p><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: black;" lang="EN-GB">
</span></font><font color="olive" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: olive;" lang="EN-GB">// when a
criterion is not set, it is considered as satisfied. </span></font></p>
<p><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: black;" lang="EN-GB">
&& (traderCriterion == </span></font><b><font color="#960000" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: rgb(150, 0, 0); font-weight: bold;" lang="EN-GB">null</span></font></b><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: black;" lang="EN-GB"> || $dealModel.trader == traderCriterion)</span></font></p>
<p><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: black;" lang="EN-GB">
&& (portfolioCriterion == </span></font><b><font color="#960000" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: rgb(150, 0, 0); font-weight: bold;" lang="EN-GB">null</span></font></b><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: black;" lang="EN-GB"> || $dealModel.portfolio == portfolioCriterion)</span></font></p>
<p><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: black;" lang="EN-GB">
</span></font><font color="olive" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: olive;" lang="EN-GB">// when a
product type criterion is set to unknown, it is considered as satisfied
whatever deal product type is. </span></font></p>
<p><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: black;" lang="EN-GB">
&& (productTypeStringCriterion == </span></font><b><font color="#960000" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: rgb(150, 0, 0); font-weight: bold;" lang="EN-GB">null</span></font></b><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: black;" lang="EN-GB"> || productTypeCriterion ==
ProductType.Unknown </span></font></p>
<p><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: black;" lang="EN-GB">
|| $dealModel.product.productType == productTypeCriterion) </span></font></p>
<p><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: black;" lang="EN-GB">
&& (listedIndexCriterion == </span></font><b><font color="#960000" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: rgb(150, 0, 0); font-weight: bold;" lang="EN-GB">null</span></font></b><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: black;" lang="EN-GB"> ||
$dealProductRelatedIndexes.relatedIndexes </span></font><b><font color="#960000" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: rgb(150, 0, 0); font-weight: bold;" lang="EN-GB">contains</span></font></b><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: black;" lang="EN-GB"> listedIndexCriterion)</span></font></p>
<p><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: black;" lang="EN-GB">
)</span></font></p>
<p><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: black;" lang="EN-GB"> </span></font><b><font color="#960000" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: rgb(150, 0, 0); font-weight: bold;" lang="EN-GB">then</span></font></b></p>
<p><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: black;" lang="EN-GB">
$dealMatchingBookingRules.addMatchingBookingRule($bookingRule);</span></font></p>
<p><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: black;" lang="EN-GB">
</span></font><font color="olive" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: olive;" lang="EN-GB">// update(</span></font><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: black;" lang="EN-GB">$dealMatchingBookingRules</span></font><font color="olive" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: olive;" lang="EN-GB">) : COMMENTED BECAUSE WAS CAUSING
INFINITE LOOP !</span></font><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: black;" lang="EN-GB"> </span></font></p>
<p><b><font color="#960000" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: rgb(150, 0, 0); font-weight: bold;" lang="EN-GB">end</span></font></b></p>
<p><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New";" lang="EN-GB"> </span></font></p>
<p><font color="olive" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: olive;" lang="EN-GB">// Does the job
of update(</span></font><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: black;" lang="EN-GB">$dealMatchingBookingRules</span></font><font color="olive" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: olive;" lang="EN-GB">) but without INFINITE LOOP.</span></font></p>
<p><b><font color="#960000" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: rgb(150, 0, 0); font-weight: bold;" lang="EN-GB">rule</span></font></b><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: black;" lang="EN-GB"> </span></font><font color="green" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: green;" lang="EN-GB">"Refresh facts in level 1 booking
rule process"</span></font></p>
<p><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: black;" lang="EN-GB"> </span></font><b><font color="#960000" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: rgb(150, 0, 0); font-weight: bold;" lang="EN-GB">salience</span></font></b><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: black;" lang="EN-GB"> 5</span></font></p>
<p><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: black;" lang="EN-GB"> </span></font><b><font color="#960000" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: rgb(150, 0, 0); font-weight: bold;" lang="EN-GB">no-loop</span></font></b><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: black;" lang="EN-GB"> </span></font></p>
<p><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: black;" lang="EN-GB"> </span></font><b><font color="#960000" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: rgb(150, 0, 0); font-weight: bold;" lang="EN-GB">ruleflow-group</span></font></b><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: black;" lang="EN-GB"> </span></font><font color="green" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: green;" lang="EN-GB">"Refresh facts in level 1 booking rule process group"</span></font></p>
<p><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: black;" lang="EN-GB"> </span></font></p>
<p><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: black;" lang="EN-GB"> </span></font><b><font color="#960000" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: rgb(150, 0, 0); font-weight: bold;" lang="EN-GB">when</span></font></b></p>
<p><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: black;" lang="EN-GB">
$dealMatchingBookingRules : DealMatchingBookingRules()</span></font></p>
<p><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: black;" lang="EN-GB"> </span></font><b><font color="#960000" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: rgb(150, 0, 0); font-weight: bold;" lang="EN-GB">then</span></font></b></p>
<p><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: black;" lang="EN-GB">
</span></font><b><font color="#960000" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: rgb(150, 0, 0); font-weight: bold;" lang="EN-GB">update</span></font></b><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: black;" lang="EN-GB">($dealMatchingBookingRules);</span></font></p>
<p><b><font color="#960000" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: rgb(150, 0, 0); font-weight: bold;" lang="EN-GB">end</span></font></b></p>
<p><font face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana;" lang="EN-GB"> </span></font></p>
<p><font face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana;" lang="EN-GB"> </span></font></p>
<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;"> </span></font></p>
</div>
</div>
<div>
<div class="MsoNormal" style="text-align: center;" align="center"><font face="Times New Roman" size="3"><span style="font-size: 12pt;">
<hr width="100%" align="center" size="2">
</span></font></div>
</div>
<div>
<p class="MsoNormal"><font face="Times New Roman" size="3"><span style="font-size: 12pt;"> </span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="black" face="Times New Roman" size="2"><span style="font-size: 10pt; color: black;">Ce courriel et toutes les pièces jointes
sont confidentiels et peuvent être couverts par un privilège ou une protection
légale. Il est établi à l’attention exclusive de ses destinataires. Toute
utilisation de ce courriel non conforme à sa destination, toute diffusion ou
toute publication, totale ou partielle, est interdite, sauf autorisation
expresse préalable. Toutes opinions exprimées dans ce courriel ne sauraient
nécessairement refléter celle de Natixis, de ses filiales. Elles sont aussi susceptibles
de modification sans notification préalable. Si vous recevez ce courriel par
erreur, merci de le détruire et d’en avertir immédiatement
l’expéditeur. L’Internet ne permettant pas d’assurer
l’intégrité de ce courriel, Natixis décline toute responsabilité
s’il a été altéré, déformé ou falsifié et chaque destinataire qui utilise
ce mode de communication est supposé en accepter les risques.</span></font> </p>
</div>
<div>
<p class="MsoNormal"><font face="Times New Roman" size="3"><span style="font-size: 12pt;"> </span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="black" face="Times New Roman" size="2"><span style="font-size: 10pt; color: black;">This email and any attachment are
confidential and may be legally privileged or otherwise protected from disclosure.
It is intended only for the stated addressee(s) and access to it by any other
person(s) is unauthorised. Any use, dissemination or disclosure not in
accordance with its purpose, either in whole or in part, is prohibited without
our prior formal approval. Any opinion expressed in this email may not
necessarily reflect the opinion of Natixis, its affiliates. It may also be
subject to change without prior notice. If you are not an addressee, you must
not disclose, copy, circulate or in any other way use or rely on the
information contained in this email. If you have received it in error, please
inform us immediately and delete all copies. The Internet can not guarantee the
integrity of this email therefore Natixis shall not be liable for the email if
altered, changed or falsified and anyone who communicates with us by e-mail is
taken to accept these risks.</span></font> </p>
</div>
<div class="MsoNormal" style="text-align: center;" align="center"><font face="Times New Roman" size="3"><span style="font-size: 12pt;">
<hr width="100%" align="center" size="2">
</span></font></div>
</div>
</div>
<p class="MsoNormal" style="margin-bottom: 12pt;"><font face="Times New Roman" size="3"><span style="font-size: 12pt;"><br>
_______________________________________________<br>
rules-users mailing list<br>
<a rel="nofollow" ymailto="mailto:rules-users@lists.jboss.org" target="_blank" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a rel="nofollow" target="_blank" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a></span></font></p>
</div>
<p class="MsoNormal"><font face="Times New Roman" size="3"><span style="font-size: 12pt;"> </span></font></p>
</div>
<div>
<div class="MsoNormal" style="text-align: center;" align="center"><font face="Times New Roman" size="3"><span style="font-size: 12pt;">
<hr width="100%" align="center" size="2">
</span></font></div>
</div>
<div>
<p class="MsoNormal"><font face="Times New Roman" size="3"><span style="font-size: 12pt;"> </span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="black" face="Times New Roman" size="2"><span style="font-size: 10pt; color: black;">Ce courriel et toutes les pièces jointes
sont confidentiels et peuvent être couverts par un privilège ou une protection
légale. Il est établi à l’attention exclusive de ses destinataires. Toute
utilisation de ce courriel non conforme à sa destination, toute diffusion ou
toute publication, totale ou partielle, est interdite, sauf autorisation
expresse préalable. Toutes opinions exprimées dans ce courriel ne sauraient
nécessairement refléter celle de Natixis, de ses filiales. Elles sont aussi
susceptibles de modification sans notification préalable. Si vous recevez ce
courriel par erreur, merci de le détruire et d’en avertir immédiatement
l’expéditeur. L’Internet ne permettant pas d’assurer
l’intégrité de ce courriel, Natixis décline toute responsabilité
s’il a été altéré, déformé ou falsifié et chaque destinataire qui utilise
ce mode de communication est supposé en accepter les risques.</span></font> </p>
</div>
<div>
<p class="MsoNormal"><font face="Times New Roman" size="3"><span style="font-size: 12pt;"> </span></font></p>
</div>
<div>
<p class="MsoNormal"><font color="black" face="Times New Roman" size="2"><span style="font-size: 10pt; color: black;">This email and any attachment are
confidential and may be legally privileged or otherwise protected from
disclosure. It is intended only for the stated addressee(s) and access to it by
any other person(s) is unauthorised. Any use, dissemination or disclosure not
in accordance with its purpose, either in whole or in part, is prohibited
without our prior formal approval. Any opinion expressed in this email may not
necessarily reflect the opinion of Natixis, its affiliates. It may also be
subject to change without prior notice. If you are not an addressee, you must
not disclose, copy, circulate or in any other way use or rely on the
information contained in this email. If you have received it in error, please
inform us immediately and delete all copies. The Internet can not guarantee the
integrity of this email therefore Natixis shall not be liable for the email if
altered, changed or falsified and anyone who communicates with us by e-mail is
taken to accept these risks.</span></font> </p>
</div>
<div class="MsoNormal" style="text-align: center;" align="center"><font face="Times New Roman" size="3"><span style="font-size: 12pt;">
<hr width="100%" align="center" size="2">
</span></font></div>
</div>
</div>
</div>
<div>
</div>
<div>
<hr>
</div>
<div>
<font color="gray" face="Arial" size="1"><span style="font-size: 12pt;"><font face="Arial">
<font color="#000000" face="Times New Roman" size="3">
</font>
</font></span></font> </div>
<div>
<font color="gray"><span style="font-size: 12pt;"><font color="#000000" size="2">Ce courriel et toutes les pièces jointes sont confidentiels et peuvent être couverts par un privilège ou une protection légale. Il est établi à l’attention exclusive de ses destinataires. Toute utilisation de ce courriel non conforme à sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse préalable. Toutes opinions exprimées dans ce courriel ne sauraient nécessairement refléter celle de Natixis, de ses filiales. Elles sont aussi susceptibles de modification sans notification préalable. Si vous recevez ce courriel par erreur, merci de le détruire et d’en avertir immédiatement l’expéditeur. L’Internet ne permettant pas d’assurer l’intégrité de ce courriel, Natixis décline toute responsabilité s’il a été altéré, déformé ou falsifié et chaque destinataire qui utilise ce mode de
communication est supposé en accepter les risques.</font></span></font>
</div>
<div>
<font color="gray"><span style="font-size: 12pt;"></span></font> </div>
<div>
<font color="gray"><span style="font-size: 12pt;"></span></font>
<font color="gray"><span style="font-size: 12pt;"><font color="#000000" size="2">This email and any attachment are confidential and may be legally privileged or otherwise protected from disclosure. It is intended only for the stated addressee(s) and access to it by any other person(s) is unauthorised. Any use, dissemination or disclosure not in accordance with its purpose, either in whole or in part, is prohibited without our prior formal approval. Any opinion expressed in this email may not necessarily reflect the opinion of Natixis, its affiliates. It may also be subject to change without prior notice. If you are not an addressee, you must not disclose, copy, circulate or in any other way use or rely on the information contained in this email. If you have received it in error, please inform us immediately and delete all copies. The Internet can not guarantee the integrity of this email therefore Natixis shall not be liable for the email if altered,
changed or falsified and anyone who communicates with us by e-mail is taken to accept these risks.</font></span></font>
</div>
<p class="MsoNormal">
</p><hr>
<p>
</p>
<p>
</p>
</div></div></div></div><br>
</body></html>