Hello,

   It seems you did everything correctly. It seems there is a parser bug with the "" around the name of the entry point. For now, just remove the " ", since your entry point is a single word. I will make sure it gets fixed asap.
  
   Also, a few more unit/integration tests you may want to look at:

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/CepEspTest.java

  So, you are right to think that fact types are not tied to the streams... just write "from entry-point" 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.

   []s
   Edson

2008/9/1 H. Canterburry <canterburry@gmail.com>
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:
$candle : Candle( $instrument :  instrumentSpecification ) from entry-point "candles"
I have my entry point in the WM:
candlesEntryPoint = this.session.getWorkingMemoryEntryPoint("candles");
I have also defined Candle to be an event in my rule.package file:
import org.test.Candle

declare Candle
	@role(event)
end
When I execute my sesson/getWorkingMemoryEntryPoint code above, I get a null back for the entry point and thus can'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

View this message in context: Declaring an entry-point? (drools 5 M1)
Sent from the drools - user mailing list archive at Nabble.com.

_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users




--
Edson Tirelli
JBoss Drools Core Development
JBoss, a division of Red Hat @ www.jboss.com