Package org.kie.internal.runtime

Examples of org.kie.internal.runtime.StatefulKnowledgeSession.dispose()


        ks.fireAllRules();

        assertTrue( list.contains( 0 ) );
        assertEquals( 1, list.size() );

        ks.dispose();
    }



    @Test
View Full Code Here


        ks.fireAllRules();

        assertEquals( 5, list.size() );
        assertEquals( Arrays.asList( 99, "b", 11, Object.class, 42 ), list );

        ks.dispose();
    }


    @Test
    public void testMultipleModifications() {
View Full Code Here

        ks.fireAllRules();

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

        ks.dispose();

    }


    @Test
View Full Code Here

        assertTrue( list.contains( "HH" ) );
        assertTrue( list.contains( "HH" ) );
        assertTrue( list.contains( "HD" ) );
        assertEquals( 9, list.size() );

        ks.dispose();

    }


View Full Code Here

        ks.insert( "go2" );
        ks.fireAllRules();

        System.out.println( "---------------------------------------" );

        ks.dispose();

    }


View Full Code Here

        ks.insert( "go3" );
        ks.fireAllRules();

        assertEquals( Arrays.asList( 100 ), list );

        ks.dispose();
    }


    @Test
    public void testTraitNoType() {
View Full Code Here

        assertThat( ((Number) activation.getDeclarationValue( "$min" )).intValue(),
                    is( 3 ) );
        assertThat( ((Number) activation.getDeclarationValue( "$avg" )).intValue(),
                    is( 10 ) );

        ksession.dispose();

    }

    public static class DataSet {
        public Cheese[]     cheese;
View Full Code Here

                "end";

        KnowledgeBase kbase = loadKnowledgeBaseFromString( drl );
        StatefulKnowledgeSession ksession = createKnowledgeSession(kbase);
        ksession.fireAllRules();
        ksession.dispose();
    }

    public static class MyObj {
        public static class NestedObj {
            public long value;
View Full Code Here

        final List<Number> results = new ArrayList<Number>();
        ksession.setGlobal( "results",
                results );
        ksession.fireAllRules();
        ksession.dispose();
        assertEquals( 1,
                results.size() );
        assertEquals( 9.0,
                results.get( 0 ) );
    }
View Full Code Here

                throw new RuntimeException(e);
            }
        }

        assertTrue(success);
        ksession.dispose();
    }

    public static class Bean {

        private int seed;
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.