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

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

  
Powered by MarkLogic Server | Terms of Use | Privacy Policy