Step 3: Deploying the testing and simulation archives

After creating the database resources, you can deploy the testing and simulation archives.

About this task

You deploy the testing.war and DecisionRunner.war archives to use the testing and simulation features. You can apply this procedure to deploy the default archive that is packaged with the installer or any subsequent deployment of a repackaged archive.

Note: The archive files provided are valid for versions 8.5.5.9 and 16.0.0.3 of Liberty.

You can also deploy the default archive and use it on your rules if you have an XML XOM. The ruleset archive includes an XML XOM inside a RuleApp, so you do not have to repackage the archive to include the XOM.

You must deploy the testing and simulation WARs to the same server as the execution unit (XU). Moreover, for the testing and simulation services to work, the WARs must be installed on the same server and port as the Rule Execution Server console.

If a Rule Execution Server console instance is not deployed on the same server and port, you must implement the IlrSSPResolver interface to set up testing.war. In the resolver, you can use the server name to return a specific server URL.

For DecisionRunner.war, if a Rule Execution Server console instance is not deployed on the same server and port, you must set the RES_URL init parameter on the Decision Runner web application to the Rule Execution Server console that uses the Decision Runner.

Procedure

  1. To deploy testing.war:
    1. Copy the file <InstallDir>/executionserver/applicationservers/WLP855/testing.war to <WLP_HOME>/usr/servers/<SERVER_NAME>/apps.
    2. Open <WLP_HOME>/usr/servers/<SERVER_NAME>/server.xml.
    3. In the XML file, add the following code before the </server> tag to declare the context for testing.war:

      <!-- SSP -->
      <application type="war" id="testing" name="testing" location="${server.config.dir}/apps/testing.war">
      	    <application-bnd>
      			<security-role name="resAdministrators">
      				<group name="resAdministrators" />
      			</security-role>
      			<security-role name="resDeployers">
      				<group name="resDeployers" />
      			</security-role>
      	    </application-bnd>
          </application> 
    4. Save the file.
  2. To deploy DecisionRunner.war:
    1. Copy the file <InstallDir>/executionserver/applicationservers/WLP855/DecisionRunner.war to <WLP_HOME>/usr/servers/<SERVER_NAME>/apps.
    2. Open <WLP_HOME>/usr/servers/<SERVER_NAME>/server.xml.
    3. In the XML file, add the following pieces of code to create a managed executor service and declare the context for DecisionRunner.war:
      • To the <featureManager> section:
        <feature>concurrent-1.0</feature>
      • Before the <basicRegistry> section:
        <!-- Managed executor service for Decision Runner -->
        <managedExecutorService jndiName="concurrent/drExecutorService"/> 
        Note:

        You can change the value of jndiName. If you do, you must change the value of the context parameter EXECUTOR_SERVICE and the name of the corresponding resource environment reference that is associated with the web.xml of the Decision Runner WAR.

      • Before the </server> tag:
        <!-- Decision Runner -->
        <application type="war" id="DecisionRunner" name="DecisionRunner" location="${server.config.dir}/apps/DecisionRunner.war">
         	    <application-bnd>
         			<security-role name="resAdministrators">
         				<group name="resAdministrators" />
         			</security-role>
         			<security-role name="resDeployers">
         				<group name="resDeployers" />
         			</security-role>
         	    </application-bnd>
             </application>  
    4. Save the file.
  3. If necessary, restart the Liberty server and the Rule Execution Server console so that the testing and simulation features function correctly.