Rule Execution Server API

ilog.rules.res.session
Interface IlrManagementSession


public interface IlrManagementSession

IlrManagementSession is the base interface for management sessions. Use a management session to manipulate RuleApps and rulesets in the repository, and to retrieve metadata.

Code example

The following code example shows how to invalidate a rule in a POJO session.

   //Get the rule session factory.
   IlrJ2SESessionFactory sessionFactory = new IlrJ2SESessionFactory();
   sessionFactory.setOutput(new PrintWriter(System.out));
   //Create the management session.
   IlrManagementSession managementSession=sessionFactory.createManagementSession();
   //Invalidate a ruleset.
   String rulesetPath = "/ruleApp/ruleset";
   managementSession.invalidate(rulesetPath);
 

Since:
7.0

Method Summary
 IlrRepositoryFactory getRepositoryFactory()
          Returns the repository factory.
 void invalidate(IlrPath rulesetPath)
          Invalidates the ruleset.
 void invalidate(IlrPath[] rulesetPaths)
          Invalidates some rulesets.
 void loadUptodateRuleset(IlrPath rulesetPath)
          Loads and parses a specific ruleset.
 IlrPath[] solveRulesetPath(IlrPath[] rulesetPaths)
          Resolves an array of canonical ruleset paths.
 

Method Detail

getRepositoryFactory

IlrRepositoryFactory getRepositoryFactory()
                                          throws IlrSessionException
Returns the repository factory. Use the returned factory to manipulate the repository directly.

Throws:
An - IlrSessionException object if an error occurred while the repository factory was retrieved.
IlrSessionException
Returns:
The repository factory.

invalidate

void invalidate(IlrPath rulesetPath)
                throws IlrSessionException
Invalidates the ruleset. As a consequence, the ruleset is parsed again, which can significantly affect performance.

Throws:
An - IlrSessionException object if an error occurred while the ruleset was invalidated.
IlrSessionException
Parameters:
rulesetPath - The canonical path for the ruleset to be invalidated

invalidate

void invalidate(IlrPath[] rulesetPaths)
                throws IlrSessionException
Invalidates some rulesets. As a consequence, the rulesets are parsed again, which can significantly affect performance.

Throws:
An - IlrSessionException object if an error occurred while the rulesets were invalidated.
IlrSessionException
Parameters:
rulesetPaths - An array of canonical paths for the rulesets to be invalidated.

solveRulesetPath

IlrPath[] solveRulesetPath(IlrPath[] rulesetPaths)
                           throws IlrSessionException
Resolves an array of canonical ruleset paths.

Throws:
An - IlrSessionException object if an error occurs while the ruleset paths are resolved, for example if a ruleset path is wrong.
IlrSessionException
Parameters:
rulesetPaths - The array of ruleset paths to be resolved.
Returns:
An array of resolved ruleset paths.

loadUptodateRuleset

void loadUptodateRuleset(IlrPath rulesetPath)
                         throws IlrSessionException
Loads and parses a specific ruleset.

Throws:
An - IlrSessionException object if an error occurred while the ruleset was loaded, for example if the ruleset path is wrong.
IlrSessionException
Parameters:
rulesetPath - The path of the ruleset to be loaded.

Rule Execution Server API

© Copyright IBM Corp. 1987, 2013