< Previous | Next >

Task 1: Creating a main rule project for the decision service

You import the projects for this tutorial, create a main rule project for the decision service, and import a ruleflow to complete the overall structure.

About this task

In this task, you create the main rule project, which defines the entry point and the scope of the decision service. The main project references all the other rule projects, which themselves reference the business object model (BOM). The BOM references the execution object model (XOM). The project hierarchy is as follows:

Structure of decision service.

Synchronization, branching, and change management are applied to all rule projects in the decision service hierarchy, allowing the decision service behavior to be governed and deployed consistently.

This tutorial uses the Decision Service Map to guide you through some of the steps. This map includes all the steps that are required when you build a complete decision service from scratch, which is not the case in this tutorial. Many steps, such as creating rules, are done for you for convenience. Whenever possible a second alternative to using the Decision Service Map is presented. If this view is not displayed, click Window > Show View > Rule Project Map to open it.

Procedure

  1. Import the start projects for the tutorial:
    Note:

    If you have imported the answer projects for the tutorial, close or delete them before importing the start projects.

    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, select Rule Designer > Tutorials > Creating a decision service with multiple projects > start, and click Import projects.
    The Rule Explorer displays five different projects:
    • Loan Validation Check, Loan Validation Determination, and Loan Validation Scoring: These three rule projects handle independent aspects of the loan validation request. They all reference the BOM project.
    • Loan Validation Base: A project that contains the business object model (BOM) that is used by the rules. This project references the XOM project.
    • loan-validation-xom: A Java™™ project that defines an execution object model (XOM) for rule execution.

    The BOM project was created by using the template Decision Service Rule Projects > Rule Project with a BOM. This project is dedicated to the management and organization of the BOM. In Loan Validation Base/rules, two variable sets were created. You use variables as input and output parameters when you create decision operations in the next task.

  2. Create the main rule project for the decision service:
    1. In the Decision Service Map, click Create main rule project.
    2. Select Main Rule Project, and click Next.
    3. Enter Loan Validation Service as the name of the main rule project.
    4. Click Next.
    5. Select the following projects as dependent projects:
      • Loan Validation Check
      • Loan Validation Determination
      • Loan Validation Scoring
    6. Click Finish. The project is displayed in the Rule Explorer.
  3. Import a ruleflow that manages the flow of decisions among the rules in the project:
    1. In the Rule explorer, right-click Loan Validation Service/rules and select Import.
    2. Select General > File System, and click Next.
    3. Click Browse to set the From directory to <InstallDir>/studio/tutorials/decisionservice/start.
    4. Select loanvalidation.rfl, and click Finish.

    The following image shows the ruleflow:

    Image shows the ruleflow between the rules that check the borrower for a loan.

    The ruleflow forms a chain of decisions by using rules from different projects.

What to do next

In the next task, you create some decision operations within your decision service.
< Previous | Next >