Samples > Rule Team Server Business Rule Management Extensions > How to Execute a Query

This sample shows how a deployment manager can execute predefined queries to detect errors, and filter rules using appropriate APIs.

Key Features

Key features of this sample include:

Installing this Sample

To install this sample through the Samples Console:

  1. In the Samples Console locate the teamserver > serverqueryexecute 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 the sample:

  1. Execute the run command to run the default query (created by) on the loan-validation project.
  2. You can specify another project and/or query with arguments:
  3. ant run -Dproject=myproject -Dquery=queries/createdby.txt

Source Files

This sample is located in: <InstallDir>/teamserver/samples/serverqueryexecute

RTSClient.java is the class that connects to Rule Team Server and executes the query.

The query files for this sample are located in:

<InstallDir>/teamserver/samples/serverqueryexecute/queries/

Highlights

Highlights of this sample include:

Rebuilding this Sample

To rebuild this sample.

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

Related Tasks

Customizing Rule Team Server