Rule Designer build automation tool

Rule Designer provides a tool to automate builds and ruleset extraction from the command line. The build automation tool starts Rule Designer in headless mode, that is, with no user interface for the development environment.

This tool works for both classic rule projects and decision services. However, the headless deployment tool is recommended for decision services (see Automated deployment of decision services).

In the same build, you import the projects into the workspace, apply an extension model, build the projects, and generate ruleset archives.

You can use the build automation tool to test builds in Rule Designer, and then run automated builds from the command line. The ilog.rules.studio.automation plug-in contains the ilog.rules.studio.automation.builder application.

You use arguments in the command line to specify the different steps that are involved in the build. For example, you use arguments to define the paths to the projects to import and to specify whether to remove existing projects from the workspace before building. All arguments are optional, but you must at least specify the name of the rule project to build.

Note:
The following information is mandatory for running the tool:
  • The name of the decision operation to use when the automated build generates the ruleset archive for a decision service.
  • The list of rule projects to build is mandatory, except when you use the help option -h.

You can use more arguments on the command line, for example, the name of the extractor to use when you generate the ruleset archive for a classic rule project.

Running the build automation tool from the command line

The build automation tool supports command-line arguments, which you can use to set up automated builds.

In the command line, you specify the arguments and the rule projects to build. With classic rule projects, you can also use extractors to filter the rules. With decision services, you can choose the decision operation that you want to use for generating the ruleset archive. All arguments and extractors are optional, but you must at least specify the name of the rule projects to build.

To filter the rules when you generate a ruleset archive, use a question mark (?) between the rule project name and the extractor name or decision operation, for example:
  • If you are using a classic rule project, write <rule_project_name>?<extractor_name>
  • If you are using a decision service, write <rule_project_name>?<operation_name>

To run the build automation tool for different operating systems, write command lines similar to the following examples:

Windows
eclipsec -application ilog.rules.studio.automation.builder 
-noSplash
-nl en_US

You can then add the arguments, the rule projects to build, and the extractor to filter the rules. If your rule project name contains spaces, use double quotation marks as separators.

For example, if you are using a classic rule project:
-importPath "<path_to_xom_project>;<path_to_rule_project>" <rule_project_name>?<extractor_name>
                     
If you are using a decision service, use the following syntax:
-importPath "<path_to_xom_project>;<path_to_rule_project>" <rule_project_name>?<operation_name>
                     
Here is an example of a complete command line with no filter:
eclipsec -application ilog.rules.studio.automation.builder 
-noSplash
-nl en_US
-importPath "my_workspace/rulesetextraction/rulesetextraction_xom;my_workspace/rulesetextraction/rulesetextraction_rules" 
-cleanBuild 
-buildOptions BUILD_CHECK_IRL|BUILD_INCLUDES_RULE_VALIDATION rulesetextraction_rules
UNIX
eclipse -application ilog.rules.studio.automation.builder 
-noSplash
-nl en_US

You can then add the arguments, the rule projects to build, and the extractor to filter the rules. If your rule project name contains spaces, use double quotation marks as separators.

For example, if you are using a classic rule project:
-importPath <path_to_xom_project>:<path_to_rule_project>
                        <rule_project_name>?<extractor_name>
                     
If you are using a decision service, use the following syntax:
-importPath <path_to_xom_project>:<path_to_rule_project>
                        <rule_project_name>?<operation_name>
                     
Here is an example of a complete command line with no filter:
eclipse -application ilog.rules.studio.automation.builder 
-noSplash
-nl en_US
-importPath "my_workspace/rulesetextraction/rulesetextraction_xom:my_workspace/rulesetextraction/rulesetextraction_rules" 
-cleanBuild 
-buildOptions BUILD_CHECK_IRL|BUILD_INCLUDES_RULE_VALIDATION rulesetextraction_rules

Command-line arguments for the automated build

The following table lists the command line arguments that you can use to define your automated build.

Table 1. Build command line arguments
Argument name Description Default
-? (-h) Prints usage information and then exits. -
-autoRefresh

Refreshes the workspace automatically if Eclipse determines that the contents of the workspace are changed.

For example, set this argument to true when modify the contents of the workspace outside Eclipse.

false
-brdx <file>

Specifies the path to the .brdx extension model file to use.

If you specify the .brmx file, you must also specify a .brdx file.

-
-brmx <file>

Specifies the path to the .brmx extension model file to use.

If you specify the .brdx file, you must also specify a .brmx file.

-
-buildOptions

Specifies the build options to use, separated by the pipe (|) character. Build options that you do not specify are set to false, except for BUILD_GENERATE_IRL, which is always set to true.

You can use the following build options:
  • BUILD_GENERATE_IRL: Generates IRL during build

  • BUILD_CHECK_IRL: Performs IRL checks during build

  • BUILD_INCLUDES_B2X_VALIDATION: Performs BOM to XOM checks during build

  • BUILD_INACTIVE_RULES: Builds rules for which the property "active" is false

  • BUILD_INCLUDES_RULE_VALIDATION: Performs rule analysis during build

The build is incremental.

BUILD_GENERATE_IRL is always set to true
-cleanBuild Cleans the results of prior workspace builds before it rebuilds. false
-clearWorkspace Removes all projects from the workspace before it imports projects. Project contents remain intact. false
-failFast Stops the build if any rule project contains errors. false
-importPath <val>

Specifies the list of projects to import into the workspace before building. The list uses the File.separator system property.

The paths of projects to import are separated by a semicolon (;) for Windows and by a colon (:) for UNIX.

-
-nl <language> Sets the language for the applications, for example, -nl en_US for American English. -
-noSplash Bypasses the splash screen on startup. -
-output or -o <val>

Specifies the name of the output directory to store the generated ruleset archive.

You must specify an existing folder. If you do not specify an output directory, the ruleset archive is stored in the output directory of the rule project (./output). If you specify a relative path, the path is relative to the parent rule project that is being processed.

-
-refresh Refreshes the entire workspace prior to building projects. false

For more information about the arguments supported by the IlrAutomator class, refer to IlrBuildCommandLineArguments.