Examples of newSession()


Examples of com.dtrules.session.RuleSet.newSession()

        }
       
        try {
            RulesDirectory rd       = new RulesDirectory(path,file);
            RuleSet        rs       = rd.getRuleSet(RName.getRName("ebdemo"));
            IRSession      session  = rs.newSession();
            DTState        state    = session.getState();
            DecisionTableTypeTest test;
           
            test = new DecisionTableTypeTest(session,rs);
            test.dt.setType(RDecisionTable.Type.FIRST);
View Full Code Here

Examples of com.dtrules.session.RuleSet.newSession()

        RuleSet         rs;
       
        try {
            rd      = new RulesDirectory("",file);
            rs      = rd.getRuleSet(RName.getRName("test",true));
            session = rs.newSession();
            state   = session.getState();
        } catch (RulesException e1) {
            System.out.println("Failed to initialize the Rules Engine");
            return;
        }
View Full Code Here

Examples of com.dtrules.session.RuleSet.newSession()

   
    public void writeDecisionTables(String tables, String fields[], boolean ascending, int limit){
        try {
            RulesDirectory    rd    = new RulesDirectory(getPath(),getRulesDirectoryFile());
            RuleSet           rs    = rd.getRuleSet(getRuleSetName());
            IRSession         s     = rs.newSession();
            RulesAdminService admin = new RulesAdminService(s);
           
            Rules2Excel r2e = new Rules2Excel();
           
            r2e.writeExcel(admin, rs, tables, fields, ascending, limit);
View Full Code Here

Examples of com.dtrules.session.RuleSet.newSession()

           
            dtcompiler.compile(inDTStream, outDTStream);
                       
            RulesDirectory  rd  = new RulesDirectory(path, rulesDirectoryXML);
            RuleSet         rs  = rd.getRuleSet(RName.getRName(ruleset));
            EntityFactory   ef  = rs.newSession().getEntityFactory();
            IREntity        dt  = ef.getDecisiontables();
            Iterator<RName> idt = ef.getDecisionTableRNameIterator();
           
            while(idt.hasNext()){
                RDecisionTable t = (RDecisionTable) dt.get(idt.next());
View Full Code Here

Examples of com.dtrules.session.RuleSet.newSession()

            err.println("Total Errors Found: "+dtcompiler.getErrors().size());
            if(dtcompiler.getErrors().size() == 0){
                rd  = new RulesDirectory(path, rulesDirectoryXML);
                rs  = rd.getRuleSet(RName.getRName(ruleset));
                PrintStream btables = new PrintStream(rs.getWorkingdirectory()+"balanced.txt");
                rs.newSession().printBalancedTables(btables);
                RulesAdminService admin = new RulesAdminService(rs.newSession(),rd);
                List tables = admin.getDecisionTables(rs.getName());
                for(Object table : tables){
                   RDecisionTable dtable = admin.getDecisionTable(rs.getName(),(String)table);
                   dtable.check(System.out);
View Full Code Here

Examples of com.dtrules.session.RuleSet.newSession()

            if(dtcompiler.getErrors().size() == 0){
                rd  = new RulesDirectory(path, rulesDirectoryXML);
                rs  = rd.getRuleSet(RName.getRName(ruleset));
                PrintStream btables = new PrintStream(rs.getWorkingdirectory()+"balanced.txt");
                rs.newSession().printBalancedTables(btables);
                RulesAdminService admin = new RulesAdminService(rs.newSession(),rd);
                List tables = admin.getDecisionTables(rs.getName());
                for(Object table : tables){
                   RDecisionTable dtable = admin.getDecisionTable(rs.getName(),(String)table);
                   dtable.check(System.out);
                }
View Full Code Here

Examples of com.dtrules.session.RuleSet.newSession()

            path+"repository/",      
            "DTRules.xml");
       
        RuleSet        rs      = rd.getRuleSet("SampleProject2");
       
        IRSession      session = rs.newSession();
       
        Mapping        mapping = session.getMapping();
       
        mapping.loadData(session, path+"testfiles/"+"TestCase_001.xml");
       
View Full Code Here

Examples of com.dtrules.session.RuleSet.newSession()

        // factored so that all the Rules Engine State is built off of the
        // DTState object in the Session.  The Rules Engine is Thread safe,
        // so multiple threads can have sessions that run against the same
        // Rule Set, and the only objects unique to a session is the DTState
        // object and objects it holds.
        IRSession      session = rs.newSession();
       
        // We are going to map the data into the session with the default mapping
        // defined by the RuleSet.  Generally a Rule Set will use only one
        // mapping file.  However, you can build other mapping files.
        Mapping        mapping = session.getMapping();
View Full Code Here

Examples of com.dtrules.session.RuleSet.newSession()

           
            dtcompiler.compile(inDTStream, outDTStream);
                       
            RulesDirectory  rd  = new RulesDirectory(path, rulesDirectoryXML);
            RuleSet         rs  = rd.getRuleSet(RName.getRName(ruleset));
            EntityFactory   ef  = rs.newSession().getEntityFactory();
            IREntity        dt  = ef.getDecisiontables();
            Iterator<RName> idt = ef.getDecisionTableRNameIterator();
           
            while(idt.hasNext()){
                RDecisionTable t = (RDecisionTable) dt.get(idt.next());
View Full Code Here

Examples of com.dtrules.session.RuleSet.newSession()

            err.println("Total Errors Found: "+dtcompiler.getErrors().size());
            if(dtcompiler.getErrors().size() == 0){
                rd  = new RulesDirectory(path, rulesDirectoryXML);
                rs  = rd.getRuleSet(RName.getRName(ruleset));
                PrintStream btables = new PrintStream(rs.getWorkingdirectory()+"balanced.txt");
                rs.newSession().printBalancedTables(btables);
                RulesAdminService admin = new RulesAdminService(rs.newSession(),rd);
                List tables = admin.getDecisionTables(rs.getName());
                for(Object table : tables){
                   RDecisionTable dtable = admin.getDecisionTable(rs.getName(),(String)table);
                   dtable.check(System.out);
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.