Samples > Rule Team Server Business Rule Management Extensions > How to Extend the Rule Model

This sample shows how to extend the default properties of the rule packages and business rules, and how to customize web pages to display these properties.

Key Features

Key features of this sample include:

Installing this Sample

To install this sample through the Samples Console:

  1. Go to the Samples Console and locate the teamserver > serverextendedbrm sample.
  2. Check that the Samples Server is started. For information on how to start and stop the Samples Server, see Stopping and Restarting the Samples Server from the Samples Console.
  3. Execute the repack command to compile and repackage the application into a new deployable file.
  4. Execute the run command to set the extensions and deploy the new application.
  5. The database schema is automatically updated by the Ant tasks.
  6. Wait for the Java EE application to start before continuing. (The server trace displays the message: [EARDeployer] Started J2EE application.)

Running this Sample

This sample can only be opened and run in the Samples Console.

To open and run the sample:

  1. Open a web browser and enter the following URL to access Rule Team Server:
  2. http://localhost:8080/teamserver?datasource=jdbc/serverextendedbrm
    The datasource parameter on the URL instructs Rule Team Server to use a specific datasource which supports the extended database schema and provides access to an extended rule type, Extended Rule.
  3. Sign in to Rule Team Server using the following details:
  4. Username: rtsAdmin
    Password: rtsAdmin
  5. To create a rule of type Extended Rule:
    1. Click the Compose tab.
    2. Click Extended Rule in the Start from a type list, then click OK in the Type Information page.
  6. The Extended Rule properties are defined in 8 steps.
  7. Custom properties are defined in Step 1: Properties, Step 5: Edit Additional Properties, and Step 6: Edit Target Release, as follows:
    1. In Step1: Properties, the custom field Customer Names allows you to enter a comma-separated list of values (in this case, customer names).
    2. Click Step 5: Edit Additional Properties > New. This step includes four customized fields:
    3. Click Next to go to Step 6: Edit Target Release, and then click New.
    4. Click Apply.
    5. Click Finish.
  8. Return to the Samples Console and execute the feed command.
  9. This updates the custom properties, such as the options in the hierarchical list of department authorities for the Authority property in Step 5: Edit Additional Properties.

Source Files

This sample is located in <InstallDir>/teamserver/samples/serverextendedbrm.

The source files for the new extension model are located in:

<InstallDir>/teamserver/samples/serverextendedbrm/resources

The source file for the configuration is located in:

<InstallDir>/teamserver/samples/serverextendedbrm/config

The source files for the customization are located in:

<InstallDir>/teamserver/samples/serverextendedbrm/src/serverextendedbrm

Highlights

Highlights of this sample include:

Rebuilding this Sample

To rebuild this sample.

  1. Execute the clean command.
  2. Execute the build command.

Related Concepts

Rule Model Extension Schema

Related Tasks

Customizing Rule Team Server
Defining Common Model Extensions for Rule Studio and Rule Team Server

Related Reference

Rule Model Extension Editor