Diagnostic tests description

Rule Execution Server diagnostics consist of a number of tests on the following processes: execution unit (XU), MBeans, RuleApps, rulesets, and persistence layer.

The ruleset is deployed on this path: /test_ruleapp/1.0/test_ruleset/1.0. The ruleset contains a single out parameter. This parameter retrieves the name of the host on which the ruleset has been executed:

ruleset executionTest {out java.lang.String result = "ruleset executed on: " +
java.net.InetAddress.getLocalHost().getHostName();};
Note:
  1. The Java™ EE Connector Architecture (JCA) leaves the implementation of connection pooling up to application server vendors. The purpose is to let a scalable number of users access resources through the Java components. On WebSphere® Application Server, the pool size is not instantiated beforehand. Therefore, the server diagnostics do not validate Rule Execution Server before the first execution of a rule engine. However, diagnostics remain useful to validate a configuration. Specifically in a cluster environment, the diagnostics check that the execution units (XUs) are registered with the management model. If the diagnostics are run before any execution unit is called, the test is successful. A message is displayed to verify that no execution unit has been initialized.
  2. The zRule Execution Server for z/OS® console runs slightly different tests than the ones described here. For more information, see Limitations on zRule Execution Server for z/OS.
The diagnostics consist in the following tests:
MBean Factory

Checks the implementation.

Local XU connectivity
Looks up the JNDI directory of the application server for a local XU.
  • If a local XU is found, the Rule Session Execution and Rule Session Second Execution tests are run to check whether a ruleset can be executed by the POJO rule sessions on the local server, that is, the server on which the Rule Execution Server console is deployed.
  • If the local XU is not found, a warning is displayed for either of the following reasons:
    • The XU is not installed on the same server as the console. In this case, the warning is expected.
    • The XU is installed on the same server as the console. In this case, the warning denotes an anomaly: Most likely, the default JNDI name of the XU, eis/XUConnectionFactory, is not set correctly. Modify the reference to the XU resource defined for the Rule Execution Server console in the descriptor used by your application, for example, jrules-res-management-WL90.ear/jrules-res-management.war/WEB-INF/weblogic.xml.
XU MBean connectivity
Looks up the current application server or application-server cluster for XU MBeans. This test is not run if the MBean Factory test fails.
  • If one or more XU MBean is found, the MBean Execution and MBean second execution tests are run to check whether a ruleset can be executed by using the XU MBeans found.
  • If no XU MBean is found, a warning is displayed for either of the following reasons:
    • The application server is WebSphere Application Server: In this case, the warning is normal, see Note 1.
    • The deployed execution unit does not have the same version as the console: In this case, the warning is expected. The console accesses only the XU MBeans that have the same major.minor version number.
    • If neither of the previous cases applies, the warning denotes a defect. Check the XU log file to verify whether the XU MBean is registered.
Model MBean

Checks that the model MBean is registered. This test is not run if the MBean Factory test fails.

Ruleset Resource Provider
  • Runs a full check of the ruleset persistence layer.
  • Displays all the ruleset persistence information, such as the drivers and its version of the data source provider, or the working directory of the file provider.
XOM Resource Provider
  • Runs a full check of the XOM persistence layer.
  • Displays all the XOM persistence information, such as the driver and its version of the data source provider, or the working directory of the file provider.
Create RuleApp

Creates an empty RuleApp /test_ruleapp/1.0.

RuleApp MBean

Checks that the RuleApp MBean is registered. This test is not run if the Create RuleApp test fails.

Create Ruleset

Creates the ruleset /test_ruleapp/1.0/test_ruleset/1.0. This test is not run if the Create RuleApp test fails.

Ruleset MBean

Checks whether the ruleset MBean is registered. This test is not run if the Create Ruleset test failed.

Rule Session Execution

Executes the ruleset /test_ruleapp/1.0/test_ruleset/1.0 in a POJO rule session. This test is not run if the Local XU connectivity or Create Ruleset tests fail.

MBean Execution

Executes the ruleset /test_ruleapp/1.0/test_ruleset/1.0 on all the visible execution units. This test is not run if the MBean Factory, XU MBean connectivity, or Create Ruleset tests fail.

Update Ruleset

Changes the ruleset as follows:

ruleset executionTest {out java.lang.String result = "updated";};

This test is not run if the Create Ruleset test fails.

Rule Session Second Execution

Executes the ruleset in a POJO rule session to check the update. This test is not run if the Rule Session Execution test fails.

The Rule Session Second Execution test can fail for various reasons. The most frequent causes are summarized here:

  • The XU is not called before the Rule Execution Server diagnostics.
  • The application security is not enabled.
  • The Rule Execution Server user role does not have the required administrative rights to run the diagnostics.
MBean Second Execution

Executes the ruleset on all the visible execution units. This test is not run if the MBean Execution test fails.

Remove RuleApp

Removes the RuleApp /test_ruleapp/1.0. This test is not run if the Create RuleApp test fails.

Check MBeans

Checks that the RuleApp MBean and the ruleset MBean are unregistered. This test is not run if the MBean Factory, RuleApp MBean, or Ruleset MBean tests fail.