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 ruleset in a POJO session.

       //Get the rule session factory.
       IlrJ2SESessionFactory sessionFactory = new IlrJ2SESessionFactory(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 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.

        If the management session was created from a IlrJ2SESessionFactory, a connection to the XU is used for this operation. If no XU connection can be opened, an IlrSessionException is raised.

        Throws:
        An - IlrSessionException object if an error occurs while the ruleset is 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.

        If the management session was created from a IlrJ2SESessionFactory, a connection to the XU is used for this operation. If no XU connection can be opened, an IlrSessionException is raised.

        Throws:
        An - IlrSessionException object if an error occurs while the rulesets are 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.

© Copyright IBM Corp. 1987, 2020