alert.ruleSetOptions( rule as Object, options as Object ) as Object
This function returns the rule with the options of the rule updated.
Parameters | |
---|---|
rule | The representation of a rule. |
options | The options to set for the given rule. |
const alert = require("/MarkLogic/alert.xqy"); alert.ruleSetOptions( alert.getAllRules("http://acme.com/alert/message-board", cts.wordQuery("dna"))[0], {"emailAddress": "me@somedomain.com"}) => Returns the JSON representation of the rule with the options updated to "options": {"emailAddress": "me@somedomain.com"}