[rules-users] recursive queries
Mark Proctor
mproctor at codehaus.org
Thu Jul 14 10:48:02 EDT 2011
Drools 5.2 allows queries to call queries. It also allows rules to call
a query. It also allows "unification" of variables, which means a
variable can be left unbound.
That said quite a few bugs have turned up and I strongly recommend you
use HEAD for the moment on this feature:
https://hudson.jboss.org/jenkins/job/drools/lastSuccessfulBuild/artifact/drools-distribution/target/
Look at the "New and Noteworthy" docs on the backward chaining
derivation queries. ch05 might need to be updated with better clarification.
Mark
On 14/07/2011 15:27, Simon Chen wrote:
> Hi all,
>
> I am wondering if it is possible to write more complex queries, e.g.,
> running a query inside of a query. An example is that I have one query
> to enumerate all books, and have another query to enumerate the people
> that have not read all books.
>
> According to a colleague of mine, the syntax for a query only allows
> the entity LHS in its declaration:
> http://docs.jboss.org/drools/release/5.2.0.CR1/drools-expert-docs/html/ch05.html#d0e5565
>
> By definition, the entity LHS cannot contain the keyword query, as it
> can only contain conditional elements:
> http://docs.jboss.org/drools/release/5.2.0.CR1/drools-expert-docs/html/ch05.html#RuleLanguage-ConditionalElements
>
> Any thoughts?
>
> Thanks.
> -Simon
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
More information about the rules-users
mailing list