Getting started with decision services
Abstract
Preface
As a business analyst or rules developer, you can use Decision Central in Red Hat Decision Manager to design a variety of decision services. In this tutorial, you will review the pre-defined data objects, business rules, and decision tables. You will then test the mortgage application decision service.
Prerequisites
- Red Hat JBoss Enterprise Application Platform 7.1.0 is installed. For installation information, see the Red Hat JBoss EAP 7.1.0 Installation Guide.
- 7.1.0 is installed and configured with Decision Server. For more information, see Installing and configuring Red Hat Decision Manager on Red Hat JBoss EAP 7.1.
-
7.1.0 is running and you can log in to Decision Central with the
developerrole. For more information, see Planning a Red Hat Decision Manager installation.
Chapter 1. Opening the Mortgages sample project
The Mortgages sample project consists of predefined data objects, guided decision tables, guided rules, forms, and test scenarios. Using the sample project provides a quick way to get acclimated with Red Hat Decision Manager. In a real business scenario, you would create all of the assets by providing data that is specific to your business requirements.
The business process application example includes features that are Technology Preview only. Technology Preview features are not supported with Red Hat production service level agreements (SLAs), might not be functionally complete, and are not recommended for production. These features provide early access to upcoming product features, enabling customers to test functionality and provide feedback during the development process. For more information about Red Hat Technology Preview support, see Technology Preview Features Support Scope.
Procedure
Navigate to the Mortgages sample project to view the predefined assets.
- Log in to Decision Central and click Menu → Design → Projects.
-
Click
in the upper-right corner of the screen and select Try Samples.
- Select Mortgages and click Ok.
The Assets view of the project opens.
Chapter 2. Data objects
Data objects are the building blocks for the rule assets that you create. Data objects are custom data types implemented as Java objects in specified packages of your project. For example, you might create a Person object with data fields Name, Address, and DateOfBirth to specify personal details for loan application rules. These custom data types determine what data your assets and your decision service are based on.
For more information about creating data objects, see "Creating data objects" in Designing a decision service using guided decision tables.
2.1. Viewing the Mortgages data objects
This tutorial utilizes the predefined data objects in the Mortgages sample project.
The Mortgages data model is composed of four data objects:
-
Applicant -
Bankruptcy -
IncomeSource -
LoanApplication
2.1.1. Viewing the Applicant data object
Follow these steps to familiarize yourself with the predefined Applicant data object.
Procedure
- Click Menu → Design → Projects, then click Mortgages.
-
Input
Applicant.javain to the project’s asset search box and click the Applicant data object. Review the Applicant data object fields.

2.1.2. Viewing the Bankruptcy data object
Follow these steps to familiarize yourself with the predefined Bankruptcy data object.
Procedure
- Click Menu → Design → Projects, then click Mortgages.
-
Input
Bankruptcy.javain to the project’s asset search box and click the Bankruptcy data object. Review the Bankruptcy data object fields.

2.1.3. Viewing the IncomeSource data object
Follow these steps to familiarize yourself with the predefined IncomeSource data object.
Procedure
- Click Menu → Design → Projects, then click Mortgages.
-
Input
IncomeSource.javain to the project’s asset search box and click the IncomeSource data object. Review the IncomeSource data object fields.

2.1.4. Viewing the LoanApplication data object
Follow these steps to familiarize yourself with the predefined LoanApplication data object.
Procedure
- Click Menu → Design → Projects, then click Mortgages.
-
Input
LoanApplication.javain to the project’s asset search box and click the LoanApplication data object. Review the Property data object fields.

Chapter 3. Guided rules
Guided rules are business rules that you create in a UI-based guided rules designer in Decision Central that leads you through the rule-creation process. The guided rules designer provides fields and options for acceptable input based on the data objects for the rule being defined. The guided rules that you define are compiled into Drools Rule Language (DRL) rules as with all other rule assets.
All data objects related to a guided rule must be in the same project package as the guided rule. Assets in the same package are imported by default. After you create the necessary data objects and the guided rule, you can use the Data Objects tab of the guided rules designer to verify that all required data objects are listed or to import other existing data objects by adding a New item.
3.1. Viewing the Mortgages business rules
Follow these steps to familiarize yourself with the predefined business rules for the Mortgages project.
Related information
Business rules are defined using the Guided Rule wizard in Red Hat Decision Manager. For information about creating guided business rules, see Designing a decision service using guided rules.
3.1.1. Viewing the CreditApproval guided rule
Procedure
- Click Menu → Design → Projects, then click Mortgages.
- Click the CreditApproval guided rule.
Review the CreditApproval guided rule’s WHEN and THEN conditions and values.

3.1.2. Viewing the Bankruptcy history guided rule
Procedure
- Click Menu → Design → Projects, then click Mortgages.
- Click the Bankruptcy history guided rule.
Review the Bankruptcy history guided rule’s WHEN and THEN conditions and values.

3.1.3. Viewing the Underage guided rule
Procedure
- Click Menu → Design → Projects, then click Mortgages.
- Click the Underage guided rule.
Review the Underage guided rule’s WHEN and THEN conditions and values.

Chapter 4. Guided decision tables
Guided decision tables are a wizard-led alternative to uploaded decision table spreadsheets for defining business rules in a tabular format. With guided decision tables, you are led by a UI-based wizard in Decision Central that helps you define rule attributes, metadata, conditions, and actions based on specified data objects in your project. After you create your guided decision tables, the rules you defined are compiled into Drools Rule Language (DRL) rules as with all other rule assets.
All data objects related to a guided decision table must be in the same project package as the guided decision table. Assets in the same package are imported by default. After you create the necessary data objects and the guided decision table, you can use the Data Objects tab of the guided decision tables designer to verify that all required data objects are listed or to import other existing data objects by adding a New item.
4.1. Viewing the Pricing loans decision table
The goal of this chapter is to introduce you to the Pricing loans decision table. For this tutorial, you will not create and set the decision table conditions. Instead, review the values and the conditions that are already defined in the Mortgages sample project’s Pricing loans Guided Decision Tables asset. For information about creating decision tables, see Designing a decision service using guided decision tables.
Prerequisites
The business rules have been defined. For more information, see Section 3.1, “Viewing the Mortgages business rules”.
Procedure
- Log in to Decision Central and click Menu → Design → Projects, then Mortgages.
Scroll down and click the Pricing loans Guided Decision Tables asset.
Chapter 5. Test scenarios
Test scenarios in Red Hat Decision Manager enable you to validate the functionality of rules, models, and events before deploying them into production. A test scenario uses data for conditions that resemble an instance of your fact or project model. This data is matched against a given set of rules and if the expected results match the actual results, the test is successful. If the expected results do not match the actual results, then the test fails.
After you run all test scenarios, the status of the scenarios is reported in a Reporting panel.
Test scenarios can be executed one at a time or as a group. The group execution contains all the scenarios from one package. Test scenarios are independent, so that one scenario cannot affect or modify the other.
5.1. Testing the Pricing low end scenario
Test the Pricing low end scenario using the data that is specified in the Pricing loans decision table as shown in Section 4.1, “Viewing the Pricing loans decision table”. For information about testing decision services, see Testing a decision service using test scenarios.
Procedure
- Log in to Decision Central. Click Menu → Design → Projects, then Mortgages.
- Scroll down and click the Pricing low end test scenario asset.
- Review the Pricing low end test scenario’s GIVEN and EXPECT conditions and values.
- Click Run scenario.
The Reporting section at the bottom of the window should show a Success message. This is the expected result as the values and conditions set in the test scenario meet the requirements as specified in the Pricing loans decision table.
5.2. Testing the Are they old enough scenario
Test the Are they old enough scenario using the data that you specified when you created the Underage guided rule. For information about testing decision services, see Testing a decision service using test scenarios.
Procedure
- Log in to Decision Central. Click Menu → Design → Projects, then Mortgages.
- Scroll down and click the Are they old enough test scenario asset.
-
Review the Are they old enough test scenario’s GIVEN and EXPECT conditions and values. Leave the preset age value of
17as is. - Click Run scenario.
The Reporting section at the bottom of the window should show a Success message. This is the expected result as an applicant below the age of 21 is not eligible for a mortgage loan as defined in the Underage guided rule.
Chapter 6. Additional resources
Appendix A. Versioning information
Documentation last updated on Friday, October 12, 2018.
