Hi guy,
does anyone knows how to call a function in guvnor's rules?
i'm trying to do something approximatively like that :
function :
function void choosegame (String game){
int startgame=0;
if ( game == "basic")
system.out.print (MessageBasic);
startgame = 1;
}
rule :
rule "basic game "
When :
Player( NewPlayer : level =="beginner");
Then :
Player fact0 = new Player();
fact0.setStatus( "basic" );
insert(fact0 );
choosegame (basic);
end
but it doesn't work.
ok, i found myself. The mystake was choosegame (basic); i replaced by choosegame ("basic"); to specify the type of my parameter with the "".