Distributing Decision Validation Services tests to multiple servers

When you configure the Rule Execution Server environment on a domain with multiple servers, you can define which Rule Execution Server instances are used to execute Decision Validation Services tests.

Before you begin

  1. Package all your executable object models (XOMs) into the ssp.war archive. For more information, see Making the XOM accessible by repackaging the SSP.
  2. Make sure that the Scenario Service Provider (SSP) archive file (ssp.war) is deployed on each server along with a XU connection factory and the appropriate data source definition.

About this task

To define which Rule Execution Server instances are used to execute Decision Validation Services tests, you create a custom SSP resolver.

Procedure

  1. Implement the IlrSSPResolver interface.
    For a simple implementation, you can use the server name to return a specific server URL. For example, you can have two servers defined in Decision Center:
    • testingServer1: http://host1:9080/res
    • testingServer2: http://host1:9080/res
    And your SSP resolver can evaluate the SSP URL as follows:
    if ( serverName.equals("testingServer1") )
    {
        return ( new URL( "http://server1:9080/testing" ) );
    }
    else if ( serverName.equals("testingServer2") )
    {
      return ( new URL( "http://server2:9080/testing" );
    }
    else
      return( new URL( "http://host1:9080/testing" )); 
  2. Add your class to the teamserver.war archive.
  3. Set theteamserver.defaultSSPResolver.class property to that class.

Results

Next time you run a DVS test, the execution will be directed according to the server that you choose.

What to do next

For a better implementation, you can set a dependency with the project that is being tested so that you can distribute the DVS execution according to that project.
ManagerBean bean = ManagerBean.getInstance() ;  
IlrSession session = bean.getSession();
IlrRuleProject project = session.getWorkingBaseline().getProject();
String pname = project.getName();