Reputation: 61
I have implemented Drools into my Java Project. All the rules fire but the conditions only get checked once immediately after being fired.
Is this the way Drools behaves? I need it to be constantly checking a boolean for any changes.
Upvotes: 0
Views: 728
Reputation: 27312
That's how a forward-chaining rule engine behaves (which is extremely efficient).
If your fact changes (so if the result of it's boolean property/method changes), the rule engine should be notified by workingMemory.updated(fact, factHandle)
. The rule engine will then fire all the rules (and not a single rule more) which need to be fired based on that change.
Upvotes: 2