package com.sample
 
import com.sample.ProcessTest.Message;
 
rule "Hello World" ruleflow-group "hello"
    when
        m : Message( status == Message.HELLO, message : message )
    then
        System.out.println( message );
        m.setMessage( "Goodbye cruel world" );
        m.setStatus( Message.GOODBYE );
        update( m );
end

rule "GoodBye" ruleflow-group "goodbye"
    no-loop true
    when
        m : Message( status == Message.GOODBYE, message : message )
    then
        System.out.println( message );
        m.setMessage( message );

end
