final List list = new ArrayList();
session.setGlobal( "list",
list );
final State state = new State( "initial" );
session.insert( state,
true );
session.fireAllRules();
assertEquals( 1,
((List) session.getGlobal( "list" )).size() );
state.setFlag( true );
assertEquals( 1,
((List) session.getGlobal( "list" )).size() );
session.fireAllRules();
assertEquals( 2,
((List) session.getGlobal( "list" )).size() );
state.setState( "finished" );
StatefulKnowledgeSession ksesion = SerializationHelper.getSerialisedStatefulKnowledgeSession( new StatefulKnowledgeSessionImpl( (ReteooWorkingMemory) session ),
// MarshallerFactory.newIdentityMarshallingStrategy(),
false );