17.5. Using a Rule Service Provider

Procedure 17.1. Task

  1. Use the following code to load the JBoss Rules rule service provider:
    Class ruleServiceProviderClass = Class.forName("org.drools.jsr94.rules.RuleServiceProviderImpl");
  2. Use the following code to register it:
    RuleServiceProviderManager.registerRuleServiceProvider( "http://jboss.com/products/rules", ruleServiceProviderClass);
  3. Call to the RuleServiceProvider using the following code:
    RuleServiceProviderManager.getRuleServiceProvider("http://jboss.com/products/rules");
  4. To stop the rule service, deregister it with this code:
    RuleServiceProviderManager.deregisterRuleServiceProvider( "http://jboss.com/products/rules");