Rule Builder > Debugging and Profiling > Testing the Execution of a Ruleset > Setting Up Ruleset Imports

Ruleset imports define the XOM classes that are required by the ruleset when you execute it. By default, ruleset imports are computed automatically by appending the packages of the BOM classes to the packages of the Current Engine Object Model classes. If the ruleset imports are incorrect, the parsing of the ruleset fails because the parser of the rule engine does not find the XOM classes. The Ruleset Imports panel of the Deployer Settings dialog box allows you to view or manually set the ruleset imports.

Viewing Ruleset Imports

The Ruleset Imports panel lists the imports required by your ruleset, which you defined in the Execution Object Model panel. An example is shown in Figure 16.4.

images/autoRulesetImports.gif

Figure 16.4    Viewing Ruleset Imports

Defining Ruleset Imports Manually

If you write execution rules directly using the IRL Editor, use classes that are not defined in the BOM, or want to resolve problems of conflicting class names (classes that have the same short name but not the same fully-qualified name), you may want to define the ruleset imports yourself.

To define the ruleset imports manually:

The top part of the Ruleset Imports panel displays the XOM classes available, while the bottom part displays the selected ruleset imports.

You can use the buttons at the top of the Ruleset Imports panel to view the three lists of available XOM classes shown in Table 16.2:

Table 16.2   XOM Classpath Buttons
Button 
Classpath 
Description 

images/bootClasspath_buttona.png

User Boot Java Classpath  Lists the archive files and directories that contain the Java classes needed by the Java Virtual Machine. 

images/systemClasspath_buttona.png

User System Java Classpath  Lists the archive files and directories that were specified on the command line that launched the Rule Builder. 

images/userClasspath_buttona.png

User Java Classpath  Lists the archive files and directories that you have specified in the Execution Object Model panel of the same dialog box. 

You can customize the view of available classes using the buttons shown in Table 16.3:

Table 16.3   View Buttons
Button 
View 
Description 

images/classHierarchy_buttona.png

Package Tree View  To view the available classes in a hierarchy of packages. If you select a package in the Package Tree View, all the classes of the package, that is, all the classes of the subpackages, will be added to the XOM. 

images/classList_buttona.png

Package List View  To view the available classes as a list of packages. In the Package List View, only the classes of the packages you select will be added. 

To choose a ruleset import:

  1. Click a package or a class in the list of available classes. Its full name is displayed in the text field in the middle of the panel.
  2. Click the add arrow in the middle of the dialog box or double-click the class. The class or package is appended to the list of imports. You can reorder the list using the Up and Down buttons.

You can add several packages or classes to the list of imports at the same time by selecting several packages and classes. To extend the selection from the first selected class to another selected class, use Shift-click, and to extend the selection only to members of a selected class, use Ctrl-click.

You can remove ruleset imports from the ruleset imports list by using the Delete button at the bottom of the panel.

See Also

Setting Up the Execution Object Model


Customer Support | Copyright © 1987-2004 ILOG S.A. All rights reserved. Legal terms. PREVIOUS   NEXT