Examples of iterateObjects()


Examples of org.drools.WorkingMemory.iterateObjects()

        // no alarms anymore
        assertEquals( 3,
                      list.size() );
        assertEquals( 1,
                      IteratorToList.convert( workingMemory.iterateObjects() ).size() );
    }

    @Test
    public void testLogicalInsertionsAccumulatorPattern() throws Exception {
        // JBRULES-449
View Full Code Here

Examples of org.drools.core.StatefulSession.iterateObjects()

                fail( "should not iterate for than 3 times" );
            }
        }

        i = 0;
        for ( Iterator it = session.iterateObjects(); it.hasNext(); ) {
            Object object = it.next();
            if ( i++ > 5 ) {
                fail( "should not iterate for than 3 times" );
            }
        }
View Full Code Here

Examples of org.drools.core.StatelessSessionResult.iterateObjects()

    public List executeRules(final List objects,
                             final ObjectFilter filter) throws InvalidRuleSessionException {
        StatelessSession session = newStatelessSession();
        StatelessSessionResult results = session.executeWithResults( objects );
       
        return IteratorToList.convert( results.iterateObjects( new ObjectFilterAdapter( filter ) ) );
    }
   
    public int getType() throws InvalidRuleSessionException {
        return RuleRuntime.STATELESS_SESSION_TYPE;
    }
View Full Code Here

Examples of org.drools.core.WorkingMemory.iterateObjects()

                                 a );
        workingMemory.setGlobal( "l",
                                 l );

        workingMemory.fireAllRules();
        list = IteratorToList.convert( workingMemory.iterateObjects( new ClassObjectFilter( a.getClass() ) ) );
        assertEquals( "a still in WM",
                      0,
                      list.size() );
        assertEquals( "Rule should not loop",
                      1,
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.