Deployable packages

You can deploy rules in Rule Designer, in Decision Center, or in the Rule Execution Server console.

Decision Server includes tools for you to deploy and execute rules on the Java™ platform. You use Rule Execution Server to execute rulesets. For deployment purposes, rulesets are packaged in a RuleApp, which is an archive file that is used to aggregate the files and associated metadata and resources.

RuleApp deployment is the most common way to deploy or update rules, whether you use decision service projects or classic rule projects.

To export a ruleset archive in Rule Designer:

Export a ruleset archive and either deploy it to your Java SE environment or add it to a RuleApp project if you work with classic rule projects.

For more information, see Exporting a ruleset archive.

To deploy your rules in Rule Designer:

Work with deployment configurations to deploy decision services to Rule Execution Server. For more information, see Deploying decision services.

Add your classic rule project to a RuleApp project, and deploy the RuleApp archive to Rule Execution Server. You can use a Rule Execution Server configuration project to store server instances, which can then be selected when you deploy your RuleApps.

For more information, see Deploying and exporting RuleApps.

To deploy your rules in Decision Center:

If your rule project uses a managed Java XOM, deploy the Java XOM to the appropriate Rule Execution Server instance first. Then publish your decision service or rule project from Rule Designer to Decision Center, and deploy from there.

For more information, see Deploying rules from Decision Center.

To deploy your rules in the Rule Execution Server console

If you have a managed XOM, deploy the XOM by using the Rule Execution Server console. In Rule Designer, export a RuleApp to the file system, or export a ruleset archive directly from the rule project. Use the Rule Execution Server console to deploy the RuleApp or add the ruleset archive to a new or existing RuleApp for deployment. In the Ruleset View, attach the managed XOM URIs if applicable.

For more information, see Deploying a RuleApp from a RuleApp project and Deploying Java execution object models (XOM).

To deploy your rules by using Ant tasks:

Create a RuleApp in Rule Designer or by running an Ant task. Deploy the RuleApp archive by running the res-deploy Ant task.

For more information, see Deploying and writing RuleApps by running Ant tasks.

Packaging rulesets for deployment

To deploy rulesets, you must package them into RuleApps. A RuleApp is a deployable management unit. It can contain one or more rulesets. Each ruleset in a RuleApp is called on a ruleset path. The ruleset path is the entry point for clients to access the business logic encapsulated in the RuleApp.

In Rule Designer, you create a RuleApp to contain your rulesets:
  • To prepare for deploying decision services, you create a deployment configuration, from which you can easily create and deploy a RuleApp archive. The RuleApp archive contains all the rulesets that you select as decision operations in the deployment configuration.
  • To prepare for deploying classic rule projects, you create a RuleApp project.

Managing rule engines and rulesets

In a managed rule execution environment, a rule engine is controlled by an execution unit (XU). The XU is a resource adapter that manages rule engines, loads rulesets, and passes data between the application and the rule engine.

The XU handles the low-level details of ruleset execution, such as connection pooling and multithreaded processing. It also provides management access to its resources and manages hot deployment: it receives notification of new versions of the ruleset in the persistence layer (database or file system). Rule Execution Server includes an implementation of the XU that can be used in any Java SE-compliant JVM.

Making the XOM accessible to the rule engine

The XOM accesses the rule engine differently depending on whether it is a Java XOM or an XML XOM:
  • If your XOM is based on Java classes, it is packaged into an archive file, or set of archive files, and deployed along with the RuleApp. At run time, your application class loader makes the XOM objects available to the rule execution environment. To run an application that uses a Java XOM, you must therefore deploy your RuleApp and Java code in two separate steps. You deploy the application with the Java XOM objects that your rules manipulate by using standard tools such as an Integrated Development Environment (IDE), Ant scripts, or an application server console. You can deploy your rulesets by using Rule Designer, Decision Center, the Rule Execution Server console, or by running Ant tasks.
  • If your XOM is based on an XML schema (.xsd file), you provide XML text when calling Rule Execution Server. The XML schema is packaged as a .xom file into the ruleset archive and therefore is deployed with the RuleApp.