Package org.drools

Examples of org.drools.StatefulSession.addEventListener()


    StatefulSession session  = getWorkingMemory("test_rules.drl");

        TestingEventListener ls = new TestingEventListener();
        //TestingEventListener.stubOutRules(set, session.getRuleBase(), true);

        session.addEventListener(ls);

        session.insert(new Cheese());
        session.fireAllRules(ls.getAgendaFilter(set, true));

        assertEquals(new Integer(1), (Integer) ls.firingCounts.get("rule1"));
View Full Code Here


    StatefulSession session  = getWorkingMemory("test_rules.drl");

        TestingEventListener ls = new TestingEventListener();
        //TestingEventListener.stubOutRules(set, session.getRuleBase(), false);

        session.addEventListener(ls);

        session.insert(new Cheese());
        session.fireAllRules(ls.getAgendaFilter(set, false));

        //assertEquals(new Integer(1), (Integer) ls.firingCounts.get("rule1"));
View Full Code Here

    StatefulSession session  = getWorkingMemory("test_rules.drl");

        TestingEventListener ls = new TestingEventListener();
        //TestingEventListener.stubOutRules(set, session.getRuleBase(), false);

        session.addEventListener(ls);

        session.insert(new Cheese());

        List<String> list = new ArrayList<String>();
        session.setGlobal("list", list);
View Full Code Here

        StatefulSession session  = getWorkingMemory("test_rules.drl");

        TestingEventListener ls = new TestingEventListener();
        //TestingEventListener.stubOutRules(set, session.getRuleBase(), true);

        session.addEventListener(ls);

        session.insert(new Cheese());
        session.fireAllRules(ls.getAgendaFilter(set, true));

        assertEquals(new Integer(1), (Integer) ls.firingCounts.get("rule1"));
View Full Code Here

        StatefulSession session  = getWorkingMemory("test_rules.drl");

        TestingEventListener ls = new TestingEventListener();
        //TestingEventListener.stubOutRules(set, session.getRuleBase(), false);

        session.addEventListener(ls);

        session.insert(new Cheese());
        session.fireAllRules(ls.getAgendaFilter(set, false));

        //assertEquals(new Integer(1), (Integer) ls.firingCounts.get("rule1"));
View Full Code Here

        StatefulSession session  = getWorkingMemory("test_rules.drl");

        TestingEventListener ls = new TestingEventListener();
        //TestingEventListener.stubOutRules(set, session.getRuleBase(), false);

        session.addEventListener(ls);

        session.insert(new Cheese());

        List<String> list = new ArrayList<String>();
        session.setGlobal("list", list);
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.