Loading TOC...

alert.spawnMatchingActions

alert.spawnMatchingActions(
   $config-uri as String,
   $doc as Node,
   $options as Options
) as null

Summary

Finds the rules that match the specified document and spawns their associated actions. The spawned tasks will run as the user that owns the rule.

Parameters
$config-uri The alerting configuration from which to match rules.
$doc The document to match against.
$options The options to pass to alert.spawn when spawning each action.

Example

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

  

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

Comments