I would like to propose being able to make user defined queries for rule templates. I'm thinking exposing it from the integrator which could generate the query, and then expose the result to the rules engine. This would create a much more flexible...