This only makes sense if your rules use constraints with temporal operators,<br>so you&#39;ll have to know at &quot;rule writing time&quot;. So, I don&#39;t quite see why you&#39;d<br>want or need to do that.<br><br>The information from a declare is stored by the compiler; this API (even if<br>
exposed) would not help you, as you&#39;d have to access it during the compilation,<br>or do all that what needs to be done while compiling a declare. Creating a<br>text and compiling this as a .DRL is much simpler.<br><br>
-W<br><br><div class="gmail_quote">On 26 October 2010 09:07, Samuli Saarinen <span dir="ltr">&lt;<a href="mailto:samuli.saarinen@remion.com">samuli.saarinen@remion.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br>
<br>
I&#39;m aware of that but was looking for a way to do it using some API. I<br>
am inserting some objects to the engine and would like to declare them<br>
as events &quot;automatically&quot; before inserting. I could generate the snippet<br>
shown in the doc and add it to the knowledge base but was wondering if<br>
the same thing could be accomplished using existing API.<br>
<br>
Cheers,<br>
<font color="#888888"><br>
Samuli<br>
</font><div class="im"><br>
On 26.10.2010 9:51, Greg Barton wrote:<br>
&gt; <a href="http://downloads.jboss.com/drools/docs/5.1.1.34858.FINAL/drools-fusion/html/ch02.html#d0e241" target="_blank">http://downloads.jboss.com/drools/docs/5.1.1.34858.FINAL/drools-fusion/html/ch02.html#d0e241</a><br>

&gt;<br>
&gt; Use type declaration and @role(event)<br>
&gt;<br>
&gt; --- On Tue, 10/26/10, Samuli Saarinen&lt;<a href="mailto:samuli.saarinen@remion.com">samuli.saarinen@remion.com</a>&gt;  wrote:<br>
&gt;&gt;<br>
</div><div><div></div><div class="h5">&gt;&gt; I&#39;m looking for a way to declare facts as events using an<br>
&gt;&gt; API. Would<br>
&gt;&gt; anyone happen to know if such an API exists in drools?<br>
&gt;&gt;<br>
&gt;&gt; Cheers,<br>
&gt;&gt;<br>
&gt;&gt; Samuli<br>
<br>
<br>
<br>
<br>
--<br>
Remion Oy           Etävalvontajärjestelmät liiketoiminnan<br>
Samuli Saarinen           tehostamiseen<br>
gsm +358 (0)50 3560075<br>
fax +358 (0)3 2125064       <a href="http://www.remion.com" target="_blank">www.remion.com</a><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>