MarkLogic 9 Product Documentation
alert:invoke-matching-actions

alert:invoke-matching-actions(
   $config-uri as xs:string,
   $doc as node(),
   $options as node()
) as empty-sequence()

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 node to pass to xdmp:invoke when invoking each action. The options node should be in the xdmp:eval namespace.

Example

  xquery version "1.0-ml";
  import module namespace alert = "http://marklogic.com/xdmp/alert" 
		  at "/MarkLogic/alert.xqy";

  alert:invoke-matching-actions("http://myconfig/uri/", 
           fn:doc("/mydocs/doc.xml"), <options/>)
  
Powered by MarkLogic Server | Terms of Use | Privacy Policy