I read in Drools guide, that queries can now call other queries.

But the guide doesn't give much details, mostly paying attention to a rather
specific case.

I have two queries having common parts and try to figure out how to  get rid
of duplicate code.

Here is the simplified form of queries I'd like to have:
---------

query query1
    $facts: List()
        from collect( Fact( name == "name1" ) )
end

query query2
    $l: List()
        from collect( Fact( value == "1" ) from ?query1() )
end

---------

query2 syntax is invalid and and it is not clear for me how $facts from
query1 can be accessed in query2.


--
View this message in context: 
http://drools.46999.n3.nabble.com/Call-query-from-other-query-tp3542082p3542082.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to