Working with Rulesets

You use rulesets to control actions on certain entities at certain times and when conditions are met. You code business logic in a ruleset and you can execute a ruleset at multiple extension points. For example, you might define a ruleset to make a telephone number field's edit mask to be ### - ### - #### at creation time for all telephone numbers based on the North American Telephone Number specification.

You use rulesets to extend and customize UIM by associating an extension point to a ruleset. Rulesets provide a capability to modify the business logic at run time.

When working with rulesets, see the following topics:

Creating Rulesets

You create rulesets to control actions on entities at specific times and under specific conditions.

To create a ruleset:

  1. From the Studio menu, select New, then select Inventory, then select Administration, and then select Ruleset.

    The Ruleset Wizard dialog box appears.

  2. From the Project drop-down list, select the project where the entity is to reside.

  3. In the Name field, enter the name of the ruleset.

    Note:

    For a ruleset entity, the text editor forces you to enter all capitals. Use underscores for readability, such as MY_RULE_SET.
  4. (Optional) Select a location for the new ruleset.

    By default, Oracle Communications Design Studio saves the entity to your default workspace location. You can enter a folder name in the Folder field or select a location different from the system-provided default. To select a different location:

    1. Click the Folder field Browse button.

    2. Navigate to the directory in which to save the entity.

    3. Click OK.

  5. Click Finish.

Related Topics

Configuring Rulesets

Ruleset Editor

Configuring Rulesets

After you create a ruleset, you must configure it.

To configure a ruleset:

  1. Open an existing ruleset or create a new one.

    See "Creating Rulesets" for more information.

  2. Click the Run Extension Language list arrow and select DROOLS or GROOVY, depending on which extension language you plan to use.

  3. Click Edit Drools Code or click Edit Groovy Code, depending on which extension language you plan to use.

    An empty DRL or GROOVY file opens.

    Note:

    Oracle recommends that you download the Drools or Groovy text editor and configure Design Studio to use the editor. The text editors can catch syntax errors that can be corrected as you write the ruleset, rather than waiting to catch the errors at compilation.
  4. Write the ruleset.

    See UIM Developer's Guide for detailed information about writing a ruleset.

  5. From the File menu select Save, then close the DRL or GROOVY file.

  6. From the File select Save again to save the ruleset.

Ruleset Editor

Use the Ruleset editor to create and configure rulesets.

When using the Ruleset editor to create or configure a ruleset, see the following topics:

Ruleset Editor Code Tab

Use the Ruleset editor Code tab to create rulesets in a DRL or GROOVY file.

Field Use
Run Extension Language Click to select which extension language to execute at runtime. Your choices are DROOLS or GROOVY.
Edit Drools Code Click to write a ruleset in a DRL file.
Edit Groovy Code Click to write a ruleset in a GROOVY file.

Related Topics

Working with Rulesets

Creating Rulesets

Configuring Rulesets

Ruleset Editor

Ruleset Editor Realization Tab

Use the Ruleset editor Realization tab to associate rulesets with a conceptual model service action.

Field Use
Realizes Click to open the selected service action in the Action editor.
Select Associates the ruleset with a conceptual model service action. To select from the available conceptual model service actions, there must be a dependency defined between your Inventory cartridge project and the Model project in which your conceptual model is saved. See ”Managing Project Dependencies” for more information.

Related Topics

Working with Conceptual Models

Working with Rulesets

Creating Rulesets

Configuring Rulesets

Ruleset Editor