Loading TOC...

alert.invokeMatchingActions

alert.invokeMatchingActions(
   $config-uri as String,
   $doc as Node,
   $options as Object
) as null

Summary

Finds the rules that match the specified document and invokes their associated actions. The actions will be invoked as the user who owns each rule in a different transaction.

Parameters
$config-uri The alerting configuration from which to match rules.
$doc The document to match against.
$options The options to pass to xdmp.invoke when invoking each action.

Example

  var alert = require("/MarkLogic/alert.xqy");
 
  alert.invokeMatchingActions("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.

Comments