< Previous | Next >

Before you start

This topic explains the tasks, objectives, and prerequisites of this tutorial.

In this tutorial, you work as a developer for a fictitious loan company. You are currently working on a decision service that validates loan requests. Called the Loan Validation Service, the decision service applies several criteria to determine the eligibility of potential borrowers, and contractual constraints for approved loans.

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. The tutorial includes the following tasks:

  • Using automatic exception handling
  • Setting breakpoints in a ruleflow, action rule, and decision table
  • Running a debugging session
  • Identifying and fixing errors

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 rule search to find artifacts, and the Java search to find Java XOMs. Example...
  • Use queries to find 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...

Time required

This tutorial takes about 40 minutes to complete.

Directory structure

The files for this tutorial are in the directory <InstallDir>/studio/tutorials/debug. The directory has the following structure:
  • answer: This file contains the completed version of the decision service. You can run it to see the expected results.
  • start: This file contains the faulty version of the decision service. You look for errors in it during the debugging process.

What you need to know

This tutorial assumes that you are familiar with business rule programming principles, Java™, and the Eclipse environment.
< Previous | Next >