How to parameterize the after temporal constraint in Drools?

Viewed 106

I have a rule very similar to the following example:

rule "correlate orders"
when
    $bo : BuyOrderEvent( $id : id ) 
    $ae : AckEvent( id == $id, this after[0,10s] $bo )
then
    // do something
end

But I would like to parameterize the time (10 seconds in this example).

I tried using a String variable but I get:

java.lang.RuntimeException: Error parsing time string: [ $t1.max ]

Any ideas on how to achieve this?

0 Answers
Related