You open the eligibility rule task in the
loanvalidation ruleflow. The task uses an algorithm that prevents the
approval rule from seeing changes to data in another rule in the task. You
decide to reorganize the ruleflow by creating a task, and moving the approval
rule to the new task. Data can then flow from the old task to the new task, where the
approval rule can then see the data changes.
Procedure
-
Open the loanvalidation ruleflow in the Rule perspective.
-
Select the eligibility rule task.
The rules in the Agenda tab are prefixed with
eligibility, which is the name of the rule task.
-
Open , and expand eligibility.
You see that the task contains both the approval action rule and the
grade decision table.
-
Open the Rule Task tab.
You see that the Fastpath algorithm is selected:
You know that the Fastpath algorithm does not support inference. The agenda is computed
once in the rule task, but it is not changed if variables are modified by other rules in the task.
The approval rule runs with an unset grade value, and the value is not changed
by the grade decision table.
To fix the error, you decide to create a
rule task, and move the approval action rule to the new task. Then, you
organize the transitions so that data from the eligibility task flows to the
new task. This arrangement allows the approval rule to see the data from the
grade rule, which remains in the eligibility task.
-
Create a task node next to the insurance task in the ruleflow (see Ruleflows).
Enter the following parameters in the properties for the new task:
- Rule Task ID: approval
- Rule Selection: eligibility.approval
-
Click the transition line from the eligibility task to the
end node, and reset it to run from the approval task to
the end node.
-
Click the transition line from the eligibility task to the
insurance task, and reset it to run from the approval task
to the insurance task.
-
Create a transition line between the eligibility task and the
approval task.
-
Click the Layout All Nodes button
:
The ruleflow now looks as follows:
-
Edit the eligibility task to remove the approval
action rule from the Rule Selection tab.
Remove the
eligibility package, and then import all the eligibility rules
except the
approval rule:
Now, the grade decision table runs in the
eligibility task, and its grade value passes to the
approval rule in the approval task.
-
Save your work.
-
Run the decision service by using the run loan validation configuration in
the Run Configurations.
The decision service runs correctly, and produces the expected report:
-
Remove all the breakpoints as shown at the end of Task 3, and save your changes. Your decision
service now works correctly. You can now make the new version of the decision service available to
the business user for further review.
Tip: In this tutorial, you created a new rule task in a ruleflow, and changed the rule
selection. This approach is not always possible. Alternatively, you can use inference by selecting
the RetePlus algorithm in the Rule Task properties of the
eligibility task (see
RetePlus algorithm).
Results
You have completed the tutorial. It showed you how to add breakpoints, and use a debugging
session to follow the breakpoints through a decision service to find problems in rules.