<HTML xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<HEAD><!-- Template generated by Exclaimer Template Editor on 01:20:35 Saturday, 1 December 2012 -->
<STYLE type=text/css>P.db79a690-48c3-4196-8cf2-1f07a53cc4b4 {
        MARGIN: 0cm 0cm 0pt
}
LI.db79a690-48c3-4196-8cf2-1f07a53cc4b4 {
        MARGIN: 0cm 0cm 0pt
}
DIV.db79a690-48c3-4196-8cf2-1f07a53cc4b4 {
        MARGIN: 0cm 0cm 0pt
}
TABLE.db79a690-48c3-4196-8cf2-1f07a53cc4b4Table {
        MARGIN: 0cm 0cm 0pt
}
DIV.Section1 {
        page: Section1
}
</STYLE>

<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:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@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;}
@font-face
        {font-family:"Lucida Console";
        panose-1:2 11 6 9 4 5 4 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
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;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
        {mso-style-priority:99;
        mso-style-link:"Plain Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Lucida Console";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.PlainTextChar
        {mso-style-name:"Plain Text Char";
        mso-style-priority:99;
        mso-style-link:"Plain Text";
        font-family:"Lucida Console";}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:1647666402;
        mso-list-type:hybrid;
        mso-list-template-ids:-1795808234 1552816158 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l0:level1
        {mso-level-start-at:5;
        mso-level-number-format:bullet;
        mso-level-text:\F0D8;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Wingdings;
        mso-fareast-font-family:Calibri;
        mso-bidi-font-family:"Times New Roman";}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
--></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]-->
</HEAD>

<BODY lang="EN-US" link="blue" vlink="purple">
<P>
<div class="WordSection1">
<p class="MsoPlainText" style="margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo1">
<![if !supportLists]><span style=font-family:Wingdings><span style=mso-list:Ignore>Ø<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;
</span></span></span><![endif]>Why not a single Pattern?<o:p></o:p></p>
<p class="MsoPlainText" style="margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo1">
<![if !supportLists]><span style=font-family:Wingdings><span style=mso-list:Ignore>Ø<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;
</span></span></span><![endif]>&nbsp;&nbsp;&nbsp;&nbsp;fact:InsertedFactPOJO(countdownLatch == 0) If (and only if) there is not more than a single InsertedFactPOJO in WM it doesn't matter (except confuse readers) but otherwise it produces more or less disturbing effects.<o:p></o:p></p>
<p class="MsoPlainText"><span style=color:#002060><o:p>&nbsp;</o:p></span></p>
<p class="MsoPlainText"><span style=font-size:11.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:blue>Interesting.&nbsp; For my case (luckily?)&nbsp; I have a flow of control that definitely only includes a single InsertedFactPOJO in WM.<o:p></o:p></span></p>
<p class="MsoPlainText"><span style=font-size:11.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:blue><o:p>&nbsp;</o:p></span></p>
<p class="MsoPlainText"><span style=font-size:11.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:blue>Where can I best isolate my Drools readings, sample exercises et. al. Drools discovery efforts so that I can (some day) competently answer your question &#8220;Why
 not a single pattern?&#8221;&nbsp; &#8230;. Is there a place in the Drools literature that explicitly addresses these &#8220;disturbing effects&#8221;?<o:p></o:p></span></p>
<p class="MsoPlainText"><span style=font-size:11.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:blue><o:p>&nbsp;</o:p></span></p>
<p class="MsoPlainText"><span style=font-size:11.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:blue>THANKS WOLFGANG!<o:p></o:p></span></p>
<p class="MsoPlainText"><span style=font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:blue>&#8230;<o:p></o:p></span></p>
<p class="MsoPlainText"><o:p>&nbsp;</o:p></p>
<p class="MsoPlainText">-----Original Message-----<br />
From: rules-users-bounces@lists.jboss.org [mailto:rules-users-bounces@lists.jboss.org] On Behalf Of Wolfgang Laun<br />
Sent: Friday, November 30, 2012 2:22 AM<br />
To: Rules Users List<br />
Subject: Re: [rules-users] DROOLs 'Guarded entry/block' tactics for Rules synchronization and ordinality?<o:p></o:p></p>
<p class="MsoPlainText"><o:p>&nbsp;</o:p></p>
<p class="MsoPlainText">On 30/11/2012, Greg Barton &lt;<a href="mailto:greg_barton@yahoo.com"><span style=color:windowtext;text-decoration:none>greg_barton@yahoo.com</span></a>&gt; wrote:<o:p></o:p></p>
<p class="MsoPlainText">&gt; Not a problem.&nbsp; Actually I prefer to perform flow control using
<o:p></o:p></p>
<p class="MsoPlainText">&gt; working memory objects like that instead of using the keywords, but I'm old school.<o:p></o:p></p>
<p class="MsoPlainText">&gt; :)<o:p></o:p></p>
<p class="MsoPlainText">&gt;<o:p>&nbsp;</o:p></p>
<p class="MsoPlainText">&gt; GreG<o:p></o:p></p>
<p class="MsoPlainText"><o:p>&nbsp;</o:p></p>
<p class="MsoPlainText">Agenda groups provide a mechanism that's difficult to emulate using &quot;guard objects&quot;, i.e., the stack-ish behaviour, with automatic return to the previously active group once all activations of the current group are exhausted.<o:p></o:p></p>
<p class="MsoPlainText"><o:p>&nbsp;</o:p></p>
<p class="MsoPlainText">&gt;&gt; From: &quot;Cotton, Ben&quot; &lt;<a href="mailto:Ben.Cotton@morganstanley.com"><span style=color:windowtext;text-decoration:none>Ben.Cotton@morganstanley.com</span></a>&gt;<o:p></o:p></p>
<p class="MsoPlainText">&gt;&gt;<o:p>&nbsp;</o:p></p>
<p class="MsoPlainText">&gt;&gt; I now want to (competently!) use DROOLs language tactics that give me
<o:p></o:p></p>
<p class="MsoPlainText">&gt;&gt; ever finer grained control over managing rule set firing behavior on
<o:p></o:p></p>
<p class="MsoPlainText">&gt;&gt; Fact mutation events.&nbsp; Specifically, I want to be able to implement
<o:p></o:p></p>
<p class="MsoPlainText">&gt;&gt; some form of &#8216;Guarded entry/block&#8217; controls.<o:p></o:p></p>
<p class="MsoPlainText"><o:p>&nbsp;</o:p></p>
<p class="MsoPlainText">There may be some good reason for &quot;fine grained control&quot; every now and then, but basically this contravenes the fundamental idea of rules being perfectly capable of determining the right order - if written correctly, that is, by judiciously
 selecting fact properties by constraints.<o:p></o:p></p>
<p class="MsoPlainText"><o:p>&nbsp;</o:p></p>
<p class="MsoPlainText">&gt;&gt; rule &quot;RULE_ALL_RULES_HAVE_FIRED_ONCE_ORDINALLY&quot;<o:p></o:p></p>
<p class="MsoPlainText">&gt;&gt; when<o:p></o:p></p>
<p class="MsoPlainText">&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; fact:InsertedFactPOJO()<o:p></o:p></p>
<p class="MsoPlainText">&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; InsertedFactPOJO(countdownLatch == 0) then<o:p></o:p></p>
<p class="MsoPlainText"><o:p>&nbsp;</o:p></p>
<p class="MsoPlainText">Why not a single Pattern?<o:p></o:p></p>
<p class="MsoPlainText">&nbsp;&nbsp;&nbsp; fact:InsertedFactPOJO(countdownLatch == 0) If (and only if) there is not more than a single InsertedFactPOJO in WM it doesn't matter (except confuse readers) but otherwise it produces more or less disturbing effects.<o:p></o:p></p>
<p class="MsoPlainText"><o:p>&nbsp;</o:p></p>
<p class="MsoPlainText">-W<o:p></o:p></p>
<p class="MsoPlainText"><o:p>&nbsp;</o:p></p>
<p class="MsoPlainText">_______________________________________________<o:p></o:p></p>
<p class="MsoPlainText">rules-users mailing list<o:p></o:p></p>
<p class="MsoPlainText"><a href="mailto:rules-users@lists.jboss.org"><span style=color:windowtext;text-decoration:none>rules-users@lists.jboss.org</span></a><o:p></o:p></p>
<p class="MsoPlainText"><a href="https://lists.jboss.org/mailman/listinfo/rules-users"><span style=color:windowtext;text-decoration:none>https://lists.jboss.org/mailman/listinfo/rules-users</span></a><o:p></o:p></p>
</div>
<BR /><BR />
<HR id=HR1 />
<BR /><SPAN style="FONT-FAMILY: Arial; COLOR: #808080; FONT-SIZE: 7.5pt">NOTICE: 
Morgan Stanley is not acting as a municipal advisor and the opinions or views 
contained herein are not intended to be, and do not constitute, advice within 
the meaning of Section 975 of the Dodd-Frank Wall Street Reform and Consumer 
Protection Act. If you have received this communication in error, please destroy 
all electronic and paper copies and notify the sender immediately. 
Mistransmission is not intended to waive confidentiality or privilege. Morgan 
Stanley reserves the right, to the extent permitted under applicable law, to 
monitor electronic communications. This message is subject to terms available at 
the following link: <A style="FONT-FAMILY: Arial; COLOR: #808080; FONT-SIZE: 7.5pt" href="http://www.morganstanley.com/disclaimers">http://www.morganstanley.com/disclaimers</A> 
If you cannot access these links, please notify us by reply message and we will 
send the contents to you. By messaging with Morgan Stanley you consent to the 
foregoing.</SPAN><BR />
<P></P>
<P></P></P></BODY>
</HTML>