流口水中的时间运算符,在时间范围内和另一个动作之后发生的动作
temporal operator in drools,action that happened within frame of time and after another action
我在对象 A 中有一个及时发生一次的字段和可能在某个固定时间点发生的字段 accountActivationDate。
我想在 drools 中检查 A 是否在 accountActivationDate 发生后的 3 天内发生。
$t: Transaction(amount > 2000, A after[3d] accountActivationDate)
这不是我要找的原因,如果 A 发生在 accountActivationDate 之后的 1 天,那么根据流口水,声明是错误的,我希望它在 3 天过去之前是正确的。
感谢您的帮助
好的,我找到了对我来说足够好的解决方案,它很简单:
$t: Transaction(amount > 2000, A after[1ms,3d] accountActivationDate)
我在对象 A 中有一个及时发生一次的字段和可能在某个固定时间点发生的字段 accountActivationDate。
我想在 drools 中检查 A 是否在 accountActivationDate 发生后的 3 天内发生。
$t: Transaction(amount > 2000, A after[3d] accountActivationDate)
这不是我要找的原因,如果 A 发生在 accountActivationDate 之后的 1 天,那么根据流口水,声明是错误的,我希望它在 3 天过去之前是正确的。
感谢您的帮助
好的,我找到了对我来说足够好的解决方案,它很简单:
$t: Transaction(amount > 2000, A after[1ms,3d] accountActivationDate)