Assets Navigation Lab
This module showcases the Decision Central environment provisioned during the Environment Setup Lab. The business assets are retrieved from the mortgages
project, one of the demonstration projects available out of the box for Decision Central.
In this lab, you explore the integration between a web application and the execution server engine (Decision Server) for Red Hat Decision Manager 7. You also navigate through the project import and export options in Decision Central and identify and search for different business assets in the project’s library.
-
Become familiar with business assets and their organization
-
Become familiar with the business asset icons and representations
-
Search for and open business assets for viewing and editing
-
Successful completion of the Environment Setup Lab
-
Successful login to Decision Central
1. Import Project
The Decision Central project library view is displayed when you click Design from the Decision Central home page.
The project library view shows available projects in the library. If the library is empty, it shows "Nothing Here":
With an empty project library view, you have the option to create a project or import an existing project.
The empty library view also includes a Try Samples button. Clicking this button displays a list of preexisting demonstration projects that you can use to showcase the product’s capabilities.
In this section, you import the mortgages
project.
-
From the empty project library view, click Import Project.
-
Expect to see an Import Project dialog where you specify a Git repository URL for the project.
-
-
In the Import Project dialog, enter
https://github.com/gpe-mw-training/bxms_decision_mgmt_foundations_lab.git
for Repository URL and click Import:-
Expect to see a list of projects in the repository:
-
-
Select the
mortgages
project and click Ok in the top right corner.-
When the import is completed, the project library view appears with the
mortgages
project selected:
-
2. Navigate Project Library
The project library view shows a tabular list of the assets in the project. The tabular list allows the user to:
-
Search for assets.
-
Display a different number of assets per table page.
-
Navigate between asset pages.
2.1. Search for Assets
At the top of the tabular list of assets, you see a search input field. As you type characters into this field, the grid of assets is filtered by the search string. The grid is filtered by the asset’s fully-qualified name, and the match is not case-sensitive.
-
Search for
dsl
. -
Search for
scenario
. -
Search for
bankruptcy
. -
Clear the search field.
2.2. Display Assets Pagination
At the bottom of the tabular list of assets, there is a pagination control that allows the user to change the number of rows to show on a single page and to navigate between pages.
-
Find the page controller.
-
Change the number of entries per page to
50
. -
Change the number of entries per page to
15
. -
Navigate to the next page and back.
3. Download Project
Projects can be exported so you can use them to upload to a source code repository and import them later into another instance of Decision Central or distribute them outside the environment where they were created.
3.1. Export Project
To export the project, you start from Decision Central’s home page.
-
Click the Home icon from the upper panel to access the Decision Central home page.
-
Click Design to display the project list.
-
Note that the empty project library view you saw earlier is now populated with a list of projects.
-
-
Select the
mortgages
project.-
This shows the project’s library view with a list of its assets.
-
-
Select the
Applicant
asset from the top of the list, and if the Project Explorer panel is not displayed, click the blue > icon to open it.-
This opens the Project Explorer perspective:
-
The Project Explorer view is accessible only when you select any of the assets from the project’s library view.
-
-
Click the gear icon in the Project Explorer panel and select Download Project to trigger the download in your browser:
-
A ZIP file containing the package structure of your project is downloaded to your
Downloads
folder. The name of the ZIP file is structured like this:[Space Name]-[Repository Name]_[project name].zip
. -
Expect to find a file called
myspace-myrepo_mortgages.zip
in yourDownloads
folder.NoteIn some cases, the file name may be missing a [Space Name]-
prefix.
-
3.2. Deploy Mortgages Demonstration Project
It is useful to know how to create an executable component from a project. Executable components are stored in a binary repository (Maven) so that they can be used as dependencies for other projects. Executable components are also distributed to execution servers. Execution servers are the runtime containers that allow rules execution from client applications.
In this section, you deploy the mortgages
demonstration project and use a containerized application to test the deployment.
The mortgages
demonstration project is a Decision Manager project intended to demonstrate the use of Decision Server to evaluate a mortgage loan application for approval.
-
Click the Home icon from the upper panel to access the Decision Central home page.
-
Click Design to show the project list.
-
Select the
mortgages
project.-
This shows the project’s library view with a list of its assets.
-
-
Select Build & Deploy from the set of buttons in the upper right.
-
Expect to see confirmation of a successful deployment.
-
-
Click the Home icon from the upper panel.
-
Click Deploy to display the Deploy perspective.
-
This shows the list of servers and containers:
-
-
Verify that the
mortgages_1.2.0
KIE container shows a green circle with a checkmark, indicating successful deployment.NoteNote that the IP address for the remote server is an internal host IP address for the OpenShift environment. This means that while the IP address is accessible from within the OpenShift platform components, you cannot access this IP address from outside the OpenShift environment—for example, from your browser. In order to access the KIE containers from outside the OpenShift environment, you need a Decision Server route, which you get from the list of pods in OpenShift Container Platform.
-
If you are not already logged in to OpenShift Container Platform, log in using your OPENTLC credentials:
-
Select the BPMS project from your project list:
-
Locate the Decision Central deployment whose name begins with
gpte-kieserver
in the list and click the > icon to the left to display details of this deployment: -
From the Networking section in the Decision Server pod, select one of the entries under ROUTES External Traffic and open the link in a new window.
-
By default the Decision Server route needs additional details about the information that you are requesting.
-
Expect to see a
Forbidden
message result:
-
-
Add
/docs
to the end of the URL in your browser route.-
Expect to see the KIE server remote API reference documentation:
-
-
Navigate to the
[decision_server_external_route]/services/rest/server/containers
route to confirm the existence of themortgages
container:NoteThe
/services/rest/server/containers
endpoint of Decision Server is a secured resource. This means that you need to present credentials to access the resource. You use the same credentials (adminUser
for the username andtest1234!
for the password) that you used for entering Decision Central from the Environment Setup Lab .
3.3. Explore Mortgages Web Application
Along with Decision Central and Decision Server, the provisioned template also deploys a web application to showcase interaction with the Decision Server REST API. In this section, you use the web application and find the rules that make decisions based on the input.
In this section, you locate the web application route.
-
Navigate to the OpenShift Container Platform web application using your browser.
-
If not already logged in, log in to the OpenShift Container Platform using your OPENTLC credentials:
-
Select the BPMS project from your project list:
-
Locate the Angular web application deployment whose name begins with
gpte-ng-dmf
in the list and click the > icon to the left to display details of this deployment: -
From the Networking section in the application pod, select one of the entries under ROUTES External Traffic and open the link in a new terminal window.
-
The
gpte-ng-dmf
application is a web application that helps interacting with Decision Server throughout the course.
-
-
In the left panel of the
gpte-ng-dmf
application, click Mortgages:-
The
Mortgages
component interacts with themortgages
container in Decision Server: -
The following describes the fields in the
gpte-ng-dmf
web application:Applicant Section Field Required Description Name
no
Optional name for mortgage loan applicant—not used for any decisions and not persisted anywhere
Age
yes
Mortgage loan applicant’s age—important for some decisions to approve or deny loan
Credit Rate
yes
Mortgage loan applicant’s credit rating
Bankruptcy Section Field Required Description Bankruptcy Detected
no
Check box to indicate bankruptcy to engine
Year
no
If bankruptcy is indicated, specify year bankruptcy occurred
Amount
no
If bankruptcy is indicated, specify amount of bankruptcy
Income Source Section Field Required Description Income Validated
no
Check box to indicate income source
Income Amount
no
If income source indicated, specify income amount
Income Type
no
If income source indicated, select either
Job
orAsset
typeLoan Details Section Field Required Description Loan Amount
yes
Requested loan amount
Deposit Max Amount
yes
Initial payment or deposit amount
Mortgage Length
yes
Requested mortgage length in years
-
4. Execute Test Cases
In this section, you execute a number of test scenarios:
-
An approved mortgage loan application
-
A loan application denied because the loan requester is not old enough
-
A loan application denied because the loan requester’s credit history is not acceptable
4.1. Test Approved Mortgage Loan Application
In this section, you use the following example data to generate an approved response from the engine:
Field | Value |
---|---|
Applicant Name |
|
Applicant Age |
|
Credit Rate |
|
Bankruptcy Detected |
|
Income Validated |
|
Income Amount |
|
Income Type |
|
Loan Amount |
|
Deposit Max Amount |
|
Mortgage Rate |
|
-
If you do not see the Mortgage Loan Evaluation page, select the Mortgages option.
-
Enter the example data into the loan evaluation form:
-
Click Submit.
-
Expect to see a pop-up dialog indicating that the loan is approved:
-
-
Click OK to dismiss the dialog.
4.2. Test Denied Loan Application Due to Applicant’s Age
In this section, you enter loan application data that generates a denied response from the engine. Then you examine the rule that causes the application to be denied.
You use the following example data, where only the applicant’s age is different from the previous example data:
Field | Value |
---|---|
Applicant Name |
|
Applicant Age |
|
Credit Rate |
|
Bankruptcy Detected |
|
Income Validated |
|
Income Amount |
|
Income Type |
|
Loan Amount |
|
Deposit Max Amount |
|
Mortgage Rate |
|
-
Update the Applicant Age field to
15
, keeping the other data fields the same as the previous example. -
Click Submit.
-
Expect to see a pop-up dialog indicating that the loan is denied:
-
-
Click OK to dismiss the dialog.
4.3. Examine Denied Decision Rule
In this section, you find the rule that is making the decision to deny the loan.
-
Log in in to Decision Central.
-
If you have closed your Decision Central browser tab and need additional instructions on how to access Decision Central, refer to the section that reviews the OpenShift Container Platform components in the previous lab.
-
-
Navigate to the
mortgages
project. -
Search for
underage
.-
Expect to see results similar to this:
-
-
Click the
Underage
asset to open theUnderage.rdrl
file and examine its contents:
4.4. Test Denied Loan Application Due to Bad Credit History
As in the previous section, you enter loan application data that generates a denied response from the engine. Then you examine the rule that causes the application to be denied.
You use the following example data, changing the applicant’s age back to 35
and changing the credit rating from AA
to OK
:
Field | Value |
---|---|
Applicant Name |
|
Applicant Age |
|
Credit Rate |
|
Bankruptcy Detected |
|
Income Validated |
|
Income Amount |
|
Income Type |
|
Loan Amount |
|
Deposit Max Amount |
|
Mortgage Rate |
|
-
Return to the
mortgages
web application page. -
Enter the example data as shown or, if the previous form is still populated, change the applicant’s age to
35
and set the credit rating toOK
. -
Click Submit.
-
Expect to see a pop-up dialog indicating that the loan is denied:
-
-
Click OK to dismiss the dialog.
4.5. Examine Denied Decision Rule
In this section, you find the rule that made the decision to deny the loan.
-
Navigate to the
mortgages
project in Decision Central. -
Search for
credit check
. -
Click the
No bad credit checks
asset to open theNo bad credit checks.rdrl
file. -
Examine the contents of the
No bad credit checks.rdrl
file.