Task 4: Using domains with the Excel scenario file
You add domain values to the Excel scenario file.
About this task
In this task, you add selectable domain values for the type of property of the borrower, and see the effect in the generated Excel scenario file. Then, you add another value to the domain in both Rule Designer and the existing Excel scenario file.
Step 1: Adding domain values to the Excel file
You add domain values for the property type argument.
Procedure
- In the Rule Explorer, double-click the Borrower class (loanvalidation-rules > bom > model > loan > Borrower).
- In the Members area, double-click the propertyInfo member.
- In the Domain part, click Create a domain.
- In the Domains wizard, select Literals as the domain type, and then click Next.
- Click Add, and then type Condominium.
- Click Add again and type Private House.
- Click Finish. Save your changes by using the save button in the Eclipse toolbar.
Step 2: Generating the Excel scenario file template
You generate the Excel scenario file template.
Procedure
- In the Rule Explorer, right-click the loanvalidation-rules project, and then click .
- Keep the default options as you did in the previous tasks.
- On the Expected Results page, expand the loan report, select approved and first message, and then click Next.
- Click Finish.
- In the Rule Explorer, double-click testsuite.xlsx to open it.
- Select the property info cell in the Scenario 1 row. Click the arrow beside the cell to see the two values that you added in the domain.
- Close testsuite.xlsx.
Step 3: Adding a new domain value in Rule Designer:
Now you want to add a new value to the domain. You must first add it in Rule Designer. Then, you can either regenerate the Excel scenario file template or edit the scenario file directly if it is already populated with data.
Procedure
- In the Rule Explorer, double-click the Borrower class (loanvalidation-rules > bom > model > loan > Borrower).
- In the Members area, double-click the propertyInfo member.
- In the Domain part, click Edit the domain.
- In the Domains wizard, click Add and enter Semi-detached.
- Click Finish, and then save your changes.
Step 4: Adding the domain value in the existing Excel file
To add or remove domain entries manually in an existing scenario file, you must delete the named range, add the domain entries, and then redefine the named range.
Procedure
Results
You have completed the tutorial. It showed you how to edit the BOM to customize the generated Excel scenario file template for testing decision services.

