Package javax.rules

Examples of javax.rules.InvalidRuleSessionException


    protected void checkRuleSessionValidity( )
        throws InvalidRuleSessionException
    {
        if ( this.workingMemory == null )
        {
            throw new InvalidRuleSessionException( "invalid rule session" );
        }
    }
View Full Code Here


        if ( this instanceof StatefulRuleSession )
        {
            return RuleRuntime.STATEFUL_SESSION_TYPE;
        }

        throw new InvalidRuleSessionException( "unknown type" );
    }
View Full Code Here

        workingMemory.assertObject(objectIter.next());
      }

      workingMemory.fireAllRules();
    } catch (FactException e) {
      throw new InvalidRuleSessionException(e.getMessage(), e);
    }

    List results = workingMemory.getObjects();

    this.applyFilter(results, filter);
View Full Code Here

    this.checkRuleSessionValidity();

    try {
      return (Handle) this.getWorkingMemory().assertObject(object);
    } catch (FactException e) {
      throw new InvalidRuleSessionException("cannot assert object", e);
    }
  }
View Full Code Here

    if (objectHandle instanceof FactHandle) {
      try {
        this.getWorkingMemory().modifyObject((FactHandle) objectHandle,
            newObject);
      } catch (FactException e) {
        throw new InvalidRuleSessionException("cannot update object", e);
      }
    } else {
      throw new InvalidHandleException("invalid handle");

    }
View Full Code Here

    if (handleObject instanceof FactHandle) {
      try {
        this.getWorkingMemory()
            .retractObject((FactHandle) handleObject);
      } catch (FactException e) {
        throw new InvalidRuleSessionException("cannot remove object", e);
      }
    } else {
      throw new InvalidHandleException("invalid handle");
    }
  }
View Full Code Here

    this.checkRuleSessionValidity();

    try {
      this.getWorkingMemory().fireAllRules();
    } catch (DroolsException e) {
      throw new InvalidRuleSessionException("cannot execute rules", e);
    }
  }
View Full Code Here

    result = (List) template.executeStateful("test", null, new StatefulRuleSessionCallback() {
          public Object execute(StatefulRuleSession session) throws InvalidRuleSessionException, InvalidHandleException, RemoteException {
            try {
              session.removeObject(browserHandle);
              throw new InvalidRuleSessionException("This must be invalid!");
            }
            catch (InvalidRuleSessionException ex) {
              // expected
            }
            session.addObject("MSIE");
View Full Code Here

     *
     * @throws InvalidRuleSessionException on illegal rule session state.
     */
    protected void checkRuleSessionValidity() throws InvalidRuleSessionException {
        if ( this.session == null ) {
            throw new InvalidRuleSessionException( "invalid rule session" );
        }
    }
View Full Code Here

     *
     * @throws InvalidRuleSessionException on illegal rule session state.
     */
    protected void checkRuleSessionValidity() throws InvalidRuleSessionException {
        if ( getRuleExecutionSet() == null ) {
            throw new InvalidRuleSessionException( "invalid rule session" );
        }
    }
View Full Code Here

TOP

Related Classes of javax.rules.InvalidRuleSessionException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.