<HTML >
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"MS Mincho";
        panose-1:2 2 6 9 4 2 5 8 3 4;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"\@MS Mincho";
        panose-1:2 2 6 9 4 2 5 8 3 4;}
/* Style Definitions */
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:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:Verdana;
        color:windowtext;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
@page Section1
        {size:595.3pt 841.9pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.Section1
        {page:Section1;}
/* List Definitions */
@list l0
        {mso-list-id:908618385;
        mso-list-type:hybrid;
        mso-list-template-ids:92689466 67895311 67895321 67895323 67895311 67895321 67895323 67895311 67895321 67895323;}
@list l0:level1
        {mso-level-tab-stop:36.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level2
        {mso-level-tab-stop:72.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level3
        {mso-level-tab-stop:108.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level4
        {mso-level-tab-stop:144.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level5
        {mso-level-tab-stop:180.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level6
        {mso-level-tab-stop:216.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level7
        {mso-level-tab-stop:252.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level8
        {mso-level-tab-stop:288.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level9
        {mso-level-tab-stop:324.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1
        {mso-list-id:1682783593;
        mso-list-type:hybrid;
        mso-list-template-ids:625607584 67895311 67895321 67895323 67895311 67895321 67895323 67895311 67895321 67895323;}
@list l1:level1
        {mso-level-tab-stop:39.75pt;
        mso-level-number-position:left;
        margin-left:39.75pt;
        text-indent:-18.0pt;}
@list l1:level2
        {mso-level-tab-stop:72.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level3
        {mso-level-tab-stop:108.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level4
        {mso-level-tab-stop:144.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level5
        {mso-level-tab-stop:180.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level6
        {mso-level-tab-stop:216.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level7
        {mso-level-tab-stop:252.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level8
        {mso-level-tab-stop:288.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level9
        {mso-level-tab-stop:324.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l2
        {mso-list-id:1988315525;
        mso-list-type:hybrid;
        mso-list-template-ids:1409967554 67895297 67895299 67895301 67895297 67895299 67895301 67895297 67895299 67895301;}
@list l2:level1
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:36.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
-->
</style>
</HEAD>
<BODY lang=FR link=blue vlink=purple>
<DIV>
<DIV>
<div class=Section1>
<p class=MsoNormal><font size=2 face=Verdana><span lang=EN-GB style='font-size:
10.0pt;font-family:Verdana'>Hello,<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Verdana><span lang=EN-GB style='font-size:
10.0pt;font-family:Verdana'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Verdana><span lang=EN-GB style='font-size:
10.0pt;font-family:Verdana'>I would like to improve the performance of my
Drools process, I have already done some enhancements like removing the use of “collect”
and “eval”.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Verdana><span lang=EN-GB style='font-size:
10.0pt;font-family:Verdana'>I must say I’m a Drools newbie struggling to determine
what causes my performance problems. <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Verdana><span lang=EN-GB style='font-size:
10.0pt;font-family:Verdana'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Verdana><span lang=EN-GB style='font-size:
10.0pt;font-family:Verdana'>Before asking, I need to explain in few words the
problem I want to solve with Drools :<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Verdana><span lang=EN-GB style='font-size:
10.0pt;font-family:Verdana'>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”.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Verdana><span lang=EN-GB style='font-size:
10.0pt;font-family:Verdana'>Booking is done according to booking criteria : which
trader has made the deal ? on which product ? etc … <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Verdana><span lang=EN-GB style='font-size:
10.0pt;font-family:Verdana'>A booking rule defines a set of criteria and the
target book where the deal will classified. <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Verdana><span lang=EN-GB style='font-size:
10.0pt;font-family:Verdana'>I’m using Drools to :<o:p></o:p></span></font></p>
<ol style='margin-top:0cm' start=1 type=1>
<li class=MsoNormal style='mso-list:l0 level1 lfo1'><font size=2 face=Verdana><span
lang=EN-GB style='font-size:10.0pt;font-family:Verdana'>find all booking
rules matching deals made by traders</span></font><span lang=EN-GB> </span><font
size=2 face=Verdana><span lang=EN-GB style='font-size:10.0pt;font-family:
Verdana'><o:p></o:p></span></font></li>
<li class=MsoNormal style='mso-list:l0 level1 lfo1'><font size=2 face=Verdana><span
lang=EN-GB style='font-size:10.0pt;font-family:Verdana'>apply the right
booking rule on the deal among the ones matching the deal (i.e. that is
book the deal)<o:p></o:p></span></font></li>
</ol>
<p class=MsoNormal><font size=2 face=Verdana><span lang=EN-GB style='font-size:
10.0pt;font-family:Verdana'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Verdana><span lang=EN-GB style='font-size:
10.0pt;font-family:Verdana'>I’m testing the booking process with 1000
deals and 229 booking rule.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Verdana><span lang=EN-GB style='font-size:
10.0pt;font-family:Verdana'>It takes 60 seconds for Drools to book the 1000
deals, which is too slow to be put in production.  <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Verdana><span lang=EN-GB style='font-size:
10.0pt;font-family:Verdana'>On the 60 seconds, I have 7 seconds for facts
insertion and the remaining for process (after session.fireAllRules)<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Verdana><span lang=EN-GB style='font-size:
10.0pt;font-family:Verdana'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Verdana><span lang=EN-GB style='font-size:
10.0pt;font-family:Verdana'>Do you think such numbers are normal/expected ? <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Verdana><span lang=EN-GB style='font-size:
10.0pt;font-family:Verdana'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Verdana><span lang=EN-GB style='font-size:
10.0pt;font-family:Verdana'>Like I said I don’t really know where the
performance bottlenecks are … I’m thinking of exploring the
following possibilities :<o:p></o:p></span></font></p>
<ul style='margin-top:0cm' type=disc>
<li class=MsoNormal style='mso-list:l2 level1 lfo4'><font size=2 face=Verdana><span
lang=EN-GB style='font-size:10.0pt;font-family:Verdana'>splitting my rules
into very simple rules <o:p></o:p></span></font></li>
<li class=MsoNormal style='mso-list:l2 level1 lfo4'><font size=2 face=Verdana><span
lang=EN-GB style='font-size:10.0pt;font-family:Verdana'>starting the
booking process with fewer data and running it several times (instead of one
booking process on 1000, run 10 booking processes on 100 deals each)<o:p></o:p></span></font></li>
</ul>
<p class=MsoNormal><font size=2 face=Verdana><span lang=EN-GB style='font-size:
10.0pt;font-family:Verdana'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Verdana><span lang=EN-GB style='font-size:
10.0pt;font-family:Verdana'>I have put my rules code below (for courageous people),
if you see some obvious performance problems or if you can give some hint to
explore, you would be very welcome. <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Verdana><span lang=EN-GB style='font-size:
10.0pt;font-family:Verdana'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Verdana><span lang=EN-GB style='font-size:
10.0pt;font-family:Verdana'>Thanks in advance for your lights, <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Verdana><span lang=EN-GB style='font-size:
10.0pt;font-family:Verdana'>Regards,<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=blue face=Verdana><span lang=EN-GB
style='font-size:10.0pt;font-family:Verdana;color:blue'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Verdana><span lang=EN-GB style='font-size:
10.0pt;font-family:Verdana'>Joël Costigliola</span></font><span lang=EN-GB><o:p></o:p></span></p>
<p class=MsoNormal><font size=2 face=Verdana><span lang=EN-GB style='font-size:
10.0pt;font-family:Verdana'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Verdana><span lang=EN-GB style='font-size:
10.0pt;font-family:Verdana'>Ps : rules details <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Verdana><span lang=EN-GB style='font-size:
10.0pt;font-family:Verdana'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Verdana><span lang=EN-GB style='font-size:
10.0pt;font-family:Verdana'>I have defined a flow composed of 3 steps/rules
group, each group has one rule, here’s the flow and the rules.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Verdana><span lang=EN-GB style='font-size:
10.0pt;font-family:Verdana'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Verdana><span lang=EN-GB style='font-size:
10.0pt;font-family:Verdana'>Flow : <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Verdana><span lang=EN-GB style='font-size:
10.0pt;font-family:Verdana'>------<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=green face="Courier New"><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";color:green'>"Find
matching booking rules" -> "Refresh" -> "Apply
booking rule group"<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span lang=EN-GB
style='font-size:10.0pt;font-family:"Courier New"'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Verdana><span lang=EN-GB style='font-size:
10.0pt;font-family:Verdana'>Rules :<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Verdana><span lang=EN-GB style='font-size:
10.0pt;font-family:Verdana'>------<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Verdana><span lang=EN-GB style='font-size:
10.0pt;font-family:Verdana'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Verdana><span lang=EN-GB style='font-size:
10.0pt;font-family:Verdana'>The job of this rule is to store in </span></font><font
size=2 color=black face="Courier New"><span lang=EN-GB style='font-size:10.0pt;
font-family:"Courier New";color:black'>DealMatchingBookingRules </span></font><font
size=2 face=Verdana><span lang=EN-GB style='font-size:10.0pt;font-family:Verdana'>all
the booking rule matching a specific deal (each </span></font><font size=2
color=black face="Courier New"><span lang=EN-GB style='font-size:10.0pt;
font-family:"Courier New";color:black'>DealMatchingBookingRules </span></font><font
size=2 face=Verdana><span lang=EN-GB style='font-size:10.0pt;font-family:Verdana'>instance
has a unique Deal).<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Verdana><span lang=EN-GB style='font-size:
10.0pt;font-family:Verdana'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><b><font size=2 color="#960000"
face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";
color:#960000;font-weight:bold'>rule</span></font></b><font size=2 color=black
face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";
color:black'> </span></font><font size=2 color=green face="Courier New"><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";color:green'>"Find
matching level 1 booking rules by deal"</span></font><font size=2
face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";
color:black'>  </span></font><b><font size=2 color="#960000" face="Courier New"><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";color:#960000;
font-weight:bold'>salience</span></font></b><font size=2 color=black
face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";
color:black'> 10</span></font><font size=2 face="Courier New"><span lang=EN-GB
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";
color:black'>  </span></font><b><font size=2 color="#960000" face="Courier New"><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";color:#960000;
font-weight:bold'>no-loop</span></font></b><font size=2 color=black
face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";
color:black'> </span></font><font size=2 face="Courier New"><span lang=EN-GB
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";
color:black'>  </span></font><b><font size=2 color="#960000" face="Courier New"><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";color:#960000;
font-weight:bold'>ruleflow-group</span></font></b><font size=2 color=black
face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";
color:black'> </span></font><font size=2 color=green face="Courier New"><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";color:green'>"Find
level 1 matching booking rules by deal group"</span></font><font size=2
face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";
color:black'>  </span></font><font size=2 face="Courier New"><span lang=EN-GB
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";
color:black'>  </span></font><b><font size=2 color="#960000" face="Courier New"><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";color:#960000;
font-weight:bold'>when</span></font></b><font size=2 face="Courier New"><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";
color:black'>    $dealMatchingBookingRules :
DealMatchingBookingRules($dealModel : deal, $dealProductRelatedIndexes :
dealProductRelatedIndexes)</span></font><font size=2 face="Courier New"><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";
color:black'>    $bookingRule : BTExecutionBookingRuleModel (</span></font><font
size=2 face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:
"Courier New"'><o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";
color:black'>      priority == 1</span></font><font size=2 face="Courier New"><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";
color:black'>      </span></font><font size=2 color=olive face="Courier New"><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";color:olive'>//
when a criterion is not set, it is considered as satisfied. </span></font><font
size=2 face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:
"Courier New"'><o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";
color:black'>      && (traderCriterion == </span></font><b><font
size=2 color="#960000" face="Courier New"><span lang=EN-GB style='font-size:
10.0pt;font-family:"Courier New";color:#960000;font-weight:bold'>null</span></font></b><font
size=2 color=black face="Courier New"><span lang=EN-GB style='font-size:10.0pt;
font-family:"Courier New";color:black'> || $dealModel.trader ==
traderCriterion)</span></font><font size=2 face="Courier New"><span lang=EN-GB
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";
color:black'>      && (portfolioCriterion == </span></font><b><font
size=2 color="#960000" face="Courier New"><span lang=EN-GB style='font-size:
10.0pt;font-family:"Courier New";color:#960000;font-weight:bold'>null</span></font></b><font
size=2 color=black face="Courier New"><span lang=EN-GB style='font-size:10.0pt;
font-family:"Courier New";color:black'> || $dealModel.portfolio ==
portfolioCriterion)</span></font><font size=2 face="Courier New"><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";
color:black'>      </span></font><font size=2 color=olive face="Courier New"><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";color:olive'>//
when a product type criterion is set to unknown, it is considered as satisfied
whatever deal product type is. </span></font><font size=2 face="Courier New"><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";
color:black'>      && (productTypeStringCriterion == </span></font><b><font
size=2 color="#960000" face="Courier New"><span lang=EN-GB style='font-size:
10.0pt;font-family:"Courier New";color:#960000;font-weight:bold'>null</span></font></b><font
size=2 color=black face="Courier New"><span lang=EN-GB style='font-size:10.0pt;
font-family:"Courier New";color:black'> || productTypeCriterion ==
ProductType.Unknown  </span></font><font size=2 face="Courier New"><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";
color:black'>          || $dealModel.product.productType ==
productTypeCriterion)  </span></font><font size=2 face="Courier New"><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";
color:black'>      && (listedIndexCriterion == </span></font><b><font
size=2 color="#960000" face="Courier New"><span lang=EN-GB style='font-size:
10.0pt;font-family:"Courier New";color:#960000;font-weight:bold'>null</span></font></b><font
size=2 color=black face="Courier New"><span lang=EN-GB style='font-size:10.0pt;
font-family:"Courier New";color:black'> || $dealProductRelatedIndexes.relatedIndexes
</span></font><b><font size=2 color="#960000" face="Courier New"><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";color:#960000;
font-weight:bold'>contains</span></font></b><font size=2 color=black
face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";
color:black'> listedIndexCriterion)</span></font><font size=2 face="Courier New"><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";
color:black'>    )</span></font><font size=2 face="Courier New"><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";
color:black'>  </span></font><b><font size=2 color="#960000" face="Courier New"><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";color:#960000;
font-weight:bold'>then</span></font></b><font size=2 face="Courier New"><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";
color:black'>      Logger log = LoggerFactory.getLogger(</span></font><font
size=2 color=green face="Courier New"><span lang=EN-GB style='font-size:10.0pt;
font-family:"Courier New";color:green'>"Matching booking rules
LOGGER"</span></font><font size=2 color=black face="Courier New"><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";color:black'>);</span></font><font
size=2 face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:
"Courier New"'><o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";
color:black'>      log.info(</span></font><font size=2 color=green
face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";
color:green'>"Found a level 1 matching rule for deal : "</span></font><font
size=2 color=black face="Courier New"><span lang=EN-GB style='font-size:10.0pt;
font-family:"Courier New";color:black'> + $dealModel + </span></font><font
size=2 color=green face="Courier New"><span lang=EN-GB style='font-size:10.0pt;
font-family:"Courier New";color:green'>", rule is "</span></font><font
size=2 color=black face="Courier New"><span lang=EN-GB style='font-size:10.0pt;
font-family:"Courier New";color:black'> + $bookingRule);</span></font><font
size=2 face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:
"Courier New"'><o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";
color:black'>    $dealMatchingBookingRules.addMatchingBookingRule($bookingRule);</span></font><font
size=2 face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:
"Courier New"'><o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><b><font size=2 color="#960000"
face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";
color:#960000;font-weight:bold'>end</span></font></b><font size=2
face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 color=olive
face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";
color:olive'>// used to tell Drools that our $dealMatchingBookingRules are
ready for next step in flow</span></font><font size=2 face="Courier New"><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><b><font size=2 color="#960000"
face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";
color:#960000;font-weight:bold'>rule</span></font></b><font size=2 color=black
face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";
color:black'> </span></font><font size=2 color=green face="Courier New"><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";color:green'>"Refresh
facts in level 1 booking rule process"</span></font><font size=2
face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";
color:black'>  </span></font><b><font size=2 color="#960000" face="Courier New"><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";color:#960000;
font-weight:bold'>salience</span></font></b><font size=2 color=black
face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";
color:black'> 5</span></font><font size=2 face="Courier New"><span lang=EN-GB
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";
color:black'>  </span></font><b><font size=2 color="#960000" face="Courier New"><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";color:#960000;
font-weight:bold'>no-loop</span></font></b><font size=2 color=black
face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";
color:black'> </span></font><font size=2 face="Courier New"><span lang=EN-GB
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";
color:black'>  </span></font><b><font size=2 color="#960000" face="Courier New"><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";color:#960000;
font-weight:bold'>ruleflow-group</span></font></b><font size=2 color=black
face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";
color:black'> </span></font><font size=2 color=green face="Courier New"><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";color:green'>"Refresh
facts in level 1 booking rule process group"</span></font><font size=2
face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";
color:black'>  </span></font><font size=2 face="Courier New"><span lang=EN-GB
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";
color:black'>  </span></font><b><font size=2 color="#960000" face="Courier New"><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";color:#960000;
font-weight:bold'>when</span></font></b><font size=2 face="Courier New"><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";
color:black'>    $dealMatchingBookingRules : DealMatchingBookingRules()</span></font><font
size=2 face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:
"Courier New"'><o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";
color:black'>  </span></font><b><font size=2 color="#960000" face="Courier New"><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";color:#960000;
font-weight:bold'>then</span></font></b><font size=2 face="Courier New"><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";
color:black'>    </span></font><b><font size=2 color="#960000"
face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";
color:#960000;font-weight:bold'>update</span></font></b><font size=2
color=black face="Courier New"><span lang=EN-GB style='font-size:10.0pt;
font-family:"Courier New";color:black'>($dealMatchingBookingRules);</span></font><font
size=2 face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:
"Courier New"'><o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><b><font size=2 color="#960000"
face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";
color:#960000;font-weight:bold'>end</span></font></b><font size=2
face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";
color:black'>  </span></font><font size=2 face="Courier New"><span lang=EN-GB
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><b><font size=2 color="#960000"
face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";
color:#960000;font-weight:bold'>rule</span></font></b><font size=2 color=black
face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";
color:black'> </span></font><font size=2 color=green face="Courier New"><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";color:green'>"Apply
level 1 booking rule"</span></font><font size=2 face="Courier New"><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";
color:black'>  </span></font><b><font size=2 color="#960000" face="Courier New"><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";color:#960000;
font-weight:bold'>no-loop</span></font></b><font size=2 color=black
face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";
color:black'> </span></font><font size=2 face="Courier New"><span lang=EN-GB
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";
color:black'>  </span></font><b><font size=2 color="#960000" face="Courier New"><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";color:#960000;
font-weight:bold'>ruleflow-group</span></font></b><font size=2 color=black
face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";
color:black'> </span></font><font size=2 color=green face="Courier New"><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";color:green'>"Apply
level 1 booking rule group"</span></font><font size=2 face="Courier New"><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";
color:black'>  </span></font><font size=2 face="Courier New"><span lang=EN-GB
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";
color:black'>  </span></font><b><font size=2 color="#960000" face="Courier New"><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";color:#960000;
font-weight:bold'>when</span></font></b><font size=2 face="Courier New"><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";
color:black'>    $dealMatchingBookingRules :
DealMatchingBookingRules(hasSingleMatchingLevel1BookingRule == </span></font><b><font
size=2 color="#960000" face="Courier New"><span lang=EN-GB style='font-size:
10.0pt;font-family:"Courier New";color:#960000;font-weight:bold'>true</span></font></b><font
size=2 color=black face="Courier New"><span lang=EN-GB style='font-size:10.0pt;
font-family:"Courier New";color:black'>)</span></font><font size=2
face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";
color:black'>  </span></font><b><font size=2 color="#960000" face="Courier New"><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";color:#960000;
font-weight:bold'>then</span></font></b><font size=2 face="Courier New"><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";
color:black'>    BTExecutionBookingRuleModel effectiveBookingRuleModel =
$dealMatchingBookingRules.getSingleMatchingLevel1BookingRule();</span></font><font
size=2 face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:
"Courier New"'><o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";
color:black'>    effectiveBookingRuleModel.applyRuleOnDeal($dealMatchingBookingRules.getDeal());</span></font><font
size=2 face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:
"Courier New"'><o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";
color:black'>    </span></font><b><font size=2 color="#960000"
face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";
color:#960000;font-weight:bold'>retract</span></font></b><font size=2
color=black face="Courier New"><span lang=EN-GB style='font-size:10.0pt;
font-family:"Courier New";color:black'>($dealMatchingBookingRules);</span></font><font
size=2 face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:
"Courier New"'><o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><b><font size=2 color="#960000"
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:#960000;font-weight:bold'>end</span></font></b><font size=2
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Verdana><span lang=EN-GB style='font-size:
10.0pt;font-family:Verdana'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Verdana><span lang=EN-GB style='font-size:
10.0pt;font-family:Verdana'><o:p> </o:p></span></font></p>
</div>
</DIV>
<DIV>
</DIV>
<DIV>
<HR>
</DIV>
<DIV ALIGN="justify">
<FONT FACE="Arial" COLOR="gray" SIZE="1"><SPAN STYLE="FONT-SIZE: 12pt"><FONT FACE="Arial">
<FONT FACE="Times New Roman" COLOR="#000000" SIZE="3">
</FONT>
</FONT></SPAN></FONT> </DIV>
<DIV ALIGN="justify">
<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 ALIGN="justify">
<FONT COLOR="gray"><SPAN STYLE="FONT-SIZE: 12pt"></SPAN></FONT> </DIV>
<DIV ALIGN="justify">
<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" ALIGN="justify">
<HR>
<P>
</P>
<P>
</P>
</P>
</DIV></BODY></HTML>