Package javax.rules

Examples of javax.rules.StatefulRuleSession.addObjects()


                uri, new HashMap( ), RuleRuntime.STATEFUL_SESSION_TYPE );
        log( "Got Stateful Rule Session " + uri );
        log( ": " + statefulRuleSession );
        // add an Object to the statefulRuleSession
        log( "Adding browser User-Agent to session: " + userAgent );
        statefulRuleSession.addObjects( inputList );
        log( "Called addObject on Stateful Rule Session: "
            + statefulRuleSession );
        statefulRuleSession.executeRules( );
        log( "Called executeRules" );
        // extract the Objects from the statefulRuleSession
View Full Code Here


    StatefulRuleSession session = (StatefulRuleSession) source.createSession(BIND_URI, null, RuleRuntime.STATEFUL_SESSION_TYPE);

    // execute it
    List facts = new ArrayList();
    facts.add("Gecko");
    session.addObjects(facts);
    session.executeRules();
    facts = session.getObjects();

    assertTrue("Facts does not contain Gecko", facts.contains("Gecko"));
    assertTrue("Facts does not contain a:Gecko", facts.contains("a:Gecko"));
View Full Code Here

            System.out.println("Invoice:\n" +
                                               " amount: " + inputInvoice2.getAmount() +
                                               " status: " + inputInvoice2.getStatus());

            // add an Object to the statefulRuleSession
            statefulRuleSession.addObjects( input );
            System.out.println( "Called addObject on Stateful Rule Session: "
                                                    + statefulRuleSession );

            statefulRuleSession.executeRules();
            System.out.println( "Called executeRules" );
View Full Code Here

      // Add some clauses...
      ArrayList input = new ArrayList();
      input.add(new Clause("Socrate","is human"));

      // add an Object to the statefulRuleSession
      statefulRuleSession.addObjects( input );
      System.out.println( "Called addObject on Stateful Rule Session: "
                                              + statefulRuleSession );

      statefulRuleSession.executeRules();
      System.out.println( "Called executeRules" );
View Full Code Here

      // Add some clauses...
      ArrayList input = new ArrayList();
      input.add(new Clause("Socrate is human"));

      // add an Object to the statefulRuleSession
      statefulRuleSession.addObjects( input );
      System.out.println( "Called addObject on Stateful Rule Session: "
                                              + statefulRuleSession );

      statefulRuleSession.executeRules();
      System.out.println( "Called executeRules" );
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.