Package org.drools.reteoo

Examples of org.drools.reteoo.ReteooWorkingMemoryInterface.fireAllRules()


        str += "end  \n";        
       
        KnowledgeBase kbase = loadKnowledgeBaseFromString( str );
       
        ReteooWorkingMemoryInterface wm = ((StatefulKnowledgeSessionImpl)kbase.newStatefulKnowledgeSession()).session;
        wm.fireAllRules();
       
       
        ObjectTypeNode otnInit = getObjectTypeNode(kbase, "InitialFactImpl" );
       
        LeftInputAdapterNode liaNode = ( LeftInputAdapterNode ) otnInit.getSinkPropagator().getSinks()[0];
View Full Code Here


        str += "end  \n";        
       
        KnowledgeBase kbase = loadKnowledgeBaseFromString( str );
       
        ReteooWorkingMemoryInterface wm = ((StatefulKnowledgeSessionImpl)kbase.newStatefulKnowledgeSession()).session;
        wm.fireAllRules();
       
       
        ObjectTypeNode otnInit = getObjectTypeNode(kbase, "InitialFactImpl" );
       
        LeftInputAdapterNode liaNode = ( LeftInputAdapterNode ) otnInit.getSinkPropagator().getSinks()[0];
View Full Code Here

        // x0 is the blocker
        for ( int i = 0; i < 100; i++ ) {
            p = new Person( "x" + i, 100);
            fh = ( InternalFactHandle ) wm.insert( p );
            wm.fireAllRules();
            peeps.put(p.getName(), fh);
        }

        // each x is blocker in turn up to x99
        for ( int i = 0; i < 99; i++ ) {
View Full Code Here

        for ( int i = 0; i < 99; i++ ) {
            fh = peeps.get("x" + i);
            p = (Person) fh.getObject();
            p.setAge( 102 );
            wm.update( fh, p );
            wm.fireAllRules();
            assertEquals( "i=" + i, 1, map.get("inserted").intValue() );
        }

        // x99 is still the blocker
        for ( int i = 98; i >= 0; i-- ) {
View Full Code Here

        for ( int i = 98; i >= 0; i-- ) {
            fh = peeps.get("x" + i);
            p = (Person) fh.getObject();
            p.setAge( 90 );
            wm.update( fh, p );
            wm.fireAllRules();
            assertEquals( "i=" + i, 1, map.get("inserted").intValue() );
        }

        // move x99, should no longer be a blocker
        fh = peeps.get("x99");
View Full Code Here

        // move x99, should no longer be a blocker
        fh = peeps.get("x99");
        p = (Person) fh.getObject();
        p.setAge( 90 );
        wm.update( fh, p );
        wm.fireAllRules();
        assertEquals( 2, map.get("inserted").intValue() );
    }

    @Test
    public void testFullFastIteratorResume() throws Exception {
View Full Code Here

        peeps.put(p.getName(), fh);

        for ( int i = 1; i < 100; i++ ) {
            p = new Person( "x" + i, 101);
            fh = ( InternalFactHandle ) wm.insert( p );
            wm.fireAllRules();
            peeps.put(p.getName(), fh);
        }

        List<RightTuple> list = new ArrayList<RightTuple>(100);
        FastIterator it = n.getRightIterator( bm.getRightTupleMemory() );
View Full Code Here

        str += "end  \n";        
       
        KnowledgeBase kbase = loadKnowledgeBaseFromString( str );
       
        ReteooWorkingMemoryInterface wm = ((StatefulKnowledgeSessionImpl)kbase.newStatefulKnowledgeSession()).session;
        wm.fireAllRules();
       
       
        ObjectTypeNode otnInit = getObjectTypeNode(kbase, "InitialFactImpl" );
       
        LeftInputAdapterNode liaNode = ( LeftInputAdapterNode ) otnInit.getSinkPropagator().getSinks()[0];
View Full Code Here

        str += "end  \n";        
       
        KnowledgeBase kbase = loadKnowledgeBaseFromString( str );
       
        ReteooWorkingMemoryInterface wm = ((StatefulKnowledgeSessionImpl)kbase.newStatefulKnowledgeSession()).session;
        wm.fireAllRules();
       
       
        ObjectTypeNode otnInit = getObjectTypeNode(kbase, "InitialFactImpl" );
       
        LeftInputAdapterNode liaNode = ( LeftInputAdapterNode ) otnInit.getSinkPropagator().getSinks()[0];
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.