alert.ruleSetAction( rule as Object, action as String ) as Object
This function returns the rule with the action updated.
Parameters | |
---|---|
rule | The representation of a rule. |
action | The action value to set for the given rule. |
var alert = require("/MarkLogic/alert.xqy"); alert.ruleSetAction( alert.getAllRules("http://acme.com/alert/message-board", cts.wordQuery("dna"))[0], "sms") => Returns the JSON representation of the rule with the new action updated to "sms"