alert.ruleSetOptions

alert.ruleSetOptions(
   rule as Object,
   options as Object
) as Object

Summary

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.

Example

  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"}
  
Powered by MarkLogic Server | Terms of Use | Privacy Policy