Package org.kie.internal.runtime

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


         assertEquals( 2,
                       results.size() );
         assertTrue( results.contains( win2 ) );
         assertTrue( results.contains( win3 ) );

         ksession.dispose();
         ksession = createKnowledgeSession( kbase );
         results = new ArrayList<String>();
         ksession.setGlobal( "results",
                             results );
         // reverse the order of the inserts
View Full Code Here


         ksession.fireAllRules();

         assertEquals( 0,
                       list.size() );

         ksession.dispose();
     }

     @Test
     public void testLastMemoryEntryExistsBug() {
         // JBRULES-2809
View Full Code Here

         ksession.fireAllRules();

         assertEquals( 2,
                       list.size() );

         ksession.dispose();
     }

     @Test
     public void testNotIterativeModifyBug() {
         // JBRULES-2809
View Full Code Here

                          a3 );
         ksession.fireAllRules();
         assertEquals( 0,
                       list.size() ); // this should still now blocked by a2, but bug from previous update hanging onto blocked

         ksession.dispose();
     }

     @Test
     public void testModifyWithLiaToEval() {
         String str = "";
View Full Code Here

         p1.setAge( 35 );
         ksession.update( fh, p1 );
         ksession.fireAllRules();
         assertEquals( 1, list.size() );

         ksession.dispose();
     }

     @Test
     public void testExistsIterativeModifyBug() {
         // JBRULES-2809
View Full Code Here

                          a3 );
         ksession.fireAllRules();
         assertEquals( 1,
                       list.size() ); // a2 should still be blocked by a1, but bug from previous update hanging onto blocked

         ksession.dispose();
     }

     @Test
     public void testBindingsWithOr() throws InstantiationException,
                                     IllegalAccessException {
View Full Code Here

                      10 );

         ksession.insert( asg );

         int rules = ksession.fireAllRules();
         ksession.dispose();

         assertEquals( 2,
                       rules );
     }
View Full Code Here

                      Object.class );

         ksession.insert( asg );

         int rules = ksession.fireAllRules();
         ksession.dispose();

         assertEquals( 2,
                       rules );
     }
View Full Code Here

         Person p = new Person( "-..x..xrwx" );

         ksession.insert( p );

         int rules = ksession.fireAllRules();
         ksession.dispose();

         assertEquals( 0,
                       rules );
     }
View Full Code Here

         Person p = new Person( "d..x..xrwx" );

         ksession.insert( p );

         int rules = ksession.fireAllRules();
         ksession.dispose();

         assertEquals( 1,
                       rules );
     }
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.