[
https://jira.jboss.org/jira/browse/JBRULES-1649?page=com.atlassian.jira.p...
]
Jaroslaw Kijanowski commented on JBRULES-1649:
----------------------------------------------
It's not reproducible anymore with trunk (rev. 26515)
Results returned by the query returns the same fact handles as those returned when
inserting facts into the session.
The drl was a simple query:
package com.sample
query "getTestFacts"
tf : TestFact()
end
Attaching test case.
Queryresult.getFactHandles() returns bad handles
------------------------------------------------
Key: JBRULES-1649
URL:
https://jira.jboss.org/jira/browse/JBRULES-1649
Project: JBoss Drools
Issue Type: Bug
Security Level: Public(Everyone can see)
Affects Versions: 4.0.7, 5.0.0.M1
Reporter: Jaroslaw Kijanowski
Assignee: Mark Proctor
Attachments: testGetFactHandleFromQueryResultsRow.java
This is present in 4.0.7 and trunk (rev. 20565)
I have following code:
TestFact tf1 = new TestFact();
TestFact tf2 = new TestFact();
FactHandle factHandle1 = workingMemory.insert(tf1);
FactHandle factHandle2 = workingMemory.insert(tf2);
workingMemory.fireAllRules();
System.out.println("Expected:");
System.out.println(tf1);
System.out.println(factHandle1);
System.out.println(tf2);
System.out.println(factHandle2);
System.out.println("Received:");
QueryResults queryResults = workingMemory.getQueryResults("getTestFacts");
for ( Iterator it = queryResults.iterator(); it.hasNext(); ) {
QueryResult result = ( QueryResult ) it.next();
System.out.println(result.get(0 ));
System.out.println( result.getFactHandles()[0] );
}
I would expect that result.getFactHandles() returns the same handle I got when I was
inserting the fact into the workingmemory
--
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