Loading TOC...

alert.ruleSetAction

alert.ruleSetAction(
   rule as Object,
   action as String
) as Object

Summary

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.

Example

  const 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"
  

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.