Setting up the Automated ruleset management sample

You must use the Rule Execution Server console to install this sample.

Procedure

To install this sample:

  1. Start the Rule Execution Server console:

    The procedure is different depending on whether you work with the sample server or with another supported application server.

    • If you work with the sample server:
      1. Switch to the Samples Console perspective.
      2. Start the sample server from the Sample Server view.
      3. After the server is started, click the Rule Execution Server Console link in the Operational Decision Manager Sample Server view.

      The Rule Execution Server console opens on http://localhost:<PORT>/res

    • If you work with WebLogic Server, the server.user and server.password properties that are defined in the build.properties file must be a WebLogic Server user defined in the WebLogic Server environment:
      Under environment/servers/<your_domain_AdminServer_instance>/protocols/IIOP:
      • Enable IIOP
      • Enter the IIOP username you defined
      • Enter the IIOP password you defined
      • Confirm the IIOP password you defined

      The Rule Execution Server console opens on http://localhost:7001/res

    • If you work with the Tomcat 7.0 application server, you must enable a remote JMX listener (see JMX Remote Lifecycle Listener). Do the following steps:
      1. Stop the Tomcat application server.
      2. Download the JMX remote JAR file from Tomcat 7 Downloads and place it in <InstallDir>/CATALINA_HOME/lib.
      3. In <InstallDir>/CATALINA_HOME/conf/server.xml, add the following code:
        < Listener className="org.apache.catalina.mbeans.JmxRemoteLifecycleListener"
        rmiRegistryPortPlatform="8999" rmiServerPortPlatform="10002" />
        The sample Java code uses the port number 8999.
      4. Add the following line to <InstallDir>/CATALINA_HOME/bin/catalina.sh:
        CATALINA_OPTS="$CATALINA_OPTS -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false"
      5. Optional: If you use Windows, add the following line to <InstallDir>/CATALINA_HOME/bin/catalina.bat:
        CATALINA_OPTS=%CATALINA_OPTS% -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false
      6. Follow the instructions in the next section, for other supported application servers.
    • If you work with other supported application servers:
      1. Before you run this code sample, deploy Rule Execution Server on your application server. See Configuring.
      2. After Rule Execution Server is deployed, open a web browser and enter one of the following URLs to open the Rule Execution Server console login page for your application server:
        • WebSphere® Application Server 8.x: http://localhost:9080/res
        • Tomcat: http://localhost:8080/res
  2. Log in to the Rule Execution Server console.
    • User name: resAdmin
    • Password: resAdmin
  3. Click the Explorer tab to display the list of RuleApp archives that are deployed on the Rule Execution Server console.
  4. Before you build the sample in the next step, if you are using the WebLogic Server, configure the sample property files as follows: <InstallDir>/executionserver/samples/jmxremote/weblogic<version_number>/build.properties
    WL_HOME=${env.WL_HOME}
    By default, the variable is set to your WL_HOME environment variable.
    server.url=t3://localhost:7001
    Specifies the URL where the Rule Execution Server console is deployed.
    server.user=resAdmin
    Sets the user login.
    server.password=resAdmin
    Sets the user password.
  5. Build the Java™ client classes in Rule Designer by switching to the Samples Console perspective.
    Tip: To open the Samples Commands view, you can click the View sample commands link in the Samples and Tutorials view.
    1. In the Samples Commands view, go to Samples Commands > Rule Execution Server > Automated ruleset management > application_server.
    2. Double-click the build command to run it.