Package org.drools.reteoo

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


        // each x is blocker in turn up to x99
        for ( int i = 0; i < 99; i++ ) {
            fh = peeps.get("x" + i);
            p = (Person) fh.getObject();
            p.setAge( 90 );
            wm.update( fh, p );
            assertEquals( "i=" + i, 1, map.get("inserted").intValue() );
        }

        // x99 is still the blocker, everything else is just added
        for ( int i = 0; i < 99; i++ ) {
View Full Code Here


        // x99 is still the blocker, everything else is just added
        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
View Full Code Here

        // x99 is still the blocker
        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
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
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.