IBM Support

Using the Decision Warehouse with Rule Execution Server on Java SE

Question & Answer


Question

If my application uses Rule Execution Server on Java SE, can I view execution traces in Decision Warehouse?

Answer

You can store the trace of executions in the Decision Warehouse database when you use Rule Execution Server in Java SE mode.


1. First, enable ruleset monitoring by setting the ruleset.monitoring.enabled property to true.

2.Then, override the Decision Warehouse default persistence settings.

By default, the execution unit looks for a JNDI reference jdbc/resdatasource to store the execution traces. Unless you use Rule Execution Server in Tomcat, that resource is not available. Therefore, you must override the default settings to connect directly to a database.

To change the persistence settings and customize the trace factory used by your application, add a dvs-dw.properties file to the class path. That file must contains the following code:

factoryClassname=ilog.rules.res.persistence.trace. impl.jdbc.IlrDriverTraceDAOFactory driver-classname=org.apache.derby.jdbc.EmbeddedDriver driver-url=jdbc:derby:C:/Program Files/IBM/WebSphereILOGJRules711/ shared/tools/AppServerCommunityEdition/var/derby/resdb driver-user=RES driver-password=


By using this code sample, you can store the execution traces in the Rule Execution Server database that is provided with the default sample server. If you select a different database, make sure that you configure it properly.

After your Java SE application ends, you can start the Sample Console server and use the Rule Execution Server console to inspect the traces in Decision Warehouse.

The factory class is the one provided by default with JRules, It uses the driver-classname property to create a JDBC connection to the driver-url database from the login information specified by the driver-user and driver-password parameters.

If you need specific persistence properties, you can use your own implementation of the IlrTraceDAOFactory factory class. In the code sample provided above, only the factoryClassname property is mandatory. The other properties are specific to the factory implementation itself.



Remember to add the driver JAR file to the class path. You can find the embedded Derby driver here: C:\Program Files\IBM\WebSphereILOGJRules711\shared\tools\ AppServerCommunityEdition\repository\org\apache\derby\derby\10.3.3.0\derby-10.3.3.0.jar

Note : This sample uses the embedded Derby driver, therefore, you cannot have the sample server and your application running simultaneously. The resdb database would then be opened twice, which is not allowed with that driver.

[{"Product":{"code":"SS6MTS","label":"WebSphere ILOG JRules"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Modules:Execution Server (BRES \/ RES)","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"7.1;7.0","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}},{"Product":{"code":"SSQP76","label":"IBM Operational Decision Manager"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":null,"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"8.5;8.0;7.5","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
15 June 2018

UID

swg21452630