Issue Type: Bug Bug
Affects Versions: 5.4.0.Final, 5.3.1.Final
Assignee: Mark Proctor
Attachments: test.log
Components: drools-core (expert)
Created: 14/Jun/12 3:28 AM
Description:

When the KnowledgeAgent is used with the property "newInstance = false" (incremental build), then facts inserted with insertLogical() don't always get removed correctly when there is a rule update. As i understand it, all facts which are inserted via insertLogical() should be retracted when the old rule is removed. With some rules of mine this is done correctly, but with other only a part is getting removed.

I created a little test project based upon the drools example project where the problem always happens. After setting up the KnowledgeAgent, KnowledgeBase and StatefulKnowledgeSession, 3 facts are inserted into the session, which fires 9 consequences. Each consequence creates an object and inserts it via insertLogical. When i switch the two statements of the LHS from

when
        Message(status == Message.HELLO)
        Message()

TO:

when
        Message()
        Message(status == Message.HELLO)

When the rule is removed only 3 of the 9 objects get retracted.

The code and a log for the eclipse audit view from this this case are attached

Environment: Windows 7
Java jdk1.7.0_03, 32 Bit
Eclipse 3.6.2
Project: Drools
Labels: KnowledgeAgent
Priority: Major Major
Reporter: Torsten Schöne
Security Level: Public (Everyone can see)
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira