Running the completed tutorial

Describes how to import and run a completed version of the tutorial.

About this task

When you run the completed tutorial, you generate a customized Excel scenario file template.

Important:

If you have already imported the loanvalidation-xom and loanvalidation-rules projects into your workspace, delete them or use a new workspace.

Step 1: Importing the answer projects

You import the answer projects.

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, navigate to Rule Designer > Tutorials > Configuring the BOM for Excel testing > answer, and then click Import projects.

    The imported projects are displayed in the Rule Explorer:

    • The Java™ project loanvalidation-xom defines an execution object model (XOM) with new constructors and classes.
    • The rule project loanvalidation-rules defines the business object model (BOM) with the constructors and classes to generate a customized Excel scenario file.

Step 2: Checking the project

You check that the project is compatible with testing and simulation.

Procedure

  1. In the Rule Explorer, right-click the loanvalidation-rules project, and then click Testing and simulation > Check Project .
    The Testing and Simulation BOM validation wizard opens.
  2. Make sure that loanvalidation-rules/loanvalidation-rulesOperation is selected as the decision operation, and then click Finish.
    A dialog box shows that loanvalidation-rulesOperation is compatible with testing and simulation.

Step 3: Generating the Excel scenario file template

You generate the Excel scenario file template.

Procedure

  1. In the Rule Explorer, right-click the loanvalidation-rules project, and then click Testing and simulation > Generate Excel Scenario File Template.

    The Generate Excel Scenario File Template wizard opens.

  2. Make sure that the selected rule project is loanvalidation-rules, and then click Next.
  3. Make sure that the selected decision operation is loanvalidation-rules/loanvalidation-rulesOperation, and then click Next.
  4. Keep the default options and default name, and then click Next.
  5. On the Expected Results page, expand the loan report, select approved and first message to include these columns in the Expected Results sheet, and then click Finish.

    By default, the Excel scenario file template is generated in the loanvalidation-rules project.

    Note:

    If the Excel scenario file template is not shown in the project, right-click the project and click Refresh.

  6. In the Rule Explorer, double-click testsuite.xlsx to open it, and then check the content:
    • The column headings have meaningful names and are easily identified:
      Scenarios sheet
    • The Scenarios sheet contains columns to enter data on the borrower's property. You edit the property type column by using domain values that you select from a list.
    • The Expected Results sheet contains a column to test whether the loan is approved, and a column to test the first message displayed when testing the rules:
      Expected Results sheet
  7. Close testsuite.xlsx.

Results

You have generated an Excel scenario file. In the tutorial, you do the steps that create the scenario file.