package com.sample
 
import plugin.*;  // change to plugin.Message and it won't work!
 
rule "Hello World"
	when
		m : Message( status == Message.HELLO, message : message )
	then
		System.out.println( message ); 
		
// NONE OF THE FOLLOWING WORKS:
		m.setMessage( "Goodbye cruel world" );
		m.setStatus( Message.GOODBYE );
		update( m );
end

rule "GoodBye"
	no-loop true
	when
		m : Message( status == Message.GOODBYE, message : message )
	then
		System.out.println( message ); 
// NONE OF THE FOLLOWING WORKS:
		m.setMessage( message );
end