Groovy Template for a Custom Rule

In the Orchestrator Studio, the Custom Rule Request design page provides the following code template to help you create a custom rule using Groovy:

Groovy Code Template for a Custom Rule

The following list describes the highlighted sections in the preceding code:

  1. You can add or remove import lines as necessary.

  2. Do not modify the function definition or script definition.

  3. Copy and paste the code in the commented lines and use them in your script.

    The code lines include parameters for defining a string, numeric value, date format, and date value. They also include parameters for including a warning or log statements in the AIS Server log, which can be used for debugging script issues.

The Groovy template also includes an orchAttr that enables you to include additional information in the Groovy script. See Additional Attributes and Methods Available in the Groovy Script Templates.