[rules-users] query created in guvnor 5.3.0.final does not return expected results

vadlam sreeram.vadlamudi at wellsfargo.com
Fri Jan 27 19:53:35 EST 2012


I have created a query in guvnor 5.3  in a separate drl file as follows. 

query "get total Documents created"

document : Document( )

end 

I have several rules that create Documents as part of the ruleflow. 


 on the java side

 ksession.fireAllRules(new RuleFilter());  // the rulefilter does not really
do anything except log the 
                                                       //rules               
executing

  org.drools.runtime.rule.QueryResults results =
ksession.getQueryResults("get total Documents created");
                        System.out.println( "we have " + results.size() +"
Documents" );

I see that the returned results size is 0

but the following code returns the documents as expected.

 Collection responseObjects = ksession.getObjects();

is there anything I am missing with respect to the query ? I use a ruleflow
. does the query need to be part of any of the ruleflowgroups within the
ruleflow ?

is there a way to know whether the query ran or not ?



--
View this message in context: http://drools.46999.n3.nabble.com/query-created-in-guvnor-5-3-0-final-does-not-return-expected-results-tp3695002p3695002.html
Sent from the Drools: User forum mailing list archive at Nabble.com.



More information about the rules-users mailing list