< Previous | Next >

Task 1: Deploying a RuleApp from Rule Designer

You import a decision service project into Rule Designer, and look at the Java execution object model (XOM), the business object model (BOM), and your ruleset parameters. Then, you deploy a RuleApp to Rule Execution Server.

About this task

In this task, you import a decision service and explore its contents. Then, you deploy it as a RuleApp from Rule Designer to Rule Execution Server.

Step 1: Exploring a decision service

About this task

You import the decision service project and view the following project elements:
  • Java execution object model (XOM)
  • Business object model (BOM)
  • Ruleset parameters

Procedure

  1. Open the Samples Console in the en_US (American English) locale (see Running samples from the Samples Console).
  2. In the Samples and Tutorials view, browse to Rule Execution Server > Tutorials > Executing a hosted transparent decision service , and then click Import projects.

    If Designer does not switch automatically to the Rule perspective, open that view by clicking Window > Open Perspective > Other > Rule.

    Rule Explorer displays the required sample project files for the PreTradeChecks decision service and PreTradeChecks-xom projects.

  3. To look at the Java XOM, browse the PreTradeChecks-xom project classes in the Rule Explorer.
  4. To look at the BOM, double-click PreTradeChecks  >  bom  >  model in the Rule Explorer.

    Rule Designer displays all the classes that are used in this tutorial. Customer and Order are used in the rules for input and output. You can also look at the BOM from Rule Designer.

    For more information about the BOM, see Defining a vocabulary.

  5. To view the ruleset signature, double-click PreTradeChecks > deployment > PreTradeChecksOperation, and open the Signature tab. You can see the ruleset input and output parameters, which come from the variable set PreTradeChecksParameters. They are used to generate WSDL, WADL, or OpenAPI files.
    Image shows the Ruleset Parameters page.

Step 2: Deploying a RuleApp

Before you begin

Before you deploy a RuleApp, start the sample server from the Sample Server view in the Samples Console (see Starting and stopping the sample server).

About this task

You deploy your RuleApp to the sample server. This task consists of the following subtasks:

  • Exploring a deployment configuration.
  • Defining a target server for the deployment.
  • Deploying the RuleApp to the sample server.

Procedure

  1. In the Rule explorer, expand PreTradeChecks/deployment and double-click PreTradeChecksRuleApp.
  2. Examine the deployment configuration page:
    • The configuration is for nonproduction use.
    • It deploys a XOM.
    • It relies on the PreTradeChecks Operation, which describes the ruleset.
    • It shows the RuleApp name and properties.
  3. Define a target server:
    1. Click the Add button "" next to Define target servers.
    2. On the Target servers page, click the Add button "".
    3. Keep Create a Rule Execution server connection selection selected, and click Next.
    4. Enter the following information:
      • Server name: Samples server
      • URL: http://localhost:<PORT>/res
      • User name and password: resAdmin
    5. Click the Test Connection button to check the connection, and then click Finish to save the deployment configuration.

    Your target server is listed under Target Servers on the Overview tab.

  4. In the Deployment part of the Overview tab, click Proceed to RuleApp deployment.
  5. Check the Deployment Summary. It shows that the operation PreTradeChecksOperation is being deployed to the sample server and to the workspace output directory.
  6. Click Next.
  7. Check the credentials, and then click Next and Finish.

    The Deployment Report page opens and shows that the RuleApp is successfully deployed to the sample server.

What to do next

In the next task, you explore the ruleset in the Rule Execution Server console, and ensure the REST API can call the ruleset.

< Previous | Next >