Samples > Rule Team Server Business Rule Management Extensions > How to Extract a Ruleset Archive

This sample shows how to extract ruleset archives from a Rule Team Server project, create a baseline, and deploy a RuleApp to Rule Execution Server.

Key Features

Key features include:

Installing this Sample

To install this sample:

  1. Go to the Samples Console and locate the teamserver > serverrulesetextraction 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 build command to build the application.

Running this Sample

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

To open and run this sample:

  1. Execute the getfirstruleset query command to get a ruleset from a predefined extractor in Rule Team Server.
  2. Execute the getsecondruleset query command to get a ruleset from another extractor in Rule Team Server.
  3. Rulesets are written to the output directory.
  4. (Optional) Execute the createbaseline command to set a baseline from the current state of the project.
  5. You can check that the baseline (mybaseline) has been created by signing in to Rule Team Server, selecting the loanvalidation-rules project, and then selecting Consult a baseline in the Home tab: http://localhost:8080/teamserver
  6. Execute the deploy command to deploy a RuleApp containing the two rulesets to Rule Execution Server.
  7. When deployment is complete, check that the RuleApp is available in Rule Execution Server: http://localhost:8080/bres, and that the two rulesets are different.

Source Files

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

RTSClient.java - The class connecting to Rule Team Server. It contains methods to get rulesets, create baselines, and deploy RuleApps to Rule Execution Server.

Highlights

The highlights of this sample include:

Rebuilding this Sample

To rebuild this sample:

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

Related Concepts

Rulesets and Ruleset Archives
Extracting Artifacts to be Put in a Ruleset

Related Reference

Deploying and Exporting RuleApps