<div dir="ltr">The reason why I&#39;ve activated the logging was that some rules are not fired after inserting a special<br>amount of facts - in my case exactly 20.<br><div class="gmail_extra"><br>Some more details here:<br>
I work on an Event Correlation &amp; Analysis OSS solution that&#39;s based on Grails &amp; Drools 5.5.0-Final.<br>I&#39;m using a stateful knowledge session and only call dispose() when the app is stopped - but all facts <br>
are retracted. The functional testing works fine but as I&#39;ve mentioned it before when I run the integration<br>testing it fails, because rules are not fired (&#39;ClearAlertRule&#39; is not fired) when I insert more than 20 facts. <br>
I saw the errors in the drools log but I didn&#39;t know if they were relevant for my problem here.<br> I&#39;ve attached two picts which document the right and the wrong behavior of the rule processing<br> - also I&#39;ve listed the rules of my rulebase.<br>
<br></div><div class="gmail_extra">Has anybody an idea?<br><br></div><div class="gmail_extra">Cheers,<br><br></div><div class="gmail_extra">-markus<br></div><div class="gmail_extra"><br></div><div class="gmail_extra"><br>
//------------------------------<br>rule &#39;UpdateAlertRule&#39;<br>//------------------------------<br>   dialect  &#39;mvel&#39;<br>   salience 900<br>   no-loop<br>   when<br>     _event : Event(eventClass == &quot;Event&quot;,<br>
        _name:catalog[&#39;name&#39;],<br>                 _category:catalog[&#39;category&#39;],<br>                 _severity:catalog[&#39;severity&#39;],<br>                 _state:catalog[&#39;state&#39;],<br>                 _source:catalog[&#39;source&#39;],<br>
                 _subSource:catalog[&#39;subSource&#39;],<br>                 _origin:catalog[&#39;origin&#39;],<br>                 _subOrigin:catalog[&#39;subOrigin&#39;],<br>                 _owner:catalog[&#39;owner&#39;],<br>
                 _description:catalog[&#39;description&#39;],<br>                 _selector:(&quot;from Alert where &quot; +  <br>                    &quot;name=&#39;&quot; + catalog[&#39;name&#39;] + &quot;&#39; &quot; +  <br>
                    &quot;and severity=&#39;&quot; + catalog[&#39;severity&#39;] + &quot;&#39; &quot; +  <br>                    &quot;and not state=&#39;Closed&#39;&quot;<br>                 )<br>              )<br>     eval(isDuplicate(_event,&quot;UpdateAlertRule&quot;,_selector) == true)<br>
   then<br>System.out.println(&quot;UpdateAlertRule is processed.&quot;)<br>     EntityBuilder entityBuilder = new EntityBuilder();<br>     entityBuilder.addProperty(&quot;modifiedBy&quot;,&quot;UpdateAlertRule&quot;);<br>
entityBuilder.addProperty(&quot;counter&quot;,1);<br>     AlertHandler alertHandler = new AlertHandler(entityBuilder.getProperties(),_selector);<br>     alertHandler.update();<br>     RuleLogHandler ruleLogHandler = new RuleLogHandler();<br>
ruleLogHandler.create(&quot;UpdateAlertRule&quot;,_name);<br>   end<br><br>//------------------------------<br>rule &#39;ClearAlertRule&#39;<br>//------------------------------<br>   dialect  &#39;mvel&#39;<br>   salience 800<br>
   no-loop<br>   when<br>     _event : Event(eventClass == &quot;Event&quot;,<br>        _name:catalog[&#39;name&#39;] contains &#39;Info&#39;,<br>                 _category:catalog[&#39;category&#39;],<br>                 _severity:catalog[&#39;severity&#39;] == &#39;Harmless&#39;,<br>
                 _state:catalog[&#39;state&#39;],<br>                 _source:catalog[&#39;source&#39;],<br>                 _subSource:catalog[&#39;subSource&#39;],<br>                 _origin:catalog[&#39;origin&#39;],<br>
                 _subOrigin:catalog[&#39;subOrigin&#39;],<br>                 _owner:catalog[&#39;owner&#39;],<br>                 _description:catalog[&#39;description&#39;],<br>                 _selector:(&quot;from Alert where &quot; +  <br>
                    &quot;name like &#39;%Error&#39;&quot; +  <br>                    &quot;and not severity=&#39;Harmless&#39;&quot; +  <br>                    &quot;and not state=&#39;Closed&#39;&quot;<br>                 )<br>
              )<br>   then<br>System.out.println(&quot;ClearAlertRule is processed.&quot;)<br>     EntityBuilder entityBuilder = new EntityBuilder();<br>     entityBuilder.addProperty(&quot;modifiedBy&quot;,&quot;ClearAlertRule&quot;)<br>
entityBuilder.addProperty(&quot;state&quot;,&quot;Closed&quot;);<br>     AlertHandler alertHandler = new AlertHandler(entityBuilder.getProperties(),_selector);<br>     alertHandler.update();<br>     RuleLogHandler ruleLogHandler = new RuleLogHandler();<br>
ruleLogHandler.create(&quot;ClearAlertRule&quot;,_name);<br>   end<br><br>//------------------------------<br>rule &#39;CreateAlertRule&#39;<br>//------------------------------<br>   dialect  &#39;mvel&#39;<br>   salience 700<br>
   no-loop<br>   when<br>     _event : Event(eventClass == &quot;Event&quot;,<br>        _name:catalog[&#39;name&#39;],<br>                 _category:catalog[&#39;category&#39;],<br>                 _severity:catalog[&#39;severity&#39;],<br>
                 _priority:catalog[&#39;priority&#39;],<br>                 _state:catalog[&#39;state&#39;],<br>                 _source:catalog[&#39;source&#39;],<br>                 _subSource:catalog[&#39;subSource&#39;],<br>
                 _origin:catalog[&#39;origin&#39;],<br>                 _subOrigin:catalog[&#39;subOrigin&#39;],<br>                 _owner:catalog[&#39;owner&#39;],<br>                 _description:catalog[&#39;description&#39;],<br>
                 _selector:(&quot;from Alert where &quot; +  <br>                    &quot;name=&#39;&quot; + catalog[&#39;name&#39;] + &quot;&#39; &quot; +  <br>                    &quot;and severity=&#39;&quot; + catalog[&#39;severity&#39;] + &quot;&#39; &quot; +  <br>
                    &quot;and not state=&#39;Closed&#39;&quot;<br>                 )<br>              )<br>     eval(isDuplicate(_event,&quot;CreateAlertRule&quot;,_selector) == false)<br>   then<br>System.out.println(&quot;CreateAlertRule is processed.&quot;);<br>
EntityBuilder entityBuilder = new EntityBuilder();<br>     entityBuilder.addProperty(&quot;modifiedBy&quot;,&quot;CreateAlertRule&quot;);<br>     entityBuilder.addProperty(&quot;name&quot;,_name);<br>     entityBuilder.addProperty(&quot;category&quot;,_category);<br>
     entityBuilder.addProperty(&quot;severity&quot;,_severity);<br>     entityBuilder.addProperty(&quot;priority&quot;,_priority);<br>     entityBuilder.addProperty(&quot;state&quot;,_state);<br>     entityBuilder.addProperty(&quot;source&quot;,_source);<br>
     entityBuilder.addProperty(&quot;subSource&quot;,_subSource);<br>     entityBuilder.addProperty(&quot;origin&quot;,_origin);<br>     entityBuilder.addProperty(&quot;subOrigin&quot;,_subOrigin);<br>     entityBuilder.addProperty(&quot;owner&quot;,_owner);<br>
     entityBuilder.addProperty(&quot;description&quot;,_description);<br>     AlertHandler alertHandler = new AlertHandler(entityBuilder.getProperties(),_selector);<br>    alertHandler.create();<br>    RuleLogHandler ruleLogHandler = new RuleLogHandler();<br>
ruleLogHandler.create(&quot;CreateAlertRule&quot;,_name);<br>   end<br><br>//------------------------------<br>rule &#39;EventRetractionRule&#39;<br>//------------------------------<br>   dialect  &#39;mvel&#39;<br>   salience 1<br>
   no-loop<br>   when<br>     _event : Event(eventClass == &quot;Event&quot;,<br><br>        _name:catalog[&#39;name&#39;] not contains &#39;Timer&#39;<br>                <br>                <br>              )<br>   then<br>
System.out.println(&quot;EventRetractionRule is processed.&quot;);<br>retract(_event);<br>     RuleLogHandler ruleLogHandler = new RuleLogHandler();<br>ruleLogHandler.create(&quot;EventRetractionRule&quot;,_name);<br>   end<br>
<br><br><br>
<div class="gmail_quote">2014-02-25 14:00 GMT+01:00 Markus Schneider <span dir="ltr">&lt;<a href="mailto:markus.schneider73@gmail.com" target="_blank">markus.schneider73@gmail.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

<div dir="ltr"><div><div><div>Hi Davide,<br><br></div><div>thank you for the fast response. I&#39;ve defined an DebugAgendaEventListener as it&#39;s described here:<br>Drools Docu 5.5.0-Final/Section 7.2/HelloWorld example.<br>


<a href="http://docs.jboss.org/drools/release/5.5.0.Final/drools-expert-docs/html/index.html" target="_blank">http://docs.jboss.org/drools/release/5.5.0.Final/drools-expert-docs/html/index.html</a><br></div><br></div><div>

Where can I find any docu about the config of the DebugAgendaEventListener?<br>
</div><div><div><br></div><div>Cheers,<br></div></div><br></div>-markus<br><div><br> <br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-02-25 12:59 GMT+01:00 Davide Sottara <span dir="ltr">&lt;<a href="mailto:dsotty@gmail.com" target="_blank">dsotty@gmail.com</a>&gt;</span>:<div>

<div><br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <div>You likely have configured a
      DebugAgendaEventListener, which logs agenda events (rules
      activated, fired, etc..)<br>
      on the standard error rather than the standard output. If you want
      a different behavior, remove the listener<br>
      and implement one of your own.<br>
      These are not errors anyway.<br>
      Davide<div><div><br>
      <br>
      On 02/25/2014 09:40 AM, Markus Schneider wrote:<br>
    </div></div></div>
    <blockquote type="cite"><div><div>
      <div dir="ltr">
        <div>
          <div>Hi list, <br>
            <br>
          </div>
          I see the following error msg in my drools log but I don&#39;t
          know how to interpret this.<br>
        </div>
        Do I have a serious problem here?<br>
        <div>
          <div>
            <div>
              <div>
                <div><br>
                </div>
                <div>
                  Has anybody a clue?<br>
                  <br>
                </div>
                <div>Thanks in advance.<br>
                  <br>
                </div>
                <div>Cheers,<br>
                </div>
                <div><br>
                </div>
                <div>-markus<br>
                </div>
                <div><br>
                  | Error ==&gt;[AfterActivationFiredEvent:
                  getActivation()=[Activation rule=UpdateAlertRule,
                  act#=37, salience=900, tuple=[fact
                  0:19:184363445:184363445:19:DEFAULT:rapideca.plugins.rbm.entity.Event
                  : 19]<br>
                  ],
getKnowledgeRuntime()=org.drools.impl.StatefulKnowledgeSessionImpl@6dd4ab87]<br>
                  | Error ==&gt;[BeforeActivationFiredEvent: 
                  getActivation()=[Activation rule=EventRetractionRule,
                  act#=36, salience=1, tuple=[fact
                  0:19:184363445:184363445:19:DEFAULT:rapideca.plugins.rbm.entity.Event
                  : 19]<br>
                  ],
getKnowledgeRuntime()=org.drools.impl.StatefulKnowledgeSessionImpl@6dd4ab87]<br>
                  EventRetractionRule is processed.<br>
                  | Error ==&gt;[ObjectRetractedEventImpl:
                  getFactHandle()=[fact
                  0:19:184363445:184363445:19:DEFAULT:rapideca.plugins.rbm.entity.Event
                  : 19],
                  getOldObject()=rapideca.plugins.rbm.entity.Event : 19,
                  getKnowledgeRuntime()=org.drools.impl.StatefulKnowledgeSessionImpl@6dd4ab87,
                  getPropagationContext()=PropagationContextImpl
                  [activeActivations=0, dormantActivations=2,
                  entryPoint=EntryPoint::DEFAULT, factHandle=[fact
                  0:19:184363445:184363445:19:DEFAULT:rapideca.plugins.rbm.entity.Event
                  : 19], leftTuple=[fact
                  0:19:184363445:184363445:19:DEFAULT:rapideca.plugins.rbm.entity.Event
                  : 19]<br>
                  , originOffset=-1, propagationNumber=40, rule=[Rule
                  name=EventRetractionRule, agendaGroup=MAIN,
                  salience=1, no-loop=true], type=1]]<br>
                  2014-02-25 08:59:03,524
                  [eventQueueReceiverJmsListenerContainer-1] INFO 
                  log.RuleLogHandler  - RuleLog with id: 38 was
                  successfully saved.<br>
                  | Error ==&gt;[AfterActivationFiredEvent:
                  getActivation()=[Activation rule=EventRetractionRule,
                  act#=36, salience=1, tuple=[fact
                  0:-1:184363445:184363445:19:null:null]<br>
                  ],
getKnowledgeRuntime()=org.drools.impl.StatefulKnowledgeSessionImpl@6dd4ab87]<br>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      </div></div><pre>_______________________________________________
rules-users mailing list
<a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a></pre>
    </blockquote>
    <br>
    <br>
  </div>

<br>_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br></blockquote></div></div></div><br></div>
</blockquote></div><br></div></div>