Macro Examples
The following examples show the structure and syntax of macros in rules.
Here’s an example macro showing the use of attributes, parameters, and “path” statements.
The following example calls a macro with namespace 'myNS' and macro name 'getSomething' defined with no parameters. Results of the macro are stored in the template context, and can be referenced using this expression: ${Rules.Eval.macroResults}.
This example sets the JSON node at path $.path.to.json.node with the result of macro myNS:getJsonValue defined with no parameters. This action will only be called if the macro myNS:shouldExecute (defined with one parameter) returns true.