Package org.kie.api

Examples of org.kie.api.KieBase


                      list.size() );
    }

    @Test
    public void testNot() throws Exception {
        KieBase kbase = loadKnowledgeBase("not_rule_test.drl");
        StatefulKnowledgeSession wm = createKnowledgeSession((KnowledgeBase) kbase);

        final List list = new ArrayList();
        wm.setGlobal( "list", list );
View Full Code Here


        assertTrue( list.contains( new Integer( 8 ) ) );
    }

    @Test
    public void testNotWithBindings() throws Exception {
        KieBase kbase = loadKnowledgeBase("not_with_bindings_rule_test.drl");
        StatefulKnowledgeSession wm = createKnowledgeSession((KnowledgeBase) kbase);

        final List list = new ArrayList();
        wm.setGlobal( "list",
                                 list );
View Full Code Here

                      list.size() );
    }

    @Test
    public void testExists() throws Exception {
        KieBase kbase = loadKnowledgeBase("exists_rule_test.drl");
        StatefulKnowledgeSession wm = createKnowledgeSession((KnowledgeBase) kbase);

        final List list = new ArrayList();
        wm.setGlobal( "list", list );
View Full Code Here

                      list.size() );
    }

    @Test
    public void testExists2() throws Exception {
        KieBase kbase = loadKnowledgeBase("test_exists.drl");
        StatefulKnowledgeSession workingMemory = createKnowledgeSession((KnowledgeBase) kbase);

        final List list = new ArrayList();
        workingMemory.setGlobal( "list",
                                 list );
View Full Code Here

                      list.size() );
    }

    @Test
    public void testExists3() throws Exception {
        KieBase kbase = loadKnowledgeBase("test_Exists_JBRULES_2810.drl");
        StatefulKnowledgeSession ksession = createKnowledgeSession((KnowledgeBase) kbase);

        WorkingMemoryConsoleLogger logger = new WorkingMemoryConsoleLogger( ksession );
        ksession.fireAllRules();
        ksession.dispose();
View Full Code Here

        ksession.dispose();
    }

    @Test
    public void testForall() throws Exception {
        KieBase kbase = loadKnowledgeBase("test_Forall.drl");
        StatefulKnowledgeSession workingMemory = createKnowledgeSession((KnowledgeBase) kbase);

        final List list = new ArrayList();
        workingMemory.setGlobal( "results",
                                 list );
View Full Code Here

                      list.size() );
    }

    @Test
    public void testForall2() throws Exception {
        KieBase kbase = loadKnowledgeBase("test_Forall2.drl");
        StatefulKnowledgeSession ksession = createKnowledgeSession((KnowledgeBase) kbase);

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

    @Test
    public void testRemoveIdentitiesSubNetwork() throws Exception {
        KieBaseConfiguration conf = KnowledgeBaseFactory.newKnowledgeBaseConfiguration();
        conf.setOption(RemoveIdentitiesOption.YES);

        KieBase kbase = loadKnowledgeBase(conf, "test_removeIdentitiesSubNetwork.drl");
        StatefulKnowledgeSession workingMemory = createKnowledgeSession((KnowledgeBase) kbase);

        final List list = new ArrayList();
        workingMemory.setGlobal( "results",
                                 list );
View Full Code Here

                      list.get( 1 ) );
    }

    @Test
    public void testCollectWithNestedFromWithParams() throws Exception {
        KieBase kbase = loadKnowledgeBase( "test_CollectWithNestedFrom.drl");
        StatefulKnowledgeSession workingMemory = createKnowledgeSession((KnowledgeBase) kbase);

        final List results = new ArrayList();
        workingMemory.setGlobal( "results",
                                 results );
View Full Code Here

    }

    @Test
    public void testCollectModifyAlphaRestriction() throws Exception {
        KieBase kbase = loadKnowledgeBase( "test_CollectAlphaRestriction.drl");
        StatefulKnowledgeSession wm = createKnowledgeSession((KnowledgeBase) kbase);

        final List results = new ArrayList();

        wm.setGlobal( "results", results );
View Full Code Here

TOP

Related Classes of org.kie.api.KieBase

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.