This only makes sense if your rules use constraints with temporal operators,
so you'll have to know at "rule writing time". So, I don't quite see why you'd
want or need to do that.

The information from a declare is stored by the compiler; this API (even if
exposed) would not help you, as you'd have to access it during the compilation,
or do all that what needs to be done while compiling a declare. Creating a
text and compiling this as a .DRL is much simpler.

-W

On 26 October 2010 09:07, Samuli Saarinen <samuli.saarinen@remion.com> wrote:
Hi,

I'm aware of that but was looking for a way to do it using some API. I
am inserting some objects to the engine and would like to declare them
as events "automatically" before inserting. I could generate the snippet
shown in the doc and add it to the knowledge base but was wondering if
the same thing could be accomplished using existing API.

Cheers,

Samuli

On 26.10.2010 9:51, Greg Barton wrote:
> http://downloads.jboss.com/drools/docs/5.1.1.34858.FINAL/drools-fusion/html/ch02.html#d0e241
>
> Use type declaration and @role(event)
>
> --- On Tue, 10/26/10, Samuli Saarinen<samuli.saarinen@remion.com>  wrote:
>>
>> I'm looking for a way to declare facts as events using an
>> API. Would
>> anyone happen to know if such an API exists in drools?
>>
>> Cheers,
>>
>> Samuli




--
Remion Oy           Etävalvontajärjestelmät liiketoiminnan
Samuli Saarinen           tehostamiseen
gsm +358 (0)50 3560075
fax +358 (0)3 2125064       www.remion.com
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users