Resolution: The query agent is a readonly and do not use rule sets. The query rule function can be invoked only from the pre-processor .