You learn how to run the scorecard application in a rule
project and view the assessment report.
About this task
In this task, you run the scorecard directly
in your rule project. This task demonstrates how you can use the exported
scorecard technical rules as independent rule artifacts.
Procedure
To run the exported RiskScorecard:
- In the Rule Explorer view, expand and then double-click businessRule.
The view for the selected business rule opens
in the Rule
Designer editor
area.
- In the Content area, add the following action to the business
rule:
then
print RiskScorecard;
Note:
Enter the command in the highlighted line at
the top of the Content area. Intellirule displays errors if the command
is entered in the wrong place.
- In the Rule Explorer view, expand , and double-click mainRuleflow to
create the following ruleflow:
- Double-click mainRuleFlow under scasharedBOM_tutorial to
open the Properties view.
- Set the value of the main flow task property
to false.
- Save your changes.
- From the Run menu, click Run
Configurations.
Alternatively,
you can click Run on the Rule
Designer toolbar.
- In the side pane of the Run window, select .
- Click the Parameters & Arguments tab, and then right-click LoanApplication in
the Name column.
This action enables the Edit Value and Clear
All Values buttons.
- Click Edit Value.
- In the Edit Parameter Value window, click Function
body, and then replace the contents of the text area with
the following text:
model.mortgage.ilog.com.LoanApplication result = new model.mortgage.ilog.com.LoanApplication();
model.mortgage.ilog.com.Borrower borrower = new model.mortgage.ilog.com.Borrower();
result.borrower = borrower;
borrower.age = 17;
borrower.citizenship = "Non-Resident Alien";
borrower.creditGrade = "C";
borrower.selfEmployed = true;
return result;
- Click OK.
- Click Apply, and then click Run.
Note: If a message opens
to tell you that changes have been made, click Yes to
save the changes.
The
Console view opens and displays information similar to the following
to confirm that the scorecard has run successfully.
Executed scorecard: rulePackage.RiskScorecard
================= Scorecard settings ==================
Scoring settings: Sum
Reasoning settings: Deviation based on expected score
Maximum number of reasons returned: 4
Ordered by: Ascending deviation
Resolve duplication by: Choose maximum deviation
Filtered by: Negative deviation
========================== result =====================
Final score: 155.0
Returned reasons:
• Reason code: CREDIT_C, Priority: 3, Description: The credit grade is C., Deviation: -50.0, Conditional Means: 0.0
• Reason code: NON_RESIDENT, Priority: 2, Description: The borrower is a non-resident alien., Deviation: -25.0, Conditional Means: 0.0
• Reason code: SELF_EMPLOYED, Priority: 5, Description: The borrower is self employed., Deviation: -20.0, Conditional Means: 0.0
• Reason code: AGE_TOO_YOUNG, Priority: 1, Description: The borrower is too young., Deviation: -10.0, Conditional Means: 0.0
=======================================================
Attribute name: LoanApplication.borrower.creditGrade
Score:40.0
Maximum score: 0.0
Expected score:90.0
Deviation:-50.0
=======================================================
Attribute name: LoanApplication.borrower.age
Score:0.0
Maximum score: 0.0
Expected score:10.0
Deviation:-10.0
=======================================================
Attribute name: LoanApplication.borrower.citizenship
Score:5.0
Maximum score: 0.0
Expected score:30.0
Deviation:-25.0
=======================================================
Attribute name: LoanApplication.borrower.selfEmployed
Score:10.0
Maximum score: 0.0
Expected score:30.0
Deviation:-20.0
=======================================================
Results
The information in the Console view confirms
that your scorecard is converted to technical rules and runs in Rule
Designer.
In
the next task, you publish your scorecard to Decision
Center.