Examples of newWorkingMemory()


Examples of org.drools.RuleBase.newWorkingMemory()

     * No-loop is only meant to work for the same Rule/TupleKey combination.
     */
    public void testNoLoopDifferentTuple() throws Exception {
        RuleBase ruleBase = new RuleBaseImpl( new Rete( ) );

        final WorkingMemoryImpl workingMemory = (WorkingMemoryImpl) ruleBase.newWorkingMemory( );
        final Agenda agenda = workingMemory.getAgenda( );

        final Rule rule = new Rule( "test-rule" );

        // add consequence
View Full Code Here

Examples of org.drools.RuleBase.newWorkingMemory()

   
    public void testXorGroup() throws Exception
    {
        RuleBase ruleBase = new RuleBaseImpl( new Rete( ) );

        WorkingMemoryImpl workingMemory = (WorkingMemoryImpl) ruleBase.newWorkingMemory( );
        Agenda agenda = workingMemory.getAgenda( );       
       
        Consequence consequence = new org.drools.spi.Consequence( )
        {
            public void invoke(org.drools.spi.Tuple tuple)
View Full Code Here

Examples of org.drools.RuleBase.newWorkingMemory()

   
    public void testFilters() throws Exception
    {
        RuleBase ruleBase = new RuleBaseImpl( new Rete( ) );

        WorkingMemoryImpl workingMemory = (WorkingMemoryImpl) ruleBase.newWorkingMemory( );
        final Agenda agenda = workingMemory.getAgenda( );

        final Rule rule = new Rule( "test-rule" );

        // add consequence
View Full Code Here

Examples of org.drools.RuleBase.newWorkingMemory()

    public void testClearAgenda() throws Exception
    {
        RuleBase ruleBase = new RuleBaseImpl( new Rete( ) );

        WorkingMemoryImpl workingMemory = (WorkingMemoryImpl) ruleBase.newWorkingMemory( );
        final Agenda agenda = workingMemory.getAgenda( );

        final Rule rule = new Rule( "test-rule" );

        // add consequence
View Full Code Here

Examples of org.drools.RuleBase.newWorkingMemory()

{
    public void testScheduledActivation() throws Exception
    {
        RuleBase ruleBase = new RuleBaseImpl( new Rete() );

        WorkingMemoryImpl workingMemory = (WorkingMemoryImpl) ruleBase.newWorkingMemory();
        final Scheduler scheduler = Scheduler.getInstance();

        final Rule rule = new Rule( "test-rule" );
        final List data = new ArrayList();
View Full Code Here

Examples of org.drools.RuleBase.newWorkingMemory()

    public void testDoLoopScheduledActivation() throws Exception
    {
        RuleBase ruleBase = new RuleBaseImpl( new Rete() );

        final WorkingMemoryImpl workingMemory = (WorkingMemoryImpl) ruleBase.newWorkingMemory();
        final Agenda agenda = workingMemory.getAgenda();
        final Scheduler scheduler = Scheduler.getInstance();

        final Rule rule = new Rule( "test-rule" );
        final List data = new ArrayList();
View Full Code Here

Examples of org.drools.RuleBase.newWorkingMemory()

    public void testNoLoopScheduledActivation() throws Exception
    {
        RuleBase ruleBase = new RuleBaseImpl( new Rete() );

        final WorkingMemoryImpl workingMemory = (WorkingMemoryImpl) ruleBase.newWorkingMemory();
        final Agenda agenda = workingMemory.getAgenda();
        final Scheduler scheduler = Scheduler.getInstance();

        final Rule rule = new Rule( "test-rule" );
        final List data = new ArrayList();
View Full Code Here

Examples of org.drools.RuleBase.newWorkingMemory()

    public void testExceptionHandler() throws Exception
    {
        RuleBase ruleBase = new RuleBaseImpl( new Rete() );

        WorkingMemoryImpl workingMemory = (WorkingMemoryImpl) ruleBase.newWorkingMemory();
        Agenda agenda = workingMemory.getAgenda();
        final Scheduler scheduler = Scheduler.getInstance();

        final Rule rule = new Rule( "test-rule" );
View Full Code Here

Examples of org.drools.RuleBase.newWorkingMemory()

        Rete rete = new Rete();
        ObjectTypeNode objectTypeNode = rete.getOrCreateObjectTypeNode( new ClassObjectType( String.class ) );
        MockObjectSink sink = new MockObjectSink();
        objectTypeNode.addObjectSink( sink );
        RuleBase ruleBase = new RuleBaseImpl( rete );
        WorkingMemoryImpl workingMemory = (WorkingMemoryImpl) ruleBase.newWorkingMemory();
       
        //objectTypeNode.
    }
   
}
View Full Code Here

Examples of org.drools.RuleBase.newWorkingMemory()

        Rete rete = new Rete();
        ObjectTypeNode objectTypeNode = rete.getOrCreateObjectTypeNode( new ClassObjectType( String.class ) );
        MockObjectSink sink = new MockObjectSink();
        objectTypeNode.addObjectSink( sink );
        RuleBase ruleBase = new RuleBaseImpl( rete );
        WorkingMemoryImpl workingMemory = (WorkingMemoryImpl) ruleBase.newWorkingMemory();

        final Agenda agenda = workingMemory.getAgenda();

        Consequence consequence = new Consequence() {
            public void invoke(Activation activation)
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.