Search code examples
javadrools

temporal operator in drools,action that happened within frame of time and after another action


I have a field in object A that happened once in time and field accountActivationDate which may happen at some fixed point of time.

I want to check in drools whether A happened in period of 3 days since accountActivationDate happened.

$t: Transaction(amount > 2000, A after[3d] accountActivationDate)

This is not what i'm looking for cause if A happened 1 day after accountActivationDate then statement is false according to drools and i want it to be true until 3 days pass.

Thank you for help


Solution

  • Ok i found solution good enough for me it's simply:

    $t: Transaction(amount > 2000, A after[1ms,3d] accountActivationDate)