<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><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 12 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Inconsolata;
        panose-1:0 0 0 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        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.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
span.E-MailFormatvorlage18
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=DE-AT link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span lang=EN-GB>Hi all!<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-GB>We have the problem that the following rule never fires:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB><o:p>&nbsp;</o:p></span></p><p class=MsoNormal style='text-autospace:none'><b><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata;color:#960000'>rule</span></b><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata;color:black'> </span><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata;color:green'>&quot;test-rule&quot;</span><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata;color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata;color:#960000'>agenda-group</span></b><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata;color:black'> </span><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata;color:green'>&quot;evaluation&quot;</span><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata;color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata;color:#960000'>salience</span></b><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata;color:black'> 100</span><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata;color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata;color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata;color:#960000'>when</span></b><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata;color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $cue : AnalysisCue() </span><b><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata;color:#960000'>from</span></b><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata;color:black'> entry-point </span><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata;color:green'>&quot;LowLevelCueStream&quot;</span><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata;color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata;color:#960000'>not</span></b><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata;color:black'>(AnalysisCue(</span><b><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata;color:#960000'>this</span></b><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata;color:black'> after[0ms,2500ms] $cue) </span><b><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata;color:#960000'>from</span></b><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata;color:black'> entry-point </span><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata;color:green'>&quot;LowLevelCueStream&quot;</span><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata;color:black'>)</span><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata;color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata;color:#960000'>then</span></b><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata;color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; logger.debug(</span><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata;color:green'>&quot;... some message ..&quot;</span><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata;color:black'>);</span><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata'><o:p></o:p></span></p><p class=MsoNormal><b><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata;color:#960000'>end</span></b><span lang=EN-GB><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-GB>We found out that the problem is the combination of the negation with the conditional element &#8220;not&#8221; and the temporal constraint &#8220;[0ms,2500ms]&#8221;. Using the temporal operator &#8220;this after $cue&#8221; without a temporal constraint works correct in its semantics.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB>Interestingly, when adding a constraint (cueType == 1) to the type in the negative pattern the rule begins to work. The rule would look like as follows:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB><o:p>&nbsp;</o:p></span></p><p class=MsoNormal style='text-autospace:none'><b><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata;color:#960000'>rule</span></b><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata;color:black'> </span><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata;color:green'>&quot;test-rule&quot;</span><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata;color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata;color:#960000'>agenda-group</span></b><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata;color:black'> </span><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata;color:green'>&quot;evaluation&quot;</span><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata;color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata;color:#960000'>salience</span></b><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata;color:black'> 100</span><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata;color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata;color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata;color:#960000'>when</span></b><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata;color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $cue : AnalysisCue() </span><b><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata;color:#960000'>from</span></b><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata;color:black'> entry-point </span><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata;color:green'>&quot;LowLevelCueStream&quot;</span><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata;color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata;color:#960000'>not</span></b><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata;color:black'>(AnalysisCue(cueType == 1, </span><b><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata;color:#960000'>this</span></b><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata;color:black'> after[0ms,2500ms] $cue) </span><b><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata;color:#960000'>from</span></b><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata;color:black'> entry-point </span><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata;color:green'>&quot;LowLevelCueStream&quot;</span><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata;color:black'>)</span><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata;color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata;color:#960000'>then</span></b><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata;color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; logger.debug(</span><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata;color:green'>&quot;... some message ..&quot;</span><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata;color:black'>);</span><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata'><o:p></o:p></span></p><p class=MsoNormal><b><span lang=EN-GB style='font-size:10.0pt;font-family:Inconsolata;color:#960000'>end</span></b><span lang=EN-GB><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-GB>unfortunately the rule then fires with a delay of 4 to 5 seconds. The second parameter of the temporal constraint influences the delay.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB>When changing the first parameter of the temporal constraint to a value greater than 0 the rule works as expected! The constraint would then look like as follows: &#8220;[1ms, 2500ms]&#8221;. Whereas in our case, we want to evaluate the time window from 0 &#8211; 2500ms.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-GB>Our system works in the stream mode and we could reproduce this behaviour with the versions 5.3.1 and 5.4.0 Beta 1. <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB>Can anybody confirm if this is a bug in Drools, or did I overlook here something?<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-GB><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-GB>Best regards,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB>Wolfgang Weiss<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB><o:p>&nbsp;</o:p></span></p></div></body></html>