Description of problem: When changing elements of collection which is in working memory and calling the update (in program), rules are not evaluated again. Version-Release number of selected component (if applicable): BRMS 5.3.0 How reproducible: Pull-request incoming Steps to Reproduce: 1. Insert collection in working memory with a couple of elements. 2. Add / remove / change its element in program. 3. Call the update in program. 4. Verify re-evaluating the rules. Actual results: Rules are not re-evaluated again. Expected results: Rules to be re-evaluated again. Additional info:
Pul requested https://github.com/droolsjbpm/drools/pull/140 submitted
The test case has a mistake. After updating the collection, the application has to fire rules again, otherwise the actions on the rule will not be executed: ksession.update(handle, collection); ksession.fireAllRules(); Also, please note that since the collection is updated, and based on the way the rule is written, it will fire again for all elements in the collection. So the end result is the rule will fire 9 times, not 5: assertEquals(9, results.size()); The engine is working as expected. This is not a bug.