Working with Ruleset Extension Points

A ruleset extension point associates a ruleset with an extension point and defines whether the ruleset executes before, after, or instead of the method defined by the extension point.

To define an ruleset extension point, see the following:

About Ruleset Extension Points

A ruleset extension point associates a ruleset with an extension point and defines whether the ruleset executes before, after, or instead of the method defined by the extension point.

There are two types of ruleset extension points, and the type determines which of the two Ruleset Extension Point editors you use.

  • Specification-based ruleset extension points associate a ruleset with a specification-based extension point. You use the "Ruleset Extension Point Editor" when configuring these types of ruleset extension points.

  • Global ruleset extension points associate a ruleset with a global extension point. You use the "Ruleset Extension Point-Global Editor" when configuring these types of ruleset extension points.

Related Topics

Creating Ruleset Extension Points

Configuring Ruleset Extension Points

Working with Extension Points

Creating Ruleset Extension Points

The ruleset extension point associates an extension point to a ruleset, and defines the placement of the ruleset.

To create a ruleset extension point:

  1. From the Studio menu, select New, then select Inventory, then select Administration, and then do one of the following:

    • Select Ruleset Extension Point to associate a ruleset with a specification-based extension point.

    • Select Ruleset Extension Point-Global to associate a ruleset with a global extension point.

    Depending on your selection, the Ruleset Extension Point Wizard or Ruleset Extension Point-Global Wizard 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 extension point.

  4. (Optional) Select a location for the new ruleset extension point.

    By default, 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 Ruleset Extension Points

Ruleset Extension Point Editor

Ruleset Extension Point-Global Editor

Configuring Ruleset Extension Points

After you create a ruleset extension point, you must configure it.

To configure a ruleset extension point

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

    See "Creating Ruleset Extension Points" for more information.

  2. In the Ruleset field, do one of the following:

    • Click Ruleset to create a new ruleset. See "Creating Rulesets" for more information.

    • Click Select to select an existing ruleset. The Ruleset dialog box appears, displaying all available rulesets.

  3. In the Point field, do one of the following:

    • Click Point to create a new extension point. See "Creating Extension Points" for more information.

    • Click Select to select an existing extension point. The Extension Point dialog box appears, displaying all available extension points. The list displays only those extension points that are applicable to the type of ruleset extension point. For example, if you are configuring the ruleset in the Ruleset Extension Point-Global editor, only those extension points defined as global appear in the list. See "Working with Extension Points" for more information.

  4. In the Placement field, define whether the ruleset executes before, after, or instead of the method defined by the extension point.

    See "Ruleset Extension Point Editor"or "Ruleset Extension Point-Global Editor" for more information about this field.

  5. From the File menu, select Save.

Associating Specification-Based Ruleset Extension Points to Specifications

Ruleset extension points must be associated with an instance of a specification in order to execute. This is not applicable to global ruleset extension points (rulesets at a global extension point can execute without being associated to a specification).

To associate specification-based ruleset extension points to specifications:

  1. Navigate to the editor of an existing specification to which you want to associate a ruleset extension point.

  2. Click the Rules tab.

  3. Do one of the following:

    • Click Select to select an existing ruleset extension point.

    • Click Add to create and select a new ruleset extension point. See "Creating Ruleset Extension Points" for more information. When you have completed working on the new ruleset extension point, return to the editor of the specification to which you want to associate this ruleset.

    • Select a ruleset extension point in the table and click Open to view the ruleset extension point in the Ruleset Extension Point editor.

    • Select a ruleset extension point in the table and click Remove to delete the association.

  4. From the File menu, select Save.

See UIM Developer's Guide for more information.

Ruleset Extension Point Editor

Use to associate a ruleset with a specification-based extension point, and to define the custom code placement.

Field Use
Ruleset Do one of the following:
  • Click Ruleset to create a new ruleset.

  • Click Select to select an existing ruleset.

  • Click Clear to remove a previously selected ruleset.

Point Do one of the following:
  • Click Point to create a new specification-based extension point.

  • Click Select to select an existing specification-based extension point.

  • Click Clear to remove a previously selected specification-based extension point.

See "Working with Extension Points" for more information.

Placement Define whether the ruleset executes before, after, or instead of the method defined by the extension point.
  • Select Before to run the ruleset before the method specified by the signature. For an extension point of type call, the custom code is weaved before the call to the method. For an extension point of type execution, the custom code is weaved within the method before the first line of executable code.

  • Select After to run the ruleset after the method specified by the signature. For an extension point of type call, the custom code is weaved after the call to the method. For an extension point of type execution, the custom code is weaved within the method after the last line of executable code.

  • Select Instead to run the ruleset instead of the method specified by the signature. For an extension point of type call, the custom code is weaved in place of the call to the method. For an extension point of type execution, the custom code is weaved within the method in place of the executable code.


Related Topics

Configuring Ruleset Extension Points

Associating Specification-Based Extension Points to Rulesets

Ruleset Extension Point-Global Editor

Use to associate a ruleset with a global extension point, and to define the custom code placement.

Field Use
Ruleset Do one of the following:
  • Click Ruleset to create a new ruleset. See "Creating Ruleset Extension Points" for more information.

  • Click Select to select an existing ruleset. The Ruleset dialog box appears, displaying all available rulesets.

  • Click Clear to remove a previously selected ruleset.

Point Do one of the following:
  • Click Point to create a new global extension point. See "Creating Extension Points" for more information.

  • Click Select to select an existing global extension point. The Extension Point dialog box appears, displaying all available global extension points.

  • Click Clear to remove a previously selected extension points.

See "Working with Extension Points" for more information.

Placement Define whether the ruleset executes before, after, or instead of the method defined by the global extension point.
  • Select Before to run the ruleset before the method specified by the signature. For an extension point of type call, the custom code is weaved before the call to the method. For an extension point of type execution, the custom code is weaved within the method before the first line of executable code.

  • Select After to run the ruleset after the method specified by the signature. For an extension point of type call, the custom code is weaved after the call to the method. For an extension point of type execution, the custom code is weaved within the method after the last line of executable code.

  • Select Instead to run the ruleset instead of the method specified by the signature. For an extension point of type call, the custom code is weaved in place of the call to the method. For an extension point of type execution, the custom code is weaved within the method in place of the executable code.


Related Topics

Associating Global Extension Points with Rulesets

Configuring Ruleset Extension Points