<div dir="ltr"><br>&nbsp;&nbsp; Hello,<br><br>&nbsp;&nbsp; It seems you did everything correctly. It seems there is a parser bug with the &quot;&quot; around the name of the entry point. For now, just remove the &quot; &quot;, since your entry point is a single word. I will make sure it gets fixed asap.<br>
&nbsp;&nbsp; <br>&nbsp;&nbsp; Also, a few more unit/integration tests you may want to look at:<br><br><a href="https://svn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/StreamsTest.java">https://svn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/StreamsTest.java</a><br>
<a href="https://svn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/CepEspTest.java">https://svn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/CepEspTest.java</a><br>
<br>&nbsp; So, you are right to think that fact types are not tied to the streams... just write &quot;from entry-point&quot; after any pattern to declare what entry point that fact is coming from. Also, you can assert regular facts to entry-points. Entry-points are a general abstraction, whose probably the most known use case is for streams mapping, but not the only one.<br>
<br>&nbsp;&nbsp; []s<br>&nbsp;&nbsp; Edson<br><br><div class="gmail_quote">2008/9/1 H. 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;">

Hey,

I am playing around with the new CEP features in 5 M1 and primarily working off of the blog posts and API doc. 

I have some patterns that pull from a stream:
<pre>$candle : Candle( $instrument :  instrumentSpecification ) from entry-point &quot;candles&quot;</pre>

I have my entry point in the WM:
<pre>candlesEntryPoint = this.session.getWorkingMemoryEntryPoint(&quot;candles&quot;);</pre>

I have also defined Candle to be an event in my rule.package file:
<pre>import org.test.Candle

declare Candle
        @role(event)
end
</pre>

When I execute my sesson/getWorkingMemoryEntryPoint code above, I get a null back for the entry point and thus can&#39;t insert the event (Candle). The API docs for the getWorkingMemoryEntryPoint state that I need to define an entry point in the rules file? Is that the above part in the rule.package part or is that some other declaration? If that is a different declaration, is there some documentation what that would look like?

The way I currently interpret the declare part is that I am designating my Candle object to be an event rather than a fact. Does that indirectly also declare an entry point? If so, how can I have heterogeneous streams with different object types?

Thanks
HC
<br><hr align="left" width="300">
View this message in context: <a href="http://www.nabble.com/Declaring-an-entry-point--%28drools-5-M1%29-tp19260204p19260204.html" target="_blank">Declaring an entry-point? (drools 5 M1)</a><br>
Sent from the <a href="http://www.nabble.com/drools---user-f11823.html" target="_blank">drools - user mailing list archive</a> at Nabble.com.<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>
<br></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>