Step 4: Deploying the Rule Execution Server management WAR

Deploy the WAR file to use Rule Execution Server on Tomcat.

About this task

Also, you control access to Rule Execution Server and enforce security by defining user groups and associated roles.

The main groups and their associated default user and password are summarized in the following table.

Group Use Default user/password
resAdministrators
Gives a user full administrator rights to:
  • Access and use the Rule Execution Server console to populate the database schema

  • Deploy, browse, and modify RuleApps

  • Monitor the decision history, purge and back up the history

  • Run diagnostics and view server information

resAdmin/resAdmin
resDeployers
Gives a user the rights to:
  • Deploy, browse, and modify RuleApps

  • Test rulesets

resDeployer/resDeployer
resMonitors
Gives a user the rights to:
  • View RuleApps

  • Monitor decision history and access Decision Center reports

resMonitor/resMonitor

Use the following procedure to create groups and users, and deploy the Rule Execution Server console management WAR.

Note: For more information about how to set the JNDI name of the data source, see JNDI Datasource HOW-TO.

Procedure

  1. Copy the file <InstallDir>/executionserver/applicationservers/tomcat8/res.war to <CATALINA_HOME>/webapps.
  2. Open <CATALINA_HOME>/conf/tomcat-users.xml.
  3. In the file, add the following code after the <tomcat-users>:
    <role rolename="resAdministrators"/>
    <role rolename="resDeployers"/>
    <role rolename="resMonitors"/>
    <user username="resAdmin" password="resAdmin" roles="resAdministrators"/>
    <user username="resDeployer" password="resDeployer" roles="resDeployers"/>
    <user username="resMonitor" password="resMonitor" roles="resMonitors"/>
  4. Save the file.
  5. Copy your database driver to the <CATALINA_HOME>/lib directory. For example, the Derby embedded database driver is derby.jar, which is available in <InstallDir>/shared/tools/derby/lib.
  6. Open <CATALINA_HOME>/conf/server.xml.
  7. Declare the database just before the tag closing the global resources definitions: </GlobalNamingResources>. For example:
    <Resource name="jdbc/resdatasource" type="javax.sql.DataSource"
        auth="Container"
        username="resdbUser" password="resdbUser"
        driverClassName="org.apache.derby.jdbc.EmbeddedDriver"
        url="jdbc:derby:c:/resdb;create=true"/>
    Note: Adjust the URL if you created the empty database in the previous step.
  8. In the same file, add the link to your database for res.war just before the tag closing the localhost definition: </Host>:
    <Context path="/res"
            docBase="res.war"
            debug="0"
            reloadable="true"
            crossContext="true">
    <Logger className="org.apache.catalina.logger.FileLogger"
            prefix="localhost_res_log."
            suffix=".txt" timestamp="true"/>
    <ResourceLink name="jdbc/resdatasource"
            global="jdbc/resdatasource"
            type="javax.sql.DataSource"/>
    </Context>
  9. Start Tomcat by launching startup.bat in <CATALINA_HOME>/bin
  10. Open the Rule Execution Server console in your browser by entering res with the root URL on the host machine: http://localhost:8080/res

    If your browser is not running on the same host as the application server, replace localhost with the address of the machine. If the web application is mapped to a host with a different port number, change the port number from 8080 to the host port number.

    The log for the Rule Execution Server console is written to the <CATALINA_HOME>/logs/res-console.log file.