alert.spawnMatchingActions( config-uri as String, doc as Node, options as Options ) as null
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.
|
const alert = require("/MarkLogic/alert.xqy"); alert.spawnMatchingActions("http://acme.com/alert/message-board", fn.doc("/xml/foo.xml"), {"priority":"higher"})
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.