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

Jaroslaw Kijanowski (JIRA) jira-events at lists.jboss.org
Wed Jul 1 09:50:51 EDT 2009


equality assertion behavior not supported in streams
----------------------------------------------------

                 Key: JBRULES-2154
                 URL: https://jira.jboss.org/jira/browse/JBRULES-2154
             Project: JBoss Drools
          Issue Type: Bug
      Security Level: Public (Everyone can see)
          Components: drools-compiler (fusion)
    Affects Versions: 5.0.1.FINAL
            Reporter: Jaroslaw Kijanowski
            Assignee: Edson Tirelli


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/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list