Both look like a bug to me. Even if RawEvent is an (abstract) base class,<div>the &quot;unable to resolve method&quot; should not occur. (Are you using dialect MVEL?)</div><div><div><br></div><div>Are you using a separate thread running kSession.fireUntilHalt()? There was an</div>
<div>alert indicating a race condition in 5.4.0.</div><div><br></div><div>Can you post a reduced set of Java and DRL code reproducing both errors?</div><div><br></div><div>-W</div><div><br><br><div class="gmail_quote">On 1 September 2012 18:41, Rob21 <span dir="ltr">&lt;<a href="mailto:rob.perrez@gmail.com" target="_blank">rob.perrez@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Actually i meant that the first rule worked for every beginning of scenario,<br>
except the first scenario if the first event is a RawEvent. The second rule<br>
doesn&#39;t work at all and gives me this :<br>
<br>
Thread [main] (Suspended (exception NullPointerException))<br>
<br>
BeforeEvaluatorDefinition$BeforeEvaluator.evaluateCachedLeft(InternalWorkingMemory,<br>
VariableRestriction$VariableContextEntry, Object) line: 343<br>
        EvaluatorConstraint.isAllowedCachedLeft(ContextEntry, InternalFactHandle)<br>
line: 67<br>
        DoubleBetaConstraints.isAllowedCachedLeft(ContextEntry[],<br>
InternalFactHandle) line: 168<br>
        NotNode.assertLeftTuple(LeftTuple, PropagationContext,<br>
InternalWorkingMemory) line: 80<br>
        SingleLeftTupleSinkAdapter.doPropagateAssertLeftTuple(PropagationContext,<br>
InternalWorkingMemory, LeftTuple) line: 196<br>
<br>
SingleLeftTupleSinkAdapter.createAndPropagateAssertLeftTuple(InternalFactHandle,<br>
PropagationContext, InternalWorkingMemory, boolean, LeftInputAdapterNode)<br>
line: 145<br>
        LeftInputAdapterNode.assertObject(InternalFactHandle, PropagationContext,<br>
InternalWorkingMemory) line: 154<br>
        CompositeObjectSinkAdapter.doPropagateAssertObject(InternalFactHandle,<br>
PropagationContext, InternalWorkingMemory, ObjectSink) line: 497<br>
        CompositeObjectSinkAdapter.propagateAssertObject(InternalFactHandle,<br>
PropagationContext, InternalWorkingMemory) line: 382<br>
        ObjectTypeNode.assertObject(InternalFactHandle, PropagationContext,<br>
InternalWorkingMemory) line: 235<br>
        EntryPointNode.assertObject(InternalFactHandle, PropagationContext,<br>
ObjectTypeConf, InternalWorkingMemory) line: 240<br>
        NamedEntryPoint.insert(InternalFactHandle, Object, Rule, Activation,<br>
ObjectTypeConf) line: 337<br>
        NamedEntryPoint.insert(Object, boolean, boolean, Rule, Activation) line:<br>
298<br>
        ReteooStatefulSession(AbstractWorkingMemory).insert(Object, boolean,<br>
boolean, Rule, Activation) line: 888<br>
        ReteooStatefulSession(AbstractWorkingMemory).insert(Object) line: 847<br>
        StatefulKnowledgeSessionImpl.insert(Object) line: 269<br>
        DroolsTest.sendEvents(String, StatefulKnowledgeSession) line: 85<br>
        DroolsTest.main(String[]) line: 62<br>
<br>
About &quot;this != $start&quot;, i tried that also as the documentation contains a<br>
similar example with heartbeats.<br>
Still for this rule :<br>
rule &quot;Detect it&quot;<br>
        when<br>
                $start : RawEvent()<br>
                not RawEvent(this != $start, id == $<a href="http://start.id" target="_blank">start.id</a>, $start after[0s, 90s] this)<br>
        then<br>
                System.out.println($start);<br>
end<br>
The application terminates and Drools answers this :<br>
Unable to Analyse Expression this != $start &amp;&amp; after0.evaluate( $start, this<br>
):<br>
[Error: unable to resolve method using strict-mode:<br>
com.sample.RawEvent.after0()]<br>
[Near : {... this != $start &amp;&amp; after0.evaluate( $start, this ....}]<br>
             ^ : [Rule name=&#39;Detect it&#39;]<br>
<br>
java.lang.IllegalArgumentException: Could not parse knowledge.<br>
        at com.sample.DroolsTest.readKnowledgeBase(DroolsTest.java:109)<br>
        at com.sample.DroolsTest.main(DroolsTest.java:54)<br>
<br>
Which I don&#39;t understand<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/before-after-behavior-for-negative-pattern-tp4019497p4019499.html" target="_blank">http://drools.46999.n3.nabble.com/before-after-behavior-for-negative-pattern-tp4019497p4019499.html</a><br>

Sent from the Drools: User forum mailing list archive at Nabble.com.<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">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><br></div></div>