Community

call function in guvnor rules

created by Johanna Voxy in jBPM - View the full discussion

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

Start a new discussion in jBPM at Community