[jboss-jira] [JBoss JIRA] (JBRULES-3543) KnowledgeAgent: Doesn't remove insertLogical() Facts correctly with incremental build

Davide Sottara (JIRA) jira-events at lists.jboss.org
Sat Aug 4 22:14:07 EDT 2012


    [ https://issues.jboss.org/browse/JBRULES-3543?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12709878#comment-12709878 ] 

Davide Sottara commented on JBRULES-3543:
-----------------------------------------

I have found the issue and submitted a PR.. the problem is not in the KA itself, but in the engine itself.  
Please notice that you also have a cut-and-paste error in your example. You're always setting the message and status
on the same "message" instead of "message2" and "message3"
                
> KnowledgeAgent: Doesn't remove insertLogical() Facts correctly with incremental build
> -------------------------------------------------------------------------------------
>
>                 Key: JBRULES-3543
>                 URL: https://issues.jboss.org/browse/JBRULES-3543
>             Project: Drools
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: drools-core  (expert)
>    Affects Versions: 5.3.1.Final, 5.4.0.Final
>         Environment: Windows 7
> Java jdk1.7.0_03, 32 Bit
> Eclipse 3.6.2
>            Reporter: Torsten Schöne
>            Assignee: Mark Proctor
>              Labels: KnowledgeAgent
>         Attachments: Drools Project.zip, test.log
>
>
> 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
> {code:}
> when
>         Message(status == Message.HELLO)
>         Message()
> {code}
> TO:
> {code:}
> when
>         Message()
>         Message(status == Message.HELLO)
> {code}
> 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

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       



More information about the jboss-jira mailing list