1 Reply Latest reply on Apr 1, 2010 4:38 PM by Johanna Voxy

    call function in guvnor rules

    Johanna Voxy Apprentice

      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);



      but it doesn't work.