Loading TOC...

MarkLogic 9 Product Documentation
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

  var alert = require("/MarkLogic/alert.xqy");
 
  alert.findMatchingRules("http://acme.com/alert/message-board",
                          fn.doc("/xml/foo.xml"))
  

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.