<div dir="ltr"><br>&nbsp;&nbsp; You must explicitly constrain the pattern, if you don&#39;t want a cartesian product.<br><br>&nbsp;&nbsp; Following example may or may not help you:<br><br><a href="https://svn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_CEP_TimeRelationalOperators.drl">https://svn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_CEP_TimeRelationalOperators.drl</a><br>
<br>&nbsp;&nbsp; []s<br>&nbsp;&nbsp; Edson<br><br><div class="gmail_quote">2008/9/1 Henry Canterburry <span dir="ltr">&lt;<a href="mailto:canterburry@gmail.com">canterburry@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Thanks Edson,<br>
<br>
Will try that out. One more question, when my pattern matches against<br>
the event, am I to assume the pattern matching in the order the events<br>
were placed or do I have to define additional matching statements on the<br>
pattern (i.e. comparing against a timestamp) to ensure I am matching<br>
against the most recent event?<br>
<br>
HC<br>
<div class="Ih2E3d"><br>
Edson Tirelli wrote:<br>
&gt;<br>
&gt; &nbsp; &nbsp;Hello,<br>
&gt;<br>
&gt; &nbsp; &nbsp;It seems you did everything correctly. It seems there is a parser<br>
&gt; bug with the &quot;&quot; around the name of the entry point. For now, just<br>
&gt; remove the &quot; &quot;, since your entry point is a single word. I will make<br>
&gt; sure it gets fixed asap.<br>
&gt;<br>
&gt; &nbsp; &nbsp;Also, a few more unit/integration tests you may want to look at:<br>
&gt;<br>
&gt; <a href="https://svn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/StreamsTest.java" target="_blank">https://svn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/StreamsTest.java</a><br>

&gt; <a href="https://svn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/CepEspTest.java" target="_blank">https://svn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/CepEspTest.java</a><br>

&gt;<br>
&gt; &nbsp; So, you are right to think that fact types are not tied to the<br>
&gt; streams... just write &quot;from entry-point&quot; after any pattern to declare<br>
&gt; what entry point that fact is coming from. Also, you can assert<br>
&gt; regular facts to entry-points. Entry-points are a general abstraction,<br>
&gt; whose probably the most known use case is for streams mapping, but not<br>
&gt; the only one.<br>
&gt;<br>
&gt; &nbsp; &nbsp;[]s<br>
&gt; &nbsp; &nbsp;Edson<br>
&gt;<br>
&gt; 2008/9/1 H. Canterburry &lt;<a href="mailto:canterburry@gmail.com">canterburry@gmail.com</a><br>
</div>&gt; &lt;mailto:<a href="mailto:canterburry@gmail.com">canterburry@gmail.com</a>&gt;&gt;<br>
<div class="Ih2E3d">&gt;<br>
&gt; &nbsp; &nbsp; Hey, I am playing around with the new CEP features in 5 M1 and<br>
&gt; &nbsp; &nbsp; primarily working off of the blog posts and API doc. I have some<br>
&gt; &nbsp; &nbsp; patterns that pull from a stream:<br>
&gt;<br>
&gt; &nbsp; &nbsp; $candle : Candle( $instrument : &nbsp;instrumentSpecification ) from entry-point &quot;candles&quot;<br>
&gt;<br>
&gt; &nbsp; &nbsp; I have my entry point in the WM:<br>
&gt;<br>
&gt; &nbsp; &nbsp; candlesEntryPoint = this.session.getWorkingMemoryEntryPoint(&quot;candles&quot;);<br>
&gt;<br>
&gt; &nbsp; &nbsp; I have also defined Candle to be an event in my rule.package file:<br>
&gt;<br>
&gt; &nbsp; &nbsp; import org.test.Candle<br>
&gt;<br>
&gt; &nbsp; &nbsp; declare Candle<br>
&gt; &nbsp; &nbsp; &nbsp; @role(event)<br>
&gt; &nbsp; &nbsp; end<br>
&gt;<br>
&gt;<br>
&gt; &nbsp; &nbsp; When I execute my sesson/getWorkingMemoryEntryPoint code above, I<br>
&gt; &nbsp; &nbsp; get a null back for the entry point and thus can&#39;t insert the<br>
&gt; &nbsp; &nbsp; event (Candle). The API docs for the getWorkingMemoryEntryPoint<br>
&gt; &nbsp; &nbsp; state that I need to define an entry point in the rules file? Is<br>
&gt; &nbsp; &nbsp; that the above part in the rule.package part or is that some other<br>
&gt; &nbsp; &nbsp; declaration? If that is a different declaration, is there some<br>
&gt; &nbsp; &nbsp; documentation what that would look like? The way I currently<br>
&gt; &nbsp; &nbsp; interpret the declare part is that I am designating my Candle<br>
&gt; &nbsp; &nbsp; object to be an event rather than a fact. Does that indirectly<br>
&gt; &nbsp; &nbsp; also declare an entry point? If so, how can I have heterogeneous<br>
&gt; &nbsp; &nbsp; streams with different object types? Thanks HC<br>
&gt; &nbsp; &nbsp; ------------------------------------------------------------------------<br>
&gt; &nbsp; &nbsp; View this message in context: Declaring an entry-point? (drools 5<br>
&gt; &nbsp; &nbsp; M1)<br>
</div>&gt; &nbsp; &nbsp; &lt;<a href="http://www.nabble.com/Declaring-an-entry-point--%28drools-5-M1%29-tp19260204p19260204.html" target="_blank">http://www.nabble.com/Declaring-an-entry-point--%28drools-5-M1%29-tp19260204p19260204.html</a>&gt;<br>

<div class="Ih2E3d">&gt; &nbsp; &nbsp; Sent from the drools - user mailing list archive<br>
</div>&gt; &nbsp; &nbsp; &lt;<a href="http://www.nabble.com/drools---user-f11823.html" target="_blank">http://www.nabble.com/drools---user-f11823.html</a>&gt; at Nabble.com.<br>
&gt;<br>
&gt; &nbsp; &nbsp; _______________________________________________<br>
&gt; &nbsp; &nbsp; rules-users mailing list<br>
&gt; &nbsp; &nbsp; <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a> &lt;mailto:<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>&gt;<br>
<div class="Ih2E3d">&gt; &nbsp; &nbsp; <a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Edson Tirelli<br>
&gt; JBoss Drools Core Development<br>
</div>&gt; JBoss, a division of Red Hat @ <a href="http://www.jboss.com" target="_blank">www.jboss.com</a> &lt;<a href="http://www.jboss.com" target="_blank">http://www.jboss.com</a>&gt;<br>
<div><div></div><div class="Wj3C7c">&gt; ------------------------------------------------------------------------<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; rules-users mailing list<br>
&gt; <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
&gt;<br>
<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>
</div></div></blockquote></div><br><br clear="all"><br>-- <br> Edson Tirelli<br> JBoss Drools Core Development<br> JBoss, a division of Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a><br>
</div>