Package org.drools.runtime

Examples of org.drools.runtime.StatefulKnowledgeSession.dispose()


        StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession();
        List<String> list = new ArrayList<String>();
        ksession.setGlobal("list", list);
        ksession.fireAllRules();
        ksession.dispose();

        assertEquals(1, list.size());
        assertTrue(list.contains("rule1"));

        list.clear();
View Full Code Here


        // Use the same session for incremental build test
        ksession = kbase.newStatefulKnowledgeSession();
        ksession.setGlobal("list", list);
        ksession.insert("Some String");
        ksession.fireAllRules();
        ksession.dispose();

        assertEquals(1, list.size());
        assertTrue(list.contains("rule1-V2"));

        kagent.dispose();
View Full Code Here

        StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession();
        List<String> list = new ArrayList<String>();
        ksession.setGlobal("list", list);
        ksession.fireAllRules();
        ksession.dispose();

        assertEquals(1, list.size());
        assertTrue(list.contains("rule1"));

        list.clear();
View Full Code Here

        // Use the same session for incremental build test
        ksession = kbase.newStatefulKnowledgeSession();
        ksession.setGlobal("list", list);
        ksession.insert("Some String");
        ksession.fireAllRules();
        ksession.dispose();

        assertEquals(1, list.size());
        assertTrue(list.contains("rule1-V2"));

        kagent.dispose();
View Full Code Here

        ksession.setGlobal("list", list);
        ksession.setGlobal("salesChannelId", 1);
        ksession.setGlobal("includeFinishing", true);
        ksession.insert("Some String");
        ksession.fireAllRules();
        ksession.dispose();

        //assertEquals(1, list.size());
        //assertTrue(list.contains("Rule A fired!"));

        list.clear();
View Full Code Here

        ksession.setGlobal("list", list);
        ksession.setGlobal("salesChannelId", 4);
        ksession.setGlobal("includeFinishing", true);
        ksession.insert("Some String");
        ksession.fireAllRules();
        ksession.dispose();

        //assertEquals(1, list.size());
        //assertTrue(list.contains("Rule A V2 fired!"));

        kagent.dispose();
View Full Code Here

        ksession.setGlobal("list", list);
        ksession.setGlobal("salesChannelId", 1);
        ksession.setGlobal("includeFinishing", true);
        ksession.insert("Some String");
        ksession.fireAllRules();
        ksession.dispose();

        //assertEquals(1, list.size());
        //assertTrue(list.contains("Rule A fired!"));

        list.clear();
View Full Code Here

        ksession.setGlobal("list", list);
        ksession.setGlobal("salesChannelId", 4);
        ksession.setGlobal("includeFinishing", true);
        ksession.insert("Some String");
        ksession.fireAllRules();
        ksession.dispose();

        //assertEquals(1, list.size());
        //assertTrue(list.contains("Rule A V2 fired!"));

        kagent.dispose();
View Full Code Here

        assertEquals( 1,
                      list.size() );
        assertTrue( list.contains( "rule2" ) );

        ksession.dispose();
        kagent.dispose();
    }

    /**
     * Creates two rules (rule1 and rule2) in a drl file. Then it modifies the
View Full Code Here

        List<String> list = new ArrayList<String>();
        ksession.setGlobal( "list",
                            list );
        ksession.insert( "String1" );
        ksession.fireAllRules();
        ksession.dispose();

        assertEquals( 2,
                      list.size() );
        assertTrue( list.contains( "rule1" ) );
        assertTrue( list.contains( "rule2" ) );
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.