alert:spawn-matching-actions( $config-uri as xs:string, $doc as node(), $options as node() ) as empty-sequence()
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.
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"/>)