Automated classic rule project deployment from Decision Center sample details

You can run and rebuild this sample, and you can also look at source files to understand how this sample works.

Running this sample

To extract ruleset archives from a Decision Center project:

  1. In the Samples Commands view, navigate to Samples Commands > Decision Center > Automated classic rule project deployment.

    Tip:

    To open the Samples Commands view, you can click the View sample commands link in the Samples and Tutorials view.

  2. Execute the getfirstruleset query command to get a ruleset from a predefined extractor in Decision Center.

  3. Execute the getsecondruleset query command to get a ruleset from another extractor in Decision Center.

    Rulesets are written to the <InstallDir>/teamserver/samples/serverrulesetextraction/output directory.

To set a baseline:

Execute the createbaseline command to set a baseline from the current state of the project. To check the baseline mybaseline is created, sign in to the Enterprise console (http://localhost:<PORT>/teamserver), select the loanvalidation-rules project, and then select View a baseline from the Current action drop-down list in the Home tab. The new baseline is visible next to this field.

To deploy a RuleApp to Rule Execution Server:
  1. Execute the deploy command to deploy a RuleApp containing the two rulesets to Rule Execution Server.

  2. When deployment is complete, check that the RuleApp is available in Rule Execution Server: http://localhost:<PORT>/res (resAdmin / resAdmin) and that the two rulesets are different.

Rebuilding this sample

To rebuild this sample:
  1. In the Samples Commands view, navigate to Samples Commands > Decision Center > Automated classic rule project deployment.

  2. Execute the clean command.

  3. Execute the build command.

In the Sample Server view, click Restore the sample server to return the sample server to its initial state.

How this sample works

The IlrSession class is the main entry point into Decision Center. You can connect to Decision Center and perform operations such as execute a query, generate a ruleset, and create a baseline. You obtain a session through a session factory. In this sample, IlrExtractor and IlrArchiveOutput get a ruleset archive. IlrSession creates baselines and deploys RuleApps to Rule Execution Server.

Source files

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

You can also view and modify the sample source files in Rule Designer. To import the sample into your workspace, click the Import projects link in the Samples and Tutorials view, and switch to the Java™ perspective.