alert.findMatchingRules

alert.findMatchingRules(
   config-uri as String,
   doc as Node
) as Array

Summary

Returns a list of all rules associated with the specified config that match the specified document. You must have the alert-admin privilege to call this function.

Parameters
config-uri The alerting configuration from which to match rules.
doc The document to match against.

Example

  const alert = require("/MarkLogic/alert.xqy");
 
  alert.findMatchingRules("http://acme.com/alert/message-board",
                          fn.doc("/xml/foo.xml"))
  
Powered by MarkLogic Server | Terms of Use | Privacy Policy