MarkLogic Server 11.0 Product Documentation
alert:spawn-matching-actions

alert:spawn-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 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 node to pass to xdmp:spawn when spawning 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:spawn-matching-actions("http://myconfig/uri/", 
           fn:doc("/mydocs/doc.xml"), <options xmlns="xdmp:eval"/>)
  
Powered by MarkLogic Server | Terms of Use | Privacy Policy