[rules-users] configuring timings for event expiry

Davide Sottara dsotty at gmail.com
Wed Mar 13 08:27:17 EDT 2013


If I understand your question correctly, you'd like to use variable
values in the after[] operator parameters.
Unfortunately, temporal operators can only work with literal bounds. The
reason is that the values - 0,10s  in this case -
are used by a constraint propagation algorithm to infer the automatic
expiration times for no longer
needed events. This algorithm is run at compile time - it's too
expensive to do so at runtime - and it would not be
possible to do so if the values were not known at compile time.

Do you just need a variable temporal constraint, or do you also need
(automatic) event retraction?
There could be many options then, depending on your specific requirements
Davide

On 03/13/2013 05:04 AM, Wolfgang Laun wrote:
> On 12/03/2013, rule_dev <talal_kamar at hotmail.com> wrote:
>> Hi ,
>>
>> I was wondering if it is possible to write a rule in such a way that you
>> are
>> able to set the 'this after' for events using an attribute from a class.
>>
>> rule "correlate orders"
>> when
>>     $bo : BuyOrderEvent( $id : id )
>>     $ae : AckEvent( id == $id, this after[0,10s] $bo )
>> then
>>     // do something
>> end
>>
>> in the above rule template I would like to set the "this after [0,10]" part
> This is one operand plus one operator, which will be difficult to
> replace by data. Can you describe your problem in terms of data types
> and operations (and not by "textual replacement")?
> -W
>
>> using a custom value from say a date attribute of the BuyOrderEvent class.
>>
>> Thanks for your time.
>>
>>
>>
>> --
>> View this message in context:
>> http://drools.46999.n3.nabble.com/configuring-timings-for-event-expiry-tp4022792.html
>> Sent from the Drools: User forum mailing list archive at Nabble.com.
>> _______________________________________________
>> rules-users mailing list
>> rules-users at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/rules-users
>>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>



More information about the rules-users mailing list