You'd get this result even when there's no query with the name string
you use in the API call.
(1) Make sure that the name is correct.
(2) Make sure that there is a query with that name, e.g., by inspecting the
session's knowledge base at runtime.
-W
On 28/01/2012, vadlam <sreeram.vadlamudi(a)wellsfargo.com> wrote:
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-doe...
Sent from the Drools: User forum mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users