" then\n" +
" modify( m ){ setMessage3( 'msg3' ) };\n" +
"end\n";
KnowledgeBase kbase = loadKnowledgeBaseFromString( drl );
StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession();
Message m1 = new Message( "msg1" );
ksession.insert(m1);
assertEquals(2, ksession.fireAllRules());
Message m2 = (Message) ksession.getGlobal( "m2" );
assertEquals( "msg1", m1.getMessage() );
assertEquals( "msg2", m1.getMessage2() );
assertEquals( "msg3", m1.getMessage3() );