19511952195319541955195619571958195919601961
// add to agendaGroup2 node3.assertLeftTuple( tuple, context3, workingMemory ); agenda.unstageActivations(); assertEquals( 1, agenda.getFocus().size() ); node3.assertLeftTuple( tuple,
445446447448449450451452453454455
agenda.getFocus().size() ); node2.assertLeftTuple( tuple, context2, workingMemory ); agenda.unstageActivations(); // main is still focus and this tuple went to agendaGroup 2 assertEquals( 1, agenda.getFocus().size() );
464465466467468469470471472473474
// put another one on agendaGroup 2 node2.assertLeftTuple( tuple, context2, workingMemory ); agenda.unstageActivations(); // main is still focus so shouldn't have increased assertEquals( 1, agenda.getFocus().size() );
721722723724725726727728729730731
node.assertLeftTuple( tuple, context, workingMemory ); agenda.unstageActivations(); // check activation as added to the agendaGroup assertEquals( 1, agendaGroup.size() );
746747748749750751752753754755756
node.assertLeftTuple( tuple, context, workingMemory ); agenda.unstageActivations(); assertEquals( 1, agendaGroup.size() ); agenda.fireNextItem( null ); assertEquals( 0,
804805806807808809810811812813814
rule.setLockOnActive( false ); node.assertLeftTuple( tuple, context, workingMemory ); agenda.unstageActivations(); assertEquals( 1, agendaGroup.size() ); // even if lock-on-active is true, unless the agenda group is active the activation will still propagate
815816817818819820821822823824825
rule.setLockOnActive( true ); agendaGroup.setActive( false ); node.assertLeftTuple( tuple, context, workingMemory ); agenda.unstageActivations(); assertEquals( 2, agendaGroup.size() ); } @Test
637638639640641642643644645646647
662663664665666667668669670671672
720721722723724725726727728729730