[jboss-jira] [JBoss JIRA] Created: (JBRULES-1649) Queryresult.getFactHandles() returns bad handles

Jaroslaw Kijanowski (JIRA) jira-events at lists.jboss.org
Wed Jun 18 02:58:37 EDT 2008


Queryresult.getFactHandles() returns bad handles
------------------------------------------------

                 Key: JBRULES-1649
                 URL: http://jira.jboss.com/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
         Assigned To: Mark Proctor


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

        



More information about the jboss-jira mailing list