This only makes sense if your rules use constraints with temporal operators,<br>so you'll have to know at "rule writing time". So, I don't quite see why you'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'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"><<a href="mailto:samuli.saarinen@remion.com">samuli.saarinen@remion.com</a>></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'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 "automatically" 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>
> <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>
><br>
> Use type declaration and @role(event)<br>
><br>
> --- On Tue, 10/26/10, Samuli Saarinen<<a href="mailto:samuli.saarinen@remion.com">samuli.saarinen@remion.com</a>> wrote:<br>
>><br>
</div><div><div></div><div class="h5">>> I'm looking for a way to declare facts as events using an<br>
>> API. Would<br>
>> anyone happen to know if such an API exists in drools?<br>
>><br>
>> Cheers,<br>
>><br>
>> 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>