<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#ffffff">
    <br>
    <br>
    Op 17-01-12 10:41, Mark Proctor schreef:
    <blockquote cite="mid:4F15424D.8030403@codehaus.org" type="cite">
      <meta content="text/html; charset=ISO-8859-1"
        http-equiv="Content-Type">
      On 17/01/2012 08:27, Weiss, Wolfgang wrote:
      <blockquote
cite="mid:6547E177D45A2C47A5E29F0F733EC3C5014DD95C8A86@RZJC1EX.jr1.local"
        type="cite">
        <meta http-equiv="Content-Type" content="text/html;
          charset=ISO-8859-1">
        <meta name="Generator" content="Microsoft Word 12 (filtered
          medium)">
        <style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Inconsolata;
        panose-1:2 11 6 9 3 0 3 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","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;}
span.hoenzb
        {mso-style-name:hoenzb;}
span.E-MailFormatvorlage18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@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]-->
        <div class="WordSection1">
          <p class="MsoNormal"><span style="font-size: 11pt;
              font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;
              color: rgb(31, 73, 125);" lang="EN-GB">Thank you for the
              quick answer! This makes absolutely sense and the rules
              work now as expected.<o:p></o:p></span></p>
          <p class="MsoNormal"><span style="font-size: 11pt;
              font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;
              color: rgb(31, 73, 125);" lang="EN-GB">Unfortunately, I
              was not able to find this somewhere in the documentation.
              It would be nice to see it in the documentation of drools
              fusion. <o:p></o:p></span></p>
          <p class="MsoNormal"><span style="font-size: 11pt;
              font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;
              color: rgb(31, 73, 125);" lang="EN-GB"><o:p>&nbsp;</o:p></span></p>
        </div>
      </blockquote>
      Documentation is something anyone can do with a spare 10 minutes:<br>
      1) install git<br>
      2) install xmlmind<br>
      3) "fork" drools on github, <a moz-do-not-send="true"
        class="moz-txt-link-freetext"
        href="https://github.com/droolsjbpm/drools">https://github.com/droolsjbpm/drools</a><br>
      4) clone your fork locally<br>
      5) make changes to files with xmlmind, or xml editor of choice<br>
      <a moz-do-not-send="true" class="moz-txt-link-freetext"
href="https://github.com/droolsjbpm/drools/tree/master/drools-docs/drools-fusion-docs/src/main/docbook/en-US">https://github.com/droolsjbpm/drools/tree/master/drools-docs/drools-fusion-docs/src/main/docbook/en-US</a><br>
      6) commit changes, push changes back to github<br>
      7) use github gui to submit a pull request for your changes.<br>
      <br>
      It'll be more obvious to users what documentation is missing, and
      they'll be able to word it better in a way that makes more sense
      to other users.<br>
    </blockquote>
    If it's just a typo you want to fix, there's a very fast method:<br>
    1) Go to github to the correct file, for example:<br>
<a class="moz-txt-link-freetext" href="https://github.com/droolsjbpm/drools/blob/master/drools-docs/drools-fusion-docs/src/main/docbook/en-US/Chapter-Features/Chapter-Events/Section-Events_Semantics.xml">https://github.com/droolsjbpm/drools/blob/master/drools-docs/drools-fusion-docs/src/main/docbook/en-US/Chapter-Features/Chapter-Events/Section-Events_Semantics.xml</a><br>
    2) Click "Edit this file", edit it and save<br>
    3) We automatically get a pull request and can accept it easily.<br>
    <br>
    The only thing that can take longer then a few seconds here is 1)
    finding the file.<br>
    But maybe the pressgang-styles can be adjusted<br>
    to generate a link next to each section title to the docbook source
    file on github.<br>
    <blockquote cite="mid:4F15424D.8030403@codehaus.org" type="cite"> <br>
      Mark<br>
      <blockquote
cite="mid:6547E177D45A2C47A5E29F0F733EC3C5014DD95C8A86@RZJC1EX.jr1.local"
        type="cite">
        <div class="WordSection1">
          <p class="MsoNormal"><span style="font-size: 11pt;
              font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;
              color: rgb(31, 73, 125);" lang="EN-GB">Best,<o:p></o:p></span></p>
          <p class="MsoNormal"><span style="font-size: 11pt;
              font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;
              color: rgb(31, 73, 125);" lang="EN-GB">Wolfgang<o:p></o:p></span></p>
          <p class="MsoNormal"><span style="font-size: 11pt;
              font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;
              color: rgb(31, 73, 125);" lang="EN-GB"><o:p>&nbsp;</o:p></span></p>
          <p class="MsoNormal"><span style="font-size: 11pt;
              font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;
              color: rgb(31, 73, 125);" lang="EN-GB"><o:p>&nbsp;</o:p></span></p>
          <div style="border-right: medium none; border-width: 1pt
            medium medium; border-style: solid none none; border-color:
            rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color;
            padding: 3pt 0cm 0cm;">
            <p class="MsoNormal"><b><span style="font-size: 10pt;
                  font-family:
                  &quot;Tahoma&quot;,&quot;sans-serif&quot;;"
                  lang="EN-GB">Von:</span></b><span style="font-size:
                10pt; font-family:
                &quot;Tahoma&quot;,&quot;sans-serif&quot;;" lang="EN-GB">
                <a moz-do-not-send="true"
                  class="moz-txt-link-abbreviated"
                  href="mailto:rules-users-bounces@lists.jboss.org">rules-users-bounces@lists.jboss.org</a>
                [<a moz-do-not-send="true" class="moz-txt-link-freetext"
                  href="mailto:rules-users-bounces@lists.jboss.org">mailto:rules-users-bounces@lists.jboss.org</a>]
                <b>Im Auftrag von </b>Wolfgang La</span><span
                style="font-size: 10pt; font-family:
                &quot;Tahoma&quot;,&quot;sans-serif&quot;;" lang="DE">un<br>
                <b>Gesendet:</b> Montag, 16. J&auml;nner 2012 15:58<br>
                <b>An:</b> Rules Users List<br>
                <b>Betreff:</b> Re: [rules-users] Problem with Negative
                Patterns and Temporal Constraints<o:p></o:p></span></p>
          </div>
          <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
          <p class="MsoNormal" style="margin-bottom: 12pt;">I don't see
            that the "not" CE excludes the AnalysisCue bound to $cue
            from being<br>
            matched by the pattern inside the "not". I recommend using<br>
            <br>
            <b><span style="font-size: 10pt; font-family: Inconsolata;
                color: rgb(150, 0, 0);" lang="EN-GB">&nbsp;&nbsp; not</span></b><span
              style="font-size: 10pt; font-family: Inconsolata;"
              lang="EN-GB">(AnalysisCue(<b>this != $cue</b>, <span
                style="color: rgb(150, 0, 0);">this</span>
              after[0ms,2500ms] $cue) <span style="color: rgb(150, 0,
                0);">from</span></span><br>
            <br>
            since "[0ms,..." does not inhibit the same event being
            matched by both patterns,<br>
            which precludes the rule from firing.<br>
            <br>
            -W<br>
            <br>
            <o:p></o:p></p>
          <div>
            <p class="MsoNormal">2012/1/16 Weiss, Wolfgang &lt;<a
                moz-do-not-send="true"
                href="mailto:Wolfgang.Weiss@joanneum.at">Wolfgang.Weiss@joanneum.at</a>&gt;<o:p></o:p></p>
            <div>
              <div>
                <p class="MsoNormal" style=""><span lang="EN-GB">Hi all!</span><o:p></o:p></p>
                <p class="MsoNormal" style=""><span lang="EN-GB">&nbsp;</span><o:p></o:p></p>
                <p class="MsoNormal" style=""><span lang="EN-GB">We have
                    the problem that the following rule never fires:</span><o:p></o:p></p>
                <p class="MsoNormal" style=""><span lang="EN-GB">&nbsp;</span><o:p></o:p></p>
                <p class="MsoNormal" style=""><b><span style="font-size:
                      10pt; font-family: Inconsolata; color: rgb(150, 0,
                      0);" lang="EN-GB">rule</span></b><span
                    style="font-size: 10pt; font-family: Inconsolata;"
                    lang="EN-GB"> <span style="color: green;">"test-rule"</span></span><o:p></o:p></p>
                <p class="MsoNormal" style=""><span style="font-size:
                    10pt; font-family: Inconsolata;" lang="EN-GB">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <b><span style="color: rgb(150, 0, 0);">agenda-group</span></b>
                    <span style="color: green;">"evaluation"</span></span><o:p></o:p></p>
                <p class="MsoNormal" style=""><span style="font-size:
                    10pt; font-family: Inconsolata;" lang="EN-GB">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <b><span style="color: rgb(150, 0, 0);">salience</span></b>
                    100</span><o:p></o:p></p>
                <p class="MsoNormal" style=""><span style="font-size:
                    10pt; font-family: Inconsolata;" lang="EN-GB">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                  </span><o:p></o:p></p>
                <p class="MsoNormal" style=""><span style="font-size:
                    10pt; font-family: Inconsolata;" lang="EN-GB">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <b><span style="color: rgb(150, 0, 0);">when</span></b></span><o:p></o:p></p>
                <p class="MsoNormal" style=""><span style="font-size:
                    10pt; font-family: Inconsolata;" lang="EN-GB">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    $cue : AnalysisCue() <b><span style="color:
                        rgb(150, 0, 0);">from</span></b> entry-point <span
                      style="color: green;">"LowLevelCueStream"</span></span><o:p></o:p></p>
                <p class="MsoNormal" style=""><span style="font-size:
                    10pt; font-family: Inconsolata;" lang="EN-GB">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <b><span style="color: rgb(150, 0, 0);">not</span></b>(AnalysisCue(<b><span
                        style="color: rgb(150, 0, 0);">this</span></b>
                    after[0ms,2500ms] $cue) <b><span style="color:
                        rgb(150, 0, 0);">from</span></b> entry-point <span
                      style="color: green;">"LowLevelCueStream"</span>)</span><o:p></o:p></p>
                <p class="MsoNormal" style=""><span style="font-size:
                    10pt; font-family: Inconsolata;" lang="EN-GB">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <b><span style="color: rgb(150, 0, 0);">then</span></b></span><o:p></o:p></p>
                <p class="MsoNormal" style=""><span style="font-size:
                    10pt; font-family: Inconsolata;" lang="EN-GB">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    logger.debug(<span style="color: green;">"... some
                      message .."</span>);</span><o:p></o:p></p>
                <p class="MsoNormal" style=""><b><span style="font-size:
                      10pt; font-family: Inconsolata; color: rgb(150, 0,
                      0);" lang="EN-GB">end</span></b><o:p></o:p></p>
                <p class="MsoNormal" style=""><span lang="EN-GB">&nbsp;</span><o:p></o:p></p>
                <p class="MsoNormal" style=""><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.</span><o:p></o:p></p>
                <p class="MsoNormal" style=""><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:</span><o:p></o:p></p>
                <p class="MsoNormal" style=""><span lang="EN-GB">&nbsp;</span><o:p></o:p></p>
                <p class="MsoNormal" style=""><b><span style="font-size:
                      10pt; font-family: Inconsolata; color: rgb(150, 0,
                      0);" lang="EN-GB">rule</span></b><span
                    style="font-size: 10pt; font-family: Inconsolata;"
                    lang="EN-GB"> <span style="color: green;">"test-rule"</span></span><o:p></o:p></p>
                <p class="MsoNormal" style=""><span style="font-size:
                    10pt; font-family: Inconsolata;" lang="EN-GB">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <b><span style="color: rgb(150, 0, 0);">agenda-group</span></b>
                    <span style="color: green;">"evaluation"</span></span><o:p></o:p></p>
                <p class="MsoNormal" style=""><span style="font-size:
                    10pt; font-family: Inconsolata;" lang="EN-GB">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <b><span style="color: rgb(150, 0, 0);">salience</span></b>
                    100</span><o:p></o:p></p>
                <p class="MsoNormal" style=""><span style="font-size:
                    10pt; font-family: Inconsolata;" lang="EN-GB">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                  </span><o:p></o:p></p>
                <p class="MsoNormal" style=""><span style="font-size:
                    10pt; font-family: Inconsolata;" lang="EN-GB">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <b><span style="color: rgb(150, 0, 0);">when</span></b></span><o:p></o:p></p>
                <p class="MsoNormal" style=""><span style="font-size:
                    10pt; font-family: Inconsolata;" lang="EN-GB">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    $cue : AnalysisCue() <b><span style="color:
                        rgb(150, 0, 0);">from</span></b> entry-point <span
                      style="color: green;">"LowLevelCueStream"</span></span><o:p></o:p></p>
                <p class="MsoNormal" style=""><span style="font-size:
                    10pt; font-family: Inconsolata;" lang="EN-GB">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <b><span style="color: rgb(150, 0, 0);">not</span></b>(AnalysisCue(cueType

                    == 1, <b><span style="color: rgb(150, 0, 0);">this</span></b>
                    after[0ms,2500ms] $cue) <b><span style="color:
                        rgb(150, 0, 0);">from</span></b> entry-point <span
                      style="color: green;">"LowLevelCueStream"</span>)</span><o:p></o:p></p>
                <p class="MsoNormal" style=""><span style="font-size:
                    10pt; font-family: Inconsolata;" lang="EN-GB">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <b><span style="color: rgb(150, 0, 0);">then</span></b></span><o:p></o:p></p>
                <p class="MsoNormal" style=""><span style="font-size:
                    10pt; font-family: Inconsolata;" lang="EN-GB">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    logger.debug(<span style="color: green;">"... some
                      message .."</span>);</span><o:p></o:p></p>
                <p class="MsoNormal" style=""><b><span style="font-size:
                      10pt; font-family: Inconsolata; color: rgb(150, 0,
                      0);" lang="EN-GB">end</span></b><o:p></o:p></p>
                <p class="MsoNormal" style=""><span lang="EN-GB">&nbsp;</span><o:p></o:p></p>
                <p class="MsoNormal" style=""><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.</span><o:p></o:p></p>
                <p class="MsoNormal" style=""><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.</span><o:p></o:p></p>
                <p class="MsoNormal" style=""><span lang="EN-GB">&nbsp;</span><o:p></o:p></p>
                <p class="MsoNormal" style=""><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. </span><o:p></o:p></p>
                <p class="MsoNormal" style=""><span lang="EN-GB">Can
                    anybody confirm if this is a bug in Drools, or did I
                    overlook here something?</span><o:p></o:p></p>
                <p class="MsoNormal" style=""><span lang="EN-GB">&nbsp;</span><o:p></o:p></p>
                <p class="MsoNormal" style=""><span lang="EN-GB">&nbsp;</span><o:p></o:p></p>
                <p class="MsoNormal" style=""><span lang="EN-GB">Best
                    regards,</span><o:p></o:p></p>
                <p class="MsoNormal" style=""><span style="color:
                    rgb(136, 136, 136);" lang="EN-GB">Wolfgang Weiss</span><span
                    style="color: rgb(136, 136, 136);"><o:p></o:p></span></p>
                <p class="MsoNormal" style=""><span style="color:
                    rgb(136, 136, 136);" lang="EN-GB">&nbsp;</span><span
                    style="color: rgb(136, 136, 136);"><o:p></o:p></span></p>
              </div>
            </div>
            <p class="MsoNormal" style="margin-bottom: 12pt;"><br>
              _______________________________________________<br>
              rules-users mailing list<br>
              <a moz-do-not-send="true"
                href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
              <a moz-do-not-send="true"
                href="https://lists.jboss.org/mailman/listinfo/rules-users"
                target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><o:p></o:p></p>
          </div>
          <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
        </div>
        <br>
        <fieldset class="mimeAttachmentHeader"></fieldset>
        <br>
        <pre wrap="">_______________________________________________
rules-users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a>
</pre>
      </blockquote>
      <br>
      <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
rules-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
With kind regards,
Geoffrey De Smet</pre>
  </body>
</html>