Johanna Voxy [
http://community.jboss.org/people/voxy] created the discussion
"call function in guvnor rules"
To view the discussion, visit:
http://community.jboss.org/message/535231#535231
--------------------------------------------------------------
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.
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/535231#535231]
Start a new discussion in jBPM at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]