[jboss-jira] [JBoss JIRA] Resolved: (JBRULES-2154) equality assertion behavior not supported in streams

Edson Tirelli (JIRA) jira-events at lists.jboss.org
Tue Jul 13 12:21:59 EDT 2010


     [ https://jira.jboss.org/browse/JBRULES-2154?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Edson Tirelli resolved JBRULES-2154.
------------------------------------

    Fix Version/s: 5.1.0.CR1
       Resolution: Done


This is fixed. Thank you for reporting and providing test case.


> equality assertion behavior not supported in streams
> ----------------------------------------------------
>
>                 Key: JBRULES-2154
>                 URL: https://jira.jboss.org/browse/JBRULES-2154
>             Project: Drools
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: drools-core (fusion)
>    Affects Versions: 5.0.1.FINAL
>            Reporter: Jaroslaw Kijanowski
>            Assignee: Edson Tirelli
>             Fix For: 5.1.0.CR1
>
>         Attachments: DroolsTest.java, Message.java, Sample.drl
>
>
> Happens with 5.0.1 and trunk 27324
> I've configured my knowledge base to use the EQUALITY assertion behavior.
> When I insert two equal facts into the session, only one gets processed (objects and their fact handles are equal).
> However when I insert two equal facts via streams, my rule fires twice (objects are equal, but their fact handles are not). Isn't equality assertion behavior supported when using streams?
> Attaching rule, model and test class.
> If you run it you will see following output:
> equal
> 1
> That's expected. If you remove the comment from
> WorkingMemoryEntryPoint stream = ...
> FactHandle fh1 = stream.insert(message1);
> FactHandle fh2 = stream.insert(message2);
> and comment out
> FactHandle fh1 = ksession.insert(message1);
> FactHandle fh2 = ksession.insert(message2);
> and modify the rule file to use streams (just remove comments)
> you will get this output:
> 1
> 1
> Means the rule fired twice.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list