]
Jaroslaw Kijanowski updated JBRULES-2154:
-----------------------------------------
Component/s: drools-core (fusion)
(was: drools-compiler (fusion))
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-core (fusion)
Affects Versions: 5.0.1.FINAL
Reporter: Jaroslaw Kijanowski
Assignee: Edson Tirelli
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: