Overview: Testing rules and ruleset execution

You test rules and ruleset execution to make your business rule application behave as expected without defects. You can debug locally or remotely. To debug a ruleset and the application concurrently, you must use Rule Designer.

Debugging a business rule application is a methodical process of finding and reducing the number of bugs, or defects, in a ruleset or piece of Java™ code that is used to execute the rule engine. The overall objective of debugging is to make the program behave as expected.

The execution of a ruleset goes through the following steps:

  1. Instantiating a new engine or connecting to an existing engine.

  2. Sending the ruleset to the engine.

  3. Executing the ilrmain function, if it exists, or executing the ruleset in the engine.

You can then use breakpoints, stepping, or expression evaluation to debug your rules.

If you have used an integrated development environment (IDE) other than Eclipse to develop a Java application that instantiates the rule engine and you want to debug the ruleset and the application concurrently, you must use Rule Designer to reference the source code and classes from the Eclipse Debug Configuration.

You cannot debug a ruleset and a Java application at the same time without using Rule Designer. However it is still possible to use another integrated development environment to write the Java code and build the application.

Local debugging

After you have finished editing and building your rule project, you can launch the project on your workstation locally.

You can launch the project in run mode or in debug mode:

When you launch a rule project in debug mode, you establish a connection between the debugger client and the rule project that you are launching.

Remote debugging

When you debug remotely, you run the application on one computer and debug it on another computer. However, you use the debugging facility itself exactly as if you were debugging code running locally. The prerequisites is that you access to machines connected to a reliable network. The client user interface runs on one system while the debug engine runs on another system. Typically, you use remote debugging when you develop a Java project or if you want to run your project on a platform on which the debugger does not run. Java EE is a good example of this case: you can use the remote debug feature to take advantage of the debugger user interface while debugging the remote application.