Rule Builder > Debugging and Profiling > Testing the Execution of a Ruleset > Connecting a Remote Engine |
Connecting a Remote Engine |
PREVIOUS NEXT |
If your engine is embedded in a rule application, you need to start it from the application. You can then connect this engine remotely to the Rule Builder, and choose whether you want to use the Rule Builder as a debugging or profiling tool, or if you want to use the complete functionality of the Rule Builder in your application.
Use the following code to instantiate an engine in your rule application:
To connect the application to the Rule Builder, you need to set a Java property in the virtual machine that executes the application.
You can set the property directly inside your Java code, or you can pass it in the command line that launches the application. For example, you could write the following command (with no blank between the -D
and port value) to start the Java program MyEngine.Main
:
java -D<property>[=[<hostName>][:<port>]] MyEngine.Main |
where the square brackets []
enclose the following optional values:
<hostName>
is the name of the machine where the Rule Builder is running. If you don't provide a value, the application will try to connect to a Rule Builder on the local host. You will find this information in the Rule Builder About box. To open the About box, choose About ILOG Rule Builder from the About menu.
<port>
is the port number that the Rule Builder uses. If you don't provide a value, the port number is 1099
by default. You will find this information in the Rule Builder About box.
<property>
can be one of the following:
IlrRemoteStepper
: this property enables stepping capabilities in the Rule Builder. It enables you to step inside the rule actions, to set breakpoints, and to inspect the bindings of rules that are currently executing.
IlrRemoteDebugger
: this property enables stepping, inspecting, and profiling capabilities in the Rule Builder. The inspecting capabilities allow you to inspect the working memory and the agenda, and to access the execution trace. The profiling capabilities allow you to inspect the time of rule execution as well as examine rule dependencies. Important |
If the working memory of your application contains many objects, it is recommended that you do not use this property. In that case, you will not be able to inspect the working memory and the agenda, but the Rule Builder will respond faster. You will still be able to access the binding values of the rules that are executing. |
IlrRemoteController
: this property allows the Rule Builder to control the application. Each time a call to IlrContext.delegateControl()
is executed in the remote application, the Rule Builder takes control. This enables you to change the rules or to fire one or all of the rules.
IlrRemoteBuilder
: this property enables stepping, inspecting, profiling, and controlling capabilities in the Rule Builder.
If you want to connect the Rule Builder with only the stepping and controlling capabilities, you need to use the following combination of properties:
java -DIlrRemoteStepper=[[hostName][:port]] |
A connection API is also available to control the connection between the application and the Rule Builder. For details, see the method IlrContext.connectTool
.
Customer Support | Copyright © 1987-2004 ILOG S.A. All rights reserved. Legal terms. | PREVIOUS NEXT |