Before you start
A business user is reviewing the results of the decision service. The user contacts you to tell you that the decision service rejects low-risk loans that actually qualify for approval. You must debug the decision service to determine why it rejects the loans.
In Rule Designer, you tag rule artifacts with breakpoints that stop the running of the decision service at key points. You can then examine the behavior of the rules in a step-by-step debugging process. You determine where the errors take place, and track them to specific rules. Then, you modify the rules to fix the errors.
Learning objectives
You use debugging features to find and fix errors in a decision service. You do the following tasks:- Use automatic exception handling.
- Set breakpoints in a ruleflow, action rule, and decision table.
- Run a debugging session.
- Identify and fix errors.
Time required
This tutorial should take approximately 40 minutes to finish. If you explore other concepts related to this tutorial, it could take longer to complete.Audience
This tutorial is for users who make decision services in Rule Designer.Prerequisites
You need the following component, projects, and information:- Rule Designer: Download this component and install it as directed in Preparing to create decision services.
- The following project files in the Tutorial: Debugging a decision service in Rule Designer
GitHub
repository: - answer: Contains the completed version of the decision service. You can run it to see the expected results.
- start: Contains the faulty version of the decision service. You look for errors in it during the debugging process.
In the GitHub repository, click the Clone or download button to download the contents of the repository to a directory on your computer. Expand the downloaded file in the directory. In the tutorial, the directory is referred to as InstallDir.
- Knowledge of business rule programming principles, Java™™, and the Eclipse environment
Best practices
This tutorial includes the following best practices for debugging decision services:- Carefully read the error messages. They tell you where to look for errors. Example...
- Try automatic exception handling when an exception occurs in a rule condition. Example...
- Check the stack trace to get the names of ruleflows and rule tasks. Example...
- Switch to the debug mode to get more precise error information. Example...
- Use the search function to find rule artifacts. Example...
- Use queries to search for rules by their content. Example...
- Check the values in the Variables view at each breakpoint during debugging. Example...
- Check the Agenda view to see which rules are going to be run. Example...