How to parameterize the after temporal constraint in Drools?

帅比萌擦擦* 提交于 2019-12-11 03:58:47

问题


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?

来源:https://stackoverflow.com/questions/58195212/how-to-parameterize-the-after-temporal-constraint-in-drools

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!